CN
HOMEABOUT USINDUSTRY INFO BLE MODULE BLE5101 PROGRAMMING TUTORIAL

BLE Module BLE5101 programming tutorial

By sdga:NiceRF Wireless Technology Co., Ltd

1. Introduction of BLE Module BLE5101

The purpose of this document is to guide users to build a software environment for the re-development of the BLE module BLE5101, and to show how to start a project through a simple example, and to compile and download firmware to the BLE5101 module.

BLE Module BLE5101

The BLE module BLE5101 supports the following functions:

  • 4GHz BLE 5.1(Low power Bluetooth)
  • Cortex-M3 chip
  • Ultra low power sleep mode
  • Various peripherals

 

2. Preparation

Hardware:

  • BLE module BLE5101: one piece
  • PC(Windows)
  • J-Link Debug Tool

Software:

  • Compilation tool: Keil uVision5 V5.2 or later, used to compile the application
  • Fr801xH SDK development kit, including the used API (software library and source code), Keil-based sample project and GCC-based toolchain script.

 

3. Set up the development environment

3.1 Install Keil IDE development tool (Keil uVision5)

Go to the Arm Keil official website to download the latest development tools: https://www.keil.com/download/product/

3.2 Setting Tool

After installing the Keil tool, you need to install the software package supported by the Keil tool for the Cortex-M3 core: 

https://www.keil.com/dd2/arm/armcm3/

You need to complete the support for the Fr801xH J-Link online download program. Copy the "FR8010H.FLM" file located in "Fr801xH SDK/Tools" to the following directory: "C:\Keil_v5\ARM\Flash" .

 

4. Create your first project

Now you are ready to develop Fr801xH applications. You can start from the "none_evm/ble_simple_peripheral" project in the example directory of the Fr801xH SDK, or you can open other example projects.

There are multiple example projects in the example directory of the Fr801xH SDK, all of which can be compiled directly without copying.

 

5. Compile the project

Open any example project under the SDK, and press F7 or the compile button at the top left of the Keil interface  to compile. If everything is normal, a .bin file will be generated in the current directory of the project after the compilation is completed.

 

6. Flashto the device: BLE module BLE5101

BLE module BLE5101 supports direct online programming through the J-Link online debugging tool.

6.1. Connect J-Link tool to PC

Now, please pull out a wire from pins 3, 4, 9, and 10 of your BLE module BLE5101, and connect them to the corresponding pins of J-Link (Note: If the BLE5101 uses our company's standard firmware, then Need to pull pin 5 low or connect to GND to avoid the BLE5101 being in sleep mode and unable to connect to the PC):

J-Linkpins 3, 4, 9, and 10 of BLE module BLE5101

6.2 Setting J-Link parameters

Click on the submenus of Keil development tools in the following order: "Project" -> "Options for Target" -> "Debug" -> "Settings" -> "Flash Download"

The configuration of the Debug interface should be as shown in the figure below:

<img style="display: block; margin-left: auto; margin-right: auto;" src="/template/index/pc/images/1260815565112336386/1550021207931641857.png" alt="Click on the submenus of Keil development tools in the following order: " project"="" -=""> "Options for Target" -> "Debug" -> "Settings" -> "Flash Download"">

Click the Settings button to enter the J-Link online debugging parameter configuration interface. If the BLE5101 module is connected, "SW Device" will display the device information of the BLE5101:

If the BLE5101 module is connected,

Click Flash Download to enter the parameter configuration interface of J-Link online download:

Click Flash Download to enter the parameter configuration interface of J-Link online download

 

In this interface, if no default Flash option appears, you need to click the Add button to manually add the Flash download algorithm option of the Fr801xH chip. After clicking Add, select the FR8010H device.

6.3 Download program via J-Link

Now, you can go back to the Keil interface and click  to download the compiled .bin file to the BLE5101. If all goes well, the BLE5101 will reset and the application will start running after the programming is completed.

 

7. Monitor: Connect BLE module BLE5101

You can lead out a wire from pins 15 and 16 of BLE module BLE5101, connect it to the PC through the USB to serial port tool, and open the serial port tool to monitor the running status of the application.

pins 15 and 16 of BLE module BLE5101

 

Contact Us

 +86-755-23080616

 sales@nicerf.com

Website: https://www.nicerf.com/

Address: 309-314, 3/F, Bldg A, Hongdu business building, Zone 43, Baoan Dist, Shenzhen, China

Contact Us
Privacy Policy

Privacy Policy

· Privacy Policy

There is currently no content available


           

Email:sales@nicerf.com

Tel:+86-755-23080616

Address:309-314, 3/F, Bldg A, Hongdu business building, Zone 43, Baoan Dist, Shenzhen, China


×