Friday, February 7, 2020

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)

First time to load the code:

1. Generate Public Key

For security reason, Public Key is the first step to proceed (DOS Environment MUST)
   Command to produce Public Key is in below:

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

2. Edit Bootloader (Use Keil C as the example)
    2.1 Open a project


    2.2 Paste the Public Key produced from step 1 in the red square.

    2.3 Set up Button behavior to trigger the Bootloader function start
    2.3.1 Activate to enter the Bootloader function by using button pressed. (Developers may change to others if don't like this way. Just enter "secure_bootloader" project and modify "sdk_config.h")

    2.3.2 Modify button pin no. (Developers can modify "sdk_config.h" in "secure_bootloader" project)

    2.3.3 Modify LED pin no. (Developers can modify "pca10056.h" in "secure_bootloader" project)

3. Edit Application
   Open and edit the project


4. Generate bootloader_settings.hex file

nrfutil.exe settings generate --family NRF52840 --application USBD_TO_UART.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 bootloader_settings.hex

5. Merge files
mergehex.exe -m Bootloader.hex bootloader_settings.hex -o Combind0.hex
mergehex.exe -m Combind0.hex s140_nrf52_6.1.1_softdevice.hex -o Combind1.hex
mergehex.exe -m Combind1.hex USBD_TO_UART.hex x -o USBD_TO_UART_BT_SD_APP.hex

6. Use nRFconnect to burn the merged code onto dongle (nRF52840 IC)
Launch the programmer

Load the merged .hex file
Program the .hex file

Right here, the code should be loaded onto dongle successfully.
Hope all you guys enjoy the journey and completed the setup.

In case you are not happy about the code you just loaded?
No worry, we now introduce DFU process in below to retrieve your happiness.

Tuesday, February 4, 2020

Come to visit Raytac at Embedded World 2020 #Hall 3 / 3-520

With over 1,000 exhibitors gathering in Nuremberg, Germany on 25 Feb.~27 Feb., 2020 , Embedded World already is one of  the biggest trade fair among the IoT Technologies.

Raytac is pleased to be in attendance and present our full range of module family based on Nordic nRF52840, nRF528333 and all others.

We welcome all developers come to meet us and look forward to seeing you there.

Raytac Corporation 勁達國際電子有限公司 
A BT 5.1 & BT 5 & BT 4.2 module maker based on Nordic nRF52 & nRF51 solution 
(nRF52840 & nRF52833 & nRF52832 & nRF52811 & nRF52810 & nRF51822)
www.raytac.comemail: cs@raytac.comTel: +886.2.3234.0208