How to Set Up the Development and Programming Environment for Raytac’s AN7002Q-nRF5340 Demo Board (AN7002Q-DB-5340)?

To help you quickly get started with Raytac’s AN7002 Wi-Fi module and nRF5340 module, here’s a simple guide on how to set up the development and programming environment using AN7002Q-nRF5340 Demo Board(AN7002Q-DB-5340)and nRF5340 DK.

This article will cover the 4 sections below:
1. Hardware setup
2. Software Development Kit and Environment setup
3. Programming/Development
4. Flashing/Uploading firmware


1. Hardware Setup
1 x Nordic nRF5340-DK: PCA10095(2.0.0)
1 x Raytac AN7002Q-DB-5340
1 x IDC Cable
1 x USB-Micro USB Cable
1 x USB-Type C USB Cable

*Note: You need to use both the “Nordic nRF5340-DK” and “Raytac AN7002Q-DB-5340 demo board” together for programming and development. *

Steps to connect the hardware:

  • Connect J-Link on Nordic DK to AN7002Q-DB-5340 using IDC Cable
  • Power Nordic nRF5340-DK up using Micro USB Cable
  • Power Raytac AN7002Q-DB-5340 up using Type C USB Cable


AN7002Q-DB-5340 Schematic Diagram:


2. Software Development Kit and Environment Setup

Download nRF Connect For Desktop: Download nRF Connect For Desktop (Please Click Me)

Download nRF Command Line Tools: Download nRF Command Line Tools (Please Click Me)

(1) Download and install the latest version of nRF Connect for Desktop (Windows 64-bit – 5.0.0 version)
nrfconnect-setup-5.0.0-x64.exe

(2) Download and install the latest version of nRF Command Line Tools (Windows X86 64 – 10.24.2 version)
nrf-command-line-tools-10.24.2-x64.exe

*Note: During set-up, the SEGGER J-LINK installation/update request might pop up on your screen. *
*(As shown in below screenshot). *

If you’re initiating Segger J-Link Driver, please check the guideline here(Click me)


After the installations are completed, you can see the following applications under the:

“Programs and Features” section in the Control Panel.


3. Programming/Development

nRF Connect SDK (NCS) supports development using the free VS (Visual Studio) Code IDE.
Here’s how to select and install the NCS SDK version (nRF Connect SDK vx.x.x):


Step1.

Open “nRF Connect for Desktop” → Choose “Toolchain Manager” → then click” Open”


Step2.

You’ll see a list of nRF Connect SDK versions. It’s recommended to install NCS v2.6.0 or later.
Here, we use NCS v2.6.0 as an example.


Step3.

Before installing NCS v2.6.0, confirm the installation path (Default path → C:\ncs).


If you want to change the path, click “Select directory”, and press OK.


Step4.

After installing the nRFConnect SDK v2.6.0, click “Open VS Code”.


Step5.

Open the Wi-Fi scan example


Step6.

Add build configuration → select the board and compile.


Select board: nrf7002dk_nrf5340_cpuapp.


Step7.

After compilation, a hex file will be generated.


Step8.

Under ACTIONS, you can choose to Build, Debug, or Flash.


Build:


Debug:


Flash:


4. Programming

nRF Connect SDK(NCS) supports programming. You can use the “Programmer” tool to flash .hex file.
Here’s how:


Step1.

Open “nRF Connect for Desktop” → Select “Programmer” → then click” Open”.


Click “Select Device”;


Since AN7002 Wi-Fi IC does not act as an MCU,
we can only flash the .hex file into the MDBT53(nRF5340) BLE IC.


Click “Add file” to add the .hex file.


Step2.

Select the .hex file you want to flash.


The hex file will be written into the part of the memory layout (where orange part is highlighted).


Slashes will be displayed in the circled part during the flash process.


Step3.

Once the flash process is completed, connect Raytac’s AN7002Q-DB-5340 development board to PuTTY.

Tx to p0.20

Rx to p0.22

GND to GND

This is a closer look into the pins that will be connected.


The flash process is completed when the LOG is displayed as circled below.


Check if hardware connection is successful using PuTTY.


Useful references:



Edited by Sales Manager: Ms. Vicky Huang
Technical guidance provided by R&D Manager: Mr. MW Lee
Hardware environment provided by Hardware Engineer: Mr. Kyle Wang


Raytac Corporation 勁達國際電子股份有限公司 
Bluetooth & WiFi module maker based on Nordic nRF54, nRF53, nRF52, nRF7002 solution
BT5.4 &BT5.3 & BT5.2 & BT5.1 Qualified, FCC/IC/CE/Telec/KC/RCM/SRRC/NCC Pre-Certified.
Bluetooth Solution: nRF54, nRF5340, nRF52840, nRF52833, nRF52832, nRF52820, nRF52811, nRF52810, nRF52805, nRF51822
WiFi Solution: nRF7002
http://www.raytac.com
email: service@raytac.com
Tel: +886-2-3234-0208

Optimizing functionality on nRF52 – Introducing Raytac bluetooth module with enabled Access Port Protection

Definition of Approtect (Access Port Protection):

In Nordic Semiconductor products, the enhanced APprotect feature has been integrated into the nRF52 series microcontrollers. APprotect (Access Port Protection) is a crucial security feature designed to safeguard the device’s application, compiled code, with read-back protection mechanism, against unauthorized access and modifications. This protection is essential for preventing unauthorized access and software tampering.

Effectively leveraging the improved Approtect feature on nRF52 series microcontrollers to enhance device application security and reliability is a significant concern for current developers and engineers.

This year, Raytac Corporation has launched low-energy Bluetooth modules for the third edition IC nRF52840 APprotection Solution and nRF52832 APprotection Solution.

These modules not only retain the functionalities of the original nRF52840 and nRF52832 low-energy Bluetooth modules but also comprehensively upgrade security by adding the APprotect feature to prevent hackers from accessing and rewriting programs without authorization.

Here is a detailed explanation of the nRF52 third edition low-energy Bluetooth modules by Raytac Corporation:

  • Raytac Corporation APProtection Bluetooth Module Series:

The encoding principle is to use ‘EN’ after the original model number to represent ‘encrypted’ instead of ‘V2’.

For example, in the nRF52840 series, the Raytac model MDBT50Q-1MV2 has “V2” replaced with “EN” for the third edition, hence the third edition model is named MDBT50Q-1MEN.

MDBT50Q Ceramic Antenna Series:

MDBT50Q-1MEN :
Equipped with a ceramic antenna module suitable for long-distance or complex environment wireless transmission.

MDBT50Q-P PCB Antenna Series:

MDBT50Q-P1MEN:
Equipped with a PCB antenna module suitable for general environment wireless transmission.


Designed for external antenna requirements,

MDBT50Q-U1MEN:

This module features a u.FL connector for external antenna use, suitable for ultra-long-distance wireless transmission.


Specification:
[nRF52840] MDBT50Q-1MEN & MDBT50Q-P1MEN Spec (Ver.A)
[nRF52840] MDBT50Q-U1MEN Spec (Ver.A)


Development Board:

MDBT50Q-DB : An excellent choice for those who want to delve deeper into and conduct more tests with the Nordic nRF52840. This development and debugging board based on the MDBT50Q-1MV2 (ceramic antenna) module has all GPIOs of the module pulled out, facilitating rapid connection to other devices for firmware development and verification using jumper wires.


The same encoding principle applies to the nRF52832 series, and the MDBT42Q series follows suit.



MDBT42Q Ceramic Antenna Series:

MDBT42Q-512KEN comes with a ceramic antenna module, suitable for long-distance or complex environment wireless transmissions.

MDBT42Q-P PCB Antenna Series:

MDBT42Q-P512KEN  features a PCB antenna module, suitable for general environment wireless transmissions.

MDBT42Q-U512KEN , designed for external antenna requirements, comes with a u.FL connector module suitable for ultra-long-distance wireless transmissions.



Specification:
[nRF52832] MDBT42Q-512KEN & MDBT42Q-P512KEN Spec (Ver.A)
[nRF52832] MDBT42Q-U512KEN Spec (Ver.A)


Development Board:

MDBT42Q-DB development board is based on the MDBT42Q-512KV2 (ceramic antenna) module and is designed for development and debugging purposes.


Other Reference Links:

Nordic 3rd Party Modules/Modems(Raytac’s modules are all qualified Nordic 3rd Party Bluetooth low energy module, please go following website for more detailed information.)

  • Module Appearance: The third edition features an additional black dot in the bottom left corner of the metal shell for easy identification of its purpose.
  • While the device with readback protection enabled, issuing ERASEALL command is a must and the only method to unlock the device before proceeding with programming.

  • It is recommended to use nRF_SDK v17.1.0 or later versions to write code for the third edition.

Credit to Nordic Infocenter website :https://infocenter.nordicsemi.com/topic/comp_matrix_nrf52840/COMP/nrf52840/nRF52840_ic_rev_sdk_sd_comp_matrix.html

Credit to Nordic Infocenter website:
https://infocenter.nordicsemi.com/topic/comp_matrix_nrf52832/COMP/nrf52832/ic_rev_sdk_sd_comp_matrix.html


  • For further clarity on the differences between the second edition IC Bluetooth modules and the third edition IC Bluetooth modules, the following table and links are provided for reference:
Nordic nRF52840
* Supporting BT5 Long Range Feature
* Built in USB interface
Raytac nRF52840 module spectrum covers MDBT50Q-1MV2, MDBT50Q-P1MV2 and MDBT50Q-U1MV2 series with Chip Antenna, PCB Antenna and u.FL connector for External Antenna option for selection.
MDBT50Q-1MV2MDBT50Q-1MENMDBT50Q-P1MV2MDBT50Q-P1MENMDBT50Q-U1MV2MDBT50Q-U1MEN









* BT5.4 & BT5.2 & BT5.1 & BT5 Bluetooth Specification Certified.
32-bit ARM® Cortex™ M4F CPU
Chip AntennaPCB Antennau.FL connector for external antenna
Dimension: 10.5 x 15.5 x 2.05 mmDimension: 10.5 x 15.5 x 2.0 mmDimension: 10.5 x 15.5 x 2.05 mm
GPIO 48
1MB Flash  256kB RAM
Nordic nRF52840 V2 SoC Solution*Nordic nRF52840 V3 SoC SolutionNordic nRF52840 V2 SoC Solution*Nordic nRF52840 V3 SoC SolutionNordic nRF52840 V2 SoC Solution*Nordic nRF52840 V3 SoC Solution
 *Supports APProtect (Access Port Protection) Features * Supports APProtect (Access Port Protection) Features * Supports APProtect (Access Port Protection) Features
 *Recommend developing or recompiling the codes with nRF SDK v17.1.0 or latter version to have compatibility with this module *Recommend developing or recompiling the codes with nRF SDK v17.1.0 or latter version to have compatibility with this module *Recommend developing or recompiling the codes with nRF SDK v17.1.0 or latter version to have compatibility with this module
Nordic nRF52832
Raytac nRF52832 module spectrum covers MDBT42Q, MDBT42 and MDBT42V series with both Chip Antenna and PCB Antenna option for selection.
MDBT42Q-512KV2MDBT42Q-512KENMDBT42Q-P512KV2MDBT42Q-P512KENMDBT42Q-U512KV2MDBT42Q-U512KEN










BT5.4 & BT5.2 & BT5.1 & BT5 Bluetooth Specification Certified.
32-bit ARM® Cortex™ M4F CPU
Chip AntennaPCB Antennau.FL connector for external antenna
Dimension: 10 x 16 x 2.2 mm
GPIO 32
512kB Flash 64kB RAM
Nordic nRF52832 V2 SoC Solution*Nordic nRF52832 V3 SoC SolutionNordic nRF52832 V2 SoC Solution*Nordic nRF52832 V3 SoC SolutionNordic nRF52832 V2 SoC Solution*Nordic nRF52832 V3 SoC Solution
 *Supports APProtect (Access Port Protection) Features *Supports APProtect (Access Port Protection) Features *Supports APProtect (Access Port Protection) Features
 *Recommend developing or recompiling the codes with nRF SDK v17.1.0 or latter version to have compatibility with this module *Recommend developing or recompiling the codes with nRF SDK v17.1.0 or latter version to have compatibility with this module *Recommend developing or recompiling the codes with nRF SDK v17.1.0 or latter version to have compatibility with this module

Edited by Sales Manager: Ms. Mandy Chao

Raytac Corporation 勁達國際電子股份有限公司
Bluetooth & WiFi module maker based on Nordic nRF54, nRF53, nRF52, nRF7002 solution
BT5.4 &BT5.3 & BT5.2 & BT5.1 Qualified, FCC/IC/CE/Telec/KC/RCM/SRRC/NCC Pre-Certified. Bluetooth Solution: nRF54, nRF5340, nRF52840, nRF52833, nRF52832, nRF52820, nRF52811, nRF52810, nRF52805, nRF51822 WiFi Solution: nRF7002
www.raytac.com
email:service@raytac.com
Tel: +886.2.3234.0208