Transition tips for program from MDBT50Q-RX (USB-A) to MDBT50Q-CX (USB-C)  with current NRF52840 project

Intro:

This is a guidance provided for those who is going to transit (or replicate) their project from Raytac MDBT50Q-RX (USB-A Dongle) to MDBT50Q-CX(USB-C Dongle).  In addition to the hardware spec change (Compact Size , LED, Button, Pin definition change) , the key firmware configuration should be made with changes to fit new USB-C Dongle MDBT50Q-CX.


RX-1                    CX-1

    MDBT50Q-RX                           MDBT50Q-CX

  

 Table of Contents:

1. Comparison chart: MDBT50Q-RX(USB-A) & MDBT50Q-CX(USB-C)

2. Firmware configuration

3. Create a merged hex file (2 in 1 or 4 in 1)

4. Firmware flashing process


1. Comparison chart: MDBT50Q-RX & MDBT50Q-CX

Comparison chart


2. Firmware configuration : MDBT50Q-RX → MDBT50Q-CX

Edit your current MDBT50Q-RX firmware with configuration change to align the PIN change to accommodate the hardware change.

Option 1. Using nRF5 SDK:

Make the definition set up of LED, BUTTON pin in the highlighted 4 sections.

Firmware configuration-nRF5


Option 2. Using NCS V2.6.X:

Use the board name: nrf52840dongle_nrf52840 and add the overlay file:

nrf52840dongle_nrf52840.overlay to the program (Devicetree Overlays),

then configure the below code definition into the overlay file:

/ {
   leds {
             compatible = “gpio-leds";
             led0_green: led_0 {
                      gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
                      label = “Green LED 0″;
             };
             led1_red: led_1 {
                     gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
                     label = “Red LED 1″;
             };
};

  buttons {
  compatible = “gpio-keys";
  button0: button_0 {
                  gpios = <&gpio1 6(GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
                  label = “Push button switch 0″;
                                   };
};
};

Firmware configuration-NCS


3. Create a merged hex file (2-in-1 or 4-in-1 hex file)


3A. Bootloader public key product

nrfutil keys generate public_key.pem → for zipping new firmware

nrfutil keys display –key pk –format code public_key.pem –out_file public_key.c

→ include public key to compile bootloader hex file

3A-1

3A-2


3B. Examples Demo

nRF5 SDK: nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\pca10056\s140

NCS V2.6.X: ncs\v2.6.0\nrf\samples\bluetooth\peripheral_uart


3C. How to generate bootloader setting file (if you need bootloader):

nrfutil.exe settings generate –family NRF52840 –application nrf52840_xxaa.hex –application-version 255 –bootloader-version 2 –bl-settings-version 1 bootloader_settings.hex


3D. Merge and create a 2-in-1 or 4-in-1 hex file

a). Merge 2-in-1 (no Bootloader file required):

mergehex.exe -m s140_nrf52_7.2.0_softdevice.hex nrf52840_xxaa.hex -o merge.hex

3D-a


b). Merge 4-in-1 (with Bootloader file & Bootloader settings file required):

mergehex.exe -m bootloader.hex bootloader_settings.hex  s140_nrf52_7.2.0_softdevice.hex nrf52840_xxaa.hex -o merge.hex

3D-b


4. Firmware flashing process

MDBT50Q-RX(USB-A):Manual wiring is required to have the firmware uploaded.

Please refer to the article: Firmware Coding & DFU onto MDBT50Q-RX

MDBT50Q-CX(USB-C):Built-in open bootloader included for simple DFU process..

Please refer to the article: User Manual of MDBT50Q-CX (nRF52840/nRF52833-based USB-C Dongle)





Edited by Sales Manager:
 Ms. Jocelyn Tsai
Technical guidance provided by Firmware Deputy Manager: Mr. Stanley Huang

Raytac Corporation 勁達國際電子股份有限公司
Bluetooth & WiFi & LoRa 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/WPC Pre-Certified.
Bluetooth Solution: nRF54, nRF5340, nRF52840, nRF52833, nRF52832, nRF52820, nRF52811, nRF52810, nRF52805, nRF51822
WiFi Solution: nRF7002
http://www.raytac.com
email: sales@raytac.com
Tel: +886-2-3234-0208

User Manual of MDBT50Q-CX (nRF52840/nRF52833-based USB-C Dongle)

MDBT50Q-CX is an advanced version of Raytac’s MDBT50Q-RX(USB-A Dongle).

MDBT50Q-CX has a more compact size, equips an up-to-date Type C USB Connector, and it has a built-in open bootloader for simple DFU process.

If you’ve been developing projects using MDBT50Q-RX in the past, you can find out in this manual how MDBT50Q-CX makes firmware compiling and loading much easier than before.

If you want to load firmware into MDBT50Q-CX, no wiring is needed. 

Simply plug the dongle into your device and USB DFU will be available.

MDBT50Q-CX (USB-C Dongle, nRF52840/nRF52833 solution): Product link

Size: 15.10 x32.85mm (0.59×1.29inches)


Table of Contents

A. Hardware intro

B. Software development environment setup

C. Firmware Implementation with NCS (nRF Connect SDK) or NRF5 SDK

D. Execute DFU (Device Firmware Update)


A. Hardware Intro

 <Pin Allocation>

2

< Schematic> (Click on the image to redirect to product page for Higher resolution photo)

Schematic Spec_MDBT50Q-CX_-240806


B.  Software development environment setup

Option 1. Compile in NCS(nRF Connect SDK)

(1) Install nRF Connect for Desktop:

B1

(2) Install Toolchain Manager and Programmer

B2

(3) Install nRF Connect SDK (NCS) → V2.6.0 is recommended.

B3

Option2. Compile in nRF5 SDK

(1) Download open source nRF5 SDK (Recommend: download the latest version:  17.1.0)

B4

(2) Install Segger Embedded Studio v5.42a (Recommended version)

https://www.segger.com/downloads/embedded-studio/

B5

※Welcome to contact Raytac sales team for v5.42a file of Segger Embedded Studio.


C. Implement firmware in NCS (nRF Connect SDK) or NRF5 SDK

We will use the two example codes below for this demo:

C1. NCS (nRF Connect SDK):

Example code path: \v2.6.0\nrf\samples\bluetooth\peripheral_uart

C2. nRF5 SDK:

Example code path: \nRF5_SDK_17.1.0_ddde560\examples\peripheral\usbd_ble_uart


C1. NCS (nRF Connect SDK): (Using nRF Connect SDK V2.6.0)

Step C1-1. Add build configuration to Board name: nrf52840dongle_nrf52840

C1

Step C1-2. Disable DCDC & DCDCHV by adding the below code into  prj.conf  file

CONFIG_BOARD_ENABLE_DCDC=n

CONFIG_BOARD_ENABLE_DCDC_HV=n

C2

Step C1-3. Fix the VDD power to 3.0V or 3.3V in board.c  file

The default power is 3.0V if you use board name: nrf52840dongle_nrf52840.

In this case, you don’t need to alter the power.

C3

Step C1-4. Click the rebuild icon to reconfigure the program.

C4

Step C1-5. The program will be saved automatically in the path below:

C:\ncs\v2.6.0\nrf\samples\bluetooth\peripheral_uart\build\zephyr\zephyr.hex


C2. nRF5 SDK:

Step C2-1. Open the program under:

\nRF5_SDK_17.1.0_ddde560\examples\peripheral\usbd_ble_uart\pca10056\s140\ses\ usbd_ble_uart_pca10056_s140.emProject

Step C2-2.  Fix the VDD power supply to 3.0V or 3.3V.

C2-1

Step C2-3. Start editing the project by opening the solution in Editor.

C2-2

Change the board name from PCA10056(nRF52840-DK) to PCA10059(nRF52840 dongle).

Save and re-compile the program after the amendment.

C2-3

Click the program file name and save the modified project.

C2-4

Press “Yes” to re-load the new set up value into configuration.

C2-5

The default code in sdk_config.h is: NRF_LOG_BACKEND_UART_ENABLED 1 (in red frame);

Please change 1 to 0 to make the LED light work.

Stanley修改內容_20240806

Press “Rebuild Solution” to make sure all the parameters you’ve modified are reconfigured.

C2-6

Step C2-4. The program will be saved automatically under the path below:

V:\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\pca10056\s140\ses\Output\Release\Exe\ble_app_uart_pca10056_s140.hex


D. Execute DFU (Device Firmware Update)

Reminder: 

No extra bootloader can be programmed into MDBT50Q-CX until you manually wire the pins on the PCB and erase the built-in bootloader.  You can simply operate DFU using MDBT50Q-CX’s bootloader.

Step D1. How to enable DFU?

(1) Press the button on MDBT50Q-CX

(2) Plug MDBT50Q-CX into your device while pressing the button

(3) Press and wait for approx.1 second until the LED light turns on. → DFU is activated.

(4) Release the button

※When Bootloader mode is enabled, the LED light on MDBT50Q-CX will twinkle continuously. 

D1

Step D2. Open the built-in DFU Bootloader

nRF Connect Desktop →  Programmer  → SELECT DEVICE  → Open DFU Bootloader

D2

You have successfully entered bootloader mode after you see the screen as below.

D3

Step D3. Add ready firmware file into the Programmer

(The program completed and saved during Step C1-5(NCS) or Step C2-4(nRF5 SDK))

※If you’re using nRF5 SDK, you need to add the soft device file into your program for loading firmware.

※Soft device path:

nRF5_SDK_17.1.0_ddde560\components\softdevice\s140\hex\s140_nrf52_7.2.0_softdevice.hex

D4

Step D4. Load the firmware and write it into the MDBT50Q-CX

D5

Step D5. Process FW DFU

D6

Step D6.  DFU Completed. The appointed firmware is successfully loaded into MDBT50Q-CX.

D7

※Any failure during the DFU process will leave you under bootloader mode.

Last-failure

If this happens, simply restart the firmware writing process from Step D4 to reload your firmware into MDBT50Q-CX.

 




Edited by Sales Manager: Ms. Jocelyn Tsai
Technical guidance provided by Firmware Deputy Manager: Mr. Stanley Huang

Raytac Corporation 勁達國際電子股份有限公司
Bluetooth & WiFi & LoRa 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/WPC Pre-Certified.
Bluetooth Solution: nRF54, nRF5340, nRF52840, nRF52833, nRF52832, nRF52820, nRF52811, nRF52810, nRF52805, nRF51822
WiFi Solution: nRF7002
http://www.raytac.com
email: sales@raytac.com
Tel: +886-2-3234-0208

 

How To Get started with Nordic nRF5340 Project by Raytac MDBT53/MDBT53V Development Kit Demo Board

Edited by Jocelyn Tsai / Account Manager

Here provides the easy introduction to the article of Hardware & Firmware Set up with step-by-step guidelines for nRF5340 Module demo board MDBT53-DB-40/MDBT53V-DB-40.

  1. Hardware Set Up
  2. Software Kits Resource & Preparation
  3. To recognize your nRFConnect SDK version case by case

1. Hardware Set Up

  • 1 x Nordic nRF5340-DK Board: PCA10095(2.0.0)
  • 1 x MDBT53-DB-40 or 1x MDBT53V-DB-40
  • 1 x IDC Wire 
  • 1 x Power Micro USB
  • 1 x Power Mini USB

**Reminder: Both “Nordic nRF5340-DK” and “Raytac MDBT53/53V Demo BD” should be included into the working network for program development.

Where to buy MDBT53-DB-40 , MDBT53V-DB-40
MDBT53-DB-40 (nRF5340 Solution)
MDBT53V-DB-40 (nRF5340 Solution)

  • Using Nordic DK as J-Link ( nRF5340 DK ONLY) Connects with MDBT53/53V DB by IDC wire.
  • Powered up MDBT53/53V DB by Mini USB wire.
  • Powered up the nRF5340-DK by Micro USB wire.

 

2.Software Kits Resource & Preparation

Download nRF Connect For Desktop (Please Click Me)

Download nRF Command Line Tools (Please Click Me)

Preparation

a. Prepared with the latest version of nRF Connect for Desktop

Selected version 3.12.0 Windows 32-bit and 64-bit

nrfconnect-setup-3.12.0-ia32.exe

b. Prepared with the latest version of nRF Command Line Tools

Selected version 10.18.1 Windows X86 64

nrf-Command-Line-Tools-10.18.1-x64.exe

**Note: SEGGER J-LINK Upgrade message might pop up while you’re doing above download.

 If you’re initiating Segger Embedded Studio (SES) application, please check the guideline here

c. Locate all the necessary kits for programming in PC (Check Software/Application list)

 

 

3. To recognize your nRFConnect SDK version case by case

Intro: The preparation of nRF Connect SDK Vx.x.x(NCS SDK version, ) and Nordic Example code will help you get through the program code building and trace debug in VS Code IDE or Segger Embedded Studio IDE. Here’s the brief way to recognize your nRFConnect SDK version which suits your project development.

Step1.

  Activated your “nRF Connect for Desktop”  >> “Toolchain Manager” >> “Open” >> “Install”

(**Note: The development nRF Connect SDK(NCS) provides with free VS Code IDE and Segger Embedded Studio IDE as compiling system)

Step2.

To recognize your project is with or without Audio inquiry and download the “nRF Connect SDK(NCS)” by the following classification.

A.) Project with Non-Audio case

Option1. Go with NCS V1.9.1 (Included) and previous version.

There’re either “Open VS Code” or “Open Segger Embedded Studio” IDE options could be selected for program coding.

Option2. Go with NCS V2.0.0(included) and the later.

 There’s simply “Open VS Code” IDE that could be run for program coding.

B.) Project with “Audio” inquiry

You would only have option of NCS V2.0.0(included) and the later version working in “Open VS Code” IDE.

Step3.

 Please make sure the nRFConnect SDK is installed at same base directory with compiling system  (the root of Open VS Code)

(This is using D:\ncs-work base as example.)    

If the base is not directing to the same, do “Select directory’” to re-direct the route.

Step4.

nRFConnect SDK Vx.x.x Download ready

Find more information about nRF5340 Module firmware development resources in below link!

“How To USE Nordic Connect SDK (NCS) Flashing Built Code into nRF5340 Module" , Please click this link! 

“How To Get Started With nRF5340 Module Program Coding and Compiling" Please click this link

 

Raytac Corporation 勁達國際電子有限公司
A BT5.2 & BT5.1 & BT5 module maker based on Nordic nRF53 & nRF52 solution 
(nRF5340 & nRF52840 & nRF52833 & nRF52832 & nRF52820 & nRF52811 & nRF52810 & nRF52805)
www.raytac.com email: service@raytac.com Tel: +886.2.3234.0208

Find nRF5340 module here!

Where to find nRF5340 module quickly? The nRF5340 a dual core solution deployed with 2 Arm Cortex M33 processors. Not only provide faster and powerful for advanced applications, but also LE audio. Raytac knows your anxiety and already distributed the modules available in several channels aimed to provide a speedy and comfortable way to get it.

Buy From Amazon
By From Digi-Key

Raytac Corporation 勁達國際電子有限公司
A BT5.2 & BT5.1 & BT5 module maker based on Nordic nRF53 & nRF52 solution 
(nRF5340 & nRF52840 & nRF52833 & nRF52832 & nRF52820 & nRF52811 & nRF52810 & nRF52805)
www.raytac.com email: service@raytac.com Tel: +886.2.3234.0208

Bluetooth Module UKCA Certification

“The UKCA marking came into effect on 1 January 2021. However, to allow businesses time to adjust to the new requirements, you will still be able to use the CE marking until 1 January 2023 in most cases" according to British Government’s announcement. 

The UKCA (UK Conformity Assessed) marking has been an issue for brands since Brexit effected which regulate for goods, products been placed, used, sold in Great Britain (England, Wales and Scotland). It covers most goods which previously required the CE marking.

Bluetooth module provides wireless communication by using radio wave to connect over distances are requited to meet compliance with local standard. As the worldwide key Nordic solution module manufacturer, Raytac will continue to fulfill every major local government’s guidance of regulation compliance such as FCC, IC, CE, MIC, ….and UKCA for sure. 

A BT5.3 & BT5.2 & BT5.1 module maker based on Nordic nRF53 & nRF52 solution 
(nRF5340 & nRF52840 & nRF52833 & nRF52832 & nRF52820 & nRF52811 & nRF52810 & nRF52805 & nRF51822)
www.raytac.com. email: sales@raytac.com. Tel: +886.2.3234.0208

Wireless Certification For Wirepas Massive On Pre-Certified Module

Does the end products need to perform certification test again if using Wirepas Massive software on a Pre-certified Bluetooth module? The Answer is “No"!

Local wireless regulation is the obligation for all devices need to follow. Raytac recently have received several queries from customers asking about if products built by Raytac’s Bluetooth modules need to perform FCC testing again if loaded Wirepas Massive software (aka Wirepas Mesh)?

Wireless regulation by countries may simply divided into 2 categories which are modular policy and non-modular policy. Countries like USA (FCC), Canada (IC), Japan (MIC/Telec)…etc. are following modular policy which means end products do not need to perform wireless testing and allow to use certified module ID on end products directly without further testing required. For non-modular policy countries like Europe (CE), the end products can only reference part of module testing report but still need perform the testing based on product base.

Bluetooth modules loaded Wirepas software would not change the wireless characteristics and features in term of frequency, channels, modulation, transmit power and antenna from original. Therefore, the original module certification and testing report can be referenced, used and leveraged.

Wirepas, an IoT software provider offers a flexible, scalable, and high reliability connectivity solution has been significantly reducing the cost and complexity over projects. The long-standing partnership between Raytac and Wirepas framed a combined hardware and software solution, has built up an ecosystem by providing a per-certified module and ready-to-use software successfully shorten time-to-market for system integrations and accelerate business.

Raytac Corporation 勁達國際電子有限公司
A BT5.3 & BT5.2 & BT5.1 module maker based on Nordic nRF53 & nRF52 solution 
(nRF5340 & nRF52840 & nRF52833 & nRF52832 & nRF52820 & nRF52811 & nRF52810 & nRF52805 & nRF51822)
www.raytac.com. email: sales@raytac.com. Tel: +886.2.3234.0208

Raytac Corporation Factory Tour

Many Customers are interested about Raytac’s facility, reliability and capacity. Here, Raytac would like to invite customers having a quick tour and know more about Raytac’s factory.

Raytac’s factory is located in New Taipei City where is located in north of Taiwan. The factory scales 4600 M2 with 180 man power. A completed in house SMT equipment and inspection facility provide a reliable and speedy module production line with over 600,000 pcs monthly capacity.

Raytac Corporation 勁達國際電子有限公司
A BT5.2 & BT5.1 & BT5 module maker based on Nordic nRF52 & nRF51 solution 
(nRF5340 & nRF52840 & nRF52833 & nRF52832 & nRF52820 & nRF52811 & nRF52810 & nRF52805 & nRF51822)
www.raytac.com. email: cs@raytac.com. Tel: +886.2.3234.0208

Nordic nRF52833 Module by Raytac

 nRF52833 is a powerful solution which supports multiprotocol such as Bluetooth, Zigbee, and Thread but also qualified for industrial operation at an extended temperature range of -40°C to 105°C. 

Raytac’s MDBT50Q and MDBT50 module employed nRF52833 solution offering 2 kinds of form factor with either 48 or 18 GPIO option for selection. 3 antenna options helps developers to find the best balance between performance and budgetary for projects.

MDBT50Q and MDBT50 modules are BT5.2 qualified supports direction finding and Bluetooth long range feature.  Both are built around 128K RAM, 512K Flash memory with I2C, SPI, I2S, UART, NFC, USB interface. A 1.7V to 5.5V supply voltage range enables powering the device from rechargeable batteries or over USB and +8dBm output power has significantly enhance the bluetooth long range coverage which is suitable for outdoor or smart home applications.

Nordic nRF52833 module by Raytac MDBT50Q & MDBT50

The modules are FCC/IC/CE/Telec/KC/SRRC/NCC/RCM pre-certified and in mass production for volume shipment. EVK demo board is also available for quick debug and evaluation. Developers who are interested in nRF52833 module MDBT50Q and MDBT50 are welcome get in touch with Raytac for immediate service support.

Raytac Corporation 勁達國際電子有限公司
A BT5.2 & BT5.1 & BT5 module maker based on Nordic nRF52 & nRF51 solution 
(nRF5340 & nRF52840 & nRF52833 & nRF52832 & nRF52820 & nRF52811 & nRF52810 & nRF52805 & nRF51822)
www.raytac.com. email: cs@raytac.com. Tel: +886.2.3234.0208

Nordic nRF52805 module, MDBT42TV

Developers love to use smaller module in order to fit in maximum kinds of implement and applications. 

Nordic’s nRF52805 is a BT5.2 solution features an ARM Cortex M4 MCU with 24KB RAM and 192K Flash Memory, an idea solution to fulfill the applications which only need simple Bluetooth function but cost constrained budgetary.  

Raytac has developed 2 module lines, MDBT42T & MDBT42TV, employed nRF52805 with different antenna options for customer election. All the modules have Bluetooth BT5.2 qualification granted, FCC/IC/CE/Telec/KC/SRRC/NCC pre-certified. A well RF designed module with completed coverage of certification offer an advantage to speed up time to market efficiency and minimal the BOM cost.

Raytac Corporation 勁達國際電子有限公司
A BT5.2 & BT5.1 & BT5 module maker based on Nordic nRF52 & nRF51 solution 
(nRF5340 & nRF52840 & nRF52833 & nRF52832 & nRF52820 & nRF52811 & nRF52810 & nRF52805 & nRF51822)
www.raytac.com service@raytac.com Tel: +886.2.3234.0208

Firmware Coding & DFU onto MDBT50Q-RX

Hi there, 

Here introduce the firmware perspective about how to program your code onto MDBT50Q-RX dongle.

Believed all readers have done the hardware setting and now has well prepared to load the code onto the dongle. (If not yet done the hardware setting, pls find it here)

In this blog, we will introduce the procedure based on below 2 scenarios

  • First time to load the code
  • DFU Firmware update by USB or OTA (through Bluetooth over the air)