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)

How to update nRF DeviceFamilyPack version to 8.27.1

From the article “Change to nRF52833 module? What the Hardware & Firmware Setting Need To Review?“, Raytac has highlighted Keil users need to update nRF Device Family Pack version to 8.27.1 for SDK16

Here introduced how to change the nRF DeviceFamilyPack version.

Modify nRF DeviceFamilyPack version to V8.27.1
Modify nRF DeviceFamilyPack version to V8.27.1

Change to nRF52833 module? Introduce What the Hardware & Firmware Perspective Need To Review!

Developer who currently are using nRF52840 based modules must be excited waiting for nRF52833’s distribution. Most developers are aware that nRF52833 supports long range, multi protocol and USB interface but has less RAM and Flash memory rather than nRF52840 and no doubt is the best alternative to have cost effective without extra efforts.

Raytac has released 3 models of nRF52833 based modules just at the same time when Nordic released, MDBT50Q-512K / MDBT50Q-P512K / MDBT50Q-U512K. Both nRF52840 and nRF52833 module are based on same form factor and pin out. To have quick visual identification finding the difference, Raytac’s nRF52833 modules are built by Green PCB but nRF52840 modules are Blue.

Raytac BLE Module-nRF52840 & nRF52833

How To Use MDBT50Q Demo Board (MDBT50Q-DB-40 / MDBT50Q-DB-33)

Here provides an easy introduction of How to set up of nRF52840 & nRF52833 Module Demo board MDBT50Q-DB-40 (for nRF52840) & MDBT50Q-DB-33 (for nRF52833)
MDBT50Q-DB-40, built by Raytac’s MDBT50Q-1MV2  with Red PCBA deployed nRF52840 SoC with Bluetooth 5 & Thread Combo module Demo Board, equipped Raytac’s MDBT50Q-1MV2  with 1MB Flash Memory and 256KB RAM and Chip Antenna
MDBT50Q-DB-33, build by Raytac’s MDBT50Q-512K with Green PCBA deployed nRF52833 SoC with Bluetooth 5 & Thread Combo module demo board, equipped Raytac’s MDBT50Q-512K  with 512KB Flash Memory and 128KB RAM and Chip Antenna
Both demo boards are BT5.1 / BT5 / BT4.2 Bluetooth qualified and FCC, IC, CE, Telec, KC, SRRC, RCM, NCC, WPC pre-certified.

Bluetooth Project: How to program your firmware to module

After setup been done, here comes the next question: How to program the firmware in to the module. We are using some simple instruction in below for reader’s quick reference.

Hardware

You will need a Nordic nRF5X DK or a Segger J-link as programmer to load the firmware. To use Nordic nRF5X DK to debug the SoC as well, you will need to order corresponding nRF5X DK to match the SoC number. For example, order nRF52840 DK to debug nRF52840 SoC or order nRF52 DK to debug nRF52832/52810 SoC. But if you are only using it as programmer, any version of nRF5X DK will work as we only use the J-link on this board.

Software

Please download Nordic nRFGo Studio for programming. Remember to install nRF5X Command Line Tools if the board was not detected by nRFGo Studio. Once they are all connected, you can then start programming. Please make sure to “erase all” every time before programming.

For more tutorials and demo of sample code, please visit Nordic’s DevZone and Infocenter where have ample resources to utilize.

Programing 

SoftDevice + Application

  1. Erase all first. Then program Softdevice and follow by Application code.
  2. Or you may combine code as stated in above. Erase all and follow by programing the combined code.

SoftDevice + Bootloader+ Application

  1. Either Erase all first.  Program the Softdevice and follow by Bootloader. and then use DFU to update the application code.
  2. Or suggested having a combined code (SofDevice+Application+Bootloader) for program. Simply erase all and follow by programming the combined code.
*Remark
Bootloader is needed for DFU (OTA) Function.
SDK 11 (included) and before – a legacy DFU method, which is simple but less security
SDK 12 (Included) and after – a latest DFU method, which has higher security.

 

To easy customer’s IoT device mass production, Raytac provide code pre-program service into module before shipment.  There are requirements listed in below for customers who need the service!

  1. A single, combined hex file is required. Please combine softdevice and application or/and bootloader (depending on your firmware design) together before programming. This will shorten programming time and help to manage your code easier. If you are not familiar with merging firmware, please download the instruction from the link:     https://mega.nz/#!Qg5UBJTQ!POWmmNNdapGqefHpB10YjpcuExLWwXnxDfBzcVrsTOw
  2.  Need a simple method to check programming status. The easiest way is to check the device name if device will broadcast device name after programming is done; or use I/O to trigger LED and its behavior. This does not aim to test any or full function of your device, only a simple method for the operator to know programming status.
nRF52840 MDBT50Q Module
nRF52840 MDBT50Q Module

 

Raytac Corporation
A BT4.1 & BT4.2 & BT5 module maker based on Nordic nRF51 & nRF52 solution 
(nRF51822 & nRF51422 & nRF52832 & nR52810 & nRF52840)
www.raytac.com          email: cs@raytac.com          Tel: +886.2.3234.0208

BLE Module Firmware Development Q&A: NFC pins creates “Error 404 – signal not found” (technically)

When you start developing your firmware for your Nordic nRF52832 solution-based Raytac BLE module, you will (like on most other projects) bump into some difficulties.

The other day, we had yet another case where a simple thing caused major difficulties for even some of the brightest people – a customer couldn’t get their GPIO direction bit to work.

Although not too difficult to solve, it’s a common error that most customers end up having on our modules and that is because Pin 0.09 & 0.10 are set to NFC per Nordic’s default settings. In order to be able to use these pins as normal GPIOs, you will have to change those settings.

The two pins I am talking about are the ones linked to the NFC-part to the far left in the circuit example below:


nRF52832 MDBT42V Schematic.png

So, to convert these two pins to normal GPIOs, here’s what you need to do:

In SES, you’ll need to add CONFIG_NFCT_PINS_AS_GPIOS.

Pic 1
Right-click on the project and click “Edit Options”
Pic 2
Select “Common”, click on “Preprocessor” under “Code” and then click “CONFIG_NFCT_PINS_AS_GPIOS”

Check out the link below for a reference example on Nordic’s DevZone.

Reference link: Nordic DevZone – NFC pins into GPIOs

 

Raytac Corporation
A BT4.1 & BT4.2 & BT5 module maker based on Nordic nRF51 & nRF52 solution 
(nRF51822 & nRF51422 & nRF52832 & nR52810 & nRF52840)
www.raytac.com          email: cs@raytac.com          Tel: +886.2.3234.0208

Bluetooth Project: How to get your firmware development started!

Setting up Nordic’s IDE (Integrated Development Environment) is the first step into Bluetooth product development, and it’s also where most developers need support.

In order for developers to be able to smoothly set up their IDE, Raytac hereby provide you with a few easy steps.

First and foremost – In terms of IDEs, there are currently four different ones that are all viable; Segger Embedded Studio (SES), Keil C, IAR and GCC. Among these, SES and GCC are IDEs free of charge while Keil C and IAR both require the developer to pay a license fee to their respective company.

We at Raytac generally recommend SES, as it is an IDE brought forth by both Nordic and Segger together and it uses Segger J-Link. Although GCC is a free IDE, it only builds code and is impractical editting make file or debugging firmware. Thus, it’s not our primary choice.

Therefore, we will hereby provide you a step-by-step guide on how to set up your IDE when using SES.

  1. Where to download SES?

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

圖片 1.png

  1. Where to Nordic SDK ( Use SDK v15.0.0 as an example)

https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/

  1. Install SES V3.34 and unzip SDK v15.0.0

After SES installed, you may find “Non-Commercial License” 

圖片 4.png

  1. SES License Key? http://license.segger.com/Nordic.cgi
  2. How to get free License Key?

Key in Name, Company name, Address and PC’s MAC address. Then press “Request License”, the “License key” will send to your mail box automatically.

Tips: How look up PC’s Mac address: Pls enter DOS mode, 

Key in ipconfig/all,

The Mac address will be found in Ethernet card.

圖片 7.png

  1. Copy the license key from mail

圖片 8

  1. Execute SES and find out the “License Manager” in “Tools” option

圖片 9

  1. Select “Activate Embedded Studio”, Paste the “License Key”, Click “Install License”

圖片 10.png

  1. When completed, click”Manage Activation”,shown “License key” well installed.

圖片 11

圖片 12.png

CMSIS Configuration Wizard,

  1. Select “Open Solution” in SES’s File option to open SDK v15.0.0 project

..\examples\ble_peripheral\ble_app_uart\pca10040\s132\ses\ble_app_uart_pca10040_s132.emProject 

圖片 13圖片 14

  1. Select “Open Studio Folder” in SES’s File option, then select “External Tools Configuration”. You may find the display as below screen shot. Pls paste the below command. (The command can also be found in below link)

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fsdk_config.html&cp=4_0_0_1_6

圖片 15.png

圖片 16

  1. Please save the “tools.xml”. Afterward, developers may able start over build code and debug works.

Build Code & Debug

 

Raytac Corporation
A BT4.1 & BT4.2 & BT5 module maker based on Nordic nRF51 & nRF52 solution 
(nRF51822 & nRF51422 & nRF52832 & nR52810 & nRF52840)
www.raytac.com          email: cs@raytac.com          Tel: +886.2.3234.0208

Why Nordic BLE Solution? OTA DFU is the Key!

img_0924
With recent booming demand related to IoT field all over the world, many companies are celebrating brilliant sales record achieved.
Raytac, as a part of IoT player, we are really expecting the coming era for a wildly IoT implements to enhance people’s life!
However, we sincerely appeal all developers do no forget to consider about risk control especially the risk raised at the stage when the products already in consumer’s hand!
Without risk control efficiently, the happiness earned from the success may become only a instant moment.

How to use Raytac MDBT42Q (Nordic nRF52832) Demo Board

mdbt42q-db

Many customers are using Raytac’s Demo board for firmware development and debug.

Here we provide easy setup way for customer reference.