1 Keil compilation
1. Reference documents:
Qingyun Bluetooth CD V4.1\6. Qingyun series tutorials produced by Qingfeng\3: BLE Bluetooth application\2.BLE experiment Section 2: Bluetooth LED task reading and writing instructions.pdf
Qingyun Bluetooth CD V4.1\6. Qingyun series tutorials Qingfeng produced\4: Detailed explanation of Bluetooth principle and teach you how to use Bluetooth: Bluetooth LED task reading and writing principle task detailed explanation.pdf
2. Enter the directory:
Qingyun Bluetooth CD V4.1\5. Qingyun Test Code\
Part 3: BLE Bluetooth Experiment\BLE Experiment 3: Button Bluetooth Notification\Board\pca10001\s110\ble_app_led\arm\ble_app_led.uvproj
3, open the project ble_app_led.uvproj
4. The compilation is successful.
5. Open nRFgo Studio
s110_nrf51822_6.0.0-5.beta_softdevice.hex
(c) Nordic Semiconductor ASA 2008-2013
Erase succeded
Programmed succeccfully softdevice E:/nordic/第三部分:BLE蓝牙实验/BLE实验1:蓝牙工程样例/s110_nrf51822_6.0.0-5.beta/s110_nrf51822_6.0.0-5.beta_softdevice.hex
In the process of debugging the Bluetooth stack, the following operations only need to be performed once.
(1) Erase All - Erase all firmware
(2) Program SoftDevice to program the Bluetooth protocol stack code (non-open source)
(3) Close nRFgo Studio
6. On the ble_app_led.uvproj interface,
click the DownLoad button to program the application code to the board through Jlink.
The following problem occurs:
If you encounter this problem, you need to solve it as follows
(1) Enter option –> Device –>Database:
select Generic CPU Data Base
and restore the previous settings Nordic nRF51 Series Devices
Click OK
(2) Enter option –> Debug
and the following interface will appear :
Change ULINK2./ME Cortex Debugger to:
Then click setting:
Click OK
Now click download again to download correctly:
JLink info:
------------
DLL: V4.60a, compiled Jan 16 2013 17:15:30
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware: V7.00
S/N : 20090928
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDBFull
* JLink Info: Found SWD-DP with ID 0x0BB11477
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
* JLink Info: Found Cortex-M0 r0p0, Little endian.
ROMTableAddr = 0xE00FF003
Target info:
------------
Device: nRF51822_xxAA
VTarget = 3.300V
State of Pins:
TCK: 0, TDI: 0, TDO: 1, TMS: 0, TRES: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 2
JTAG speed: 2000 kHz
Erase Done.
Programming Done.
Verify OK.
Application running ...
This problem should be related to the version of
Qingyun Bluetooth CD V4.1\4.Development Tools and Software\Setup_JLinkARM_V460a.exe
Name | Start | Size |
---|---|---|
IROM1 | 0x14000 | 0x2B000 |
IRAM1 | 0x20002000 | 0x2000 |
NRF51 DEBUG_NRF_USER BLE_STACK_SUPPORT_REQD BOARD_NRF6310
..;..\..\..\..\..\Include;..\..\..\..\..\Include\app_common;..\..\..\..\..\Include\ble;..\..\..\..\..\Include\ble\ble_services;..\..\..\..\..\Include\s110;..\..\..\..\..\Include\sd_common
2 Mobile phone test
After burning the firmware to the board, power on the board again
To install on an android mobile phone,
Qingyun Bluetooth CD V4.1\8.Mobile app\APK\no.nordicsemi.android.mcp.apk
can also install the app: nRF.Connect.4.19.0.apk
The relationship between the two is the version level , cannot be installed at the same time.
Here we take nRF.Connect.4.19.0.apk as an example. This app requires the location permission of the mobile phone. If it is not allowed, it will not work properly.
1 Turn on Bluetooth:
2 Open the app:
Connect LedButtonDemo
Select Nordic LED Button Service
Select LED
Write Value : On
to see the current state of the LED
At this time, the LD1 on the board should be bright