9. Build a DA14531 Application¶
This section explains how the user can build, program, and run a simple software application on the ProDev Kit development board.
It provides step-by-step instructions to load the example as a project in the Keil environment, set up and build the project, and finally execute the project via the debug environment on the DA14531 device.
Make sure that you have all required tools installed as described in Section
DA14531 – Software Installation and
Software Development Tools.
The DA14531 Software Development Kit (SDK) includes examples that run on the Pro Development Kits. The examples are provided with preconfigured KEIL projects.
The DA14531 Examples are included in the same SDK as the DA14585/586. The examples have build options in the KEIL project for both DA14531 and DA14585 depending on which daughterboard is used.
For the DA14531 device there is a dedicated USB kit. For more details, see the USB kit User Manual.
For further reading see the DA14531 DA14585/586 Software Platform Reference (UM-B-119).
9.2. The Barebone BLE Example Application¶
The Barebone BLE example application demonstrates basic BLE procedures such as advertising, connection, updating connection parameters, and implementation of the Device Information Service Server (DISS). For further reading see the Bluetooth SIG.
Open the folder with the SDK files. This is the folder where you extracted the SDK zip file.
ble_app_barebone.uvprojxto open the project in Keil.
<sdk_root_directory>\projects\target_apps\ble_examples\ble_app_all_in_one is only supported in DA14585/86.
Figure 33 shows the Keil project layout.
To execute the code and run the example, repeat steps 3 to 14 in The Blinky Peripheral Example Application.
The barebone application does not use the UART ( steps 9, 10, and 11 from Blinky can be skipped) and so the only jumpers required are those for the debugger interface as mentioned in Table 5.
Use the Android/iOS application BLE Scanner to scan for, and connect to, the DIALOG-BRBN app, see Figure 34.
Your BLE application is now running and advertising with the default advertiser string: “DIALOG-BRBN”.
In this example, we used the LightBlue iOS application to connect to an iPhone, but you can also use an Android application.
When you change the advertising name of your device and you leave the BD address the same, it will not show the update on your iPhone/iPad and not to connect to it anymore, it is easy to make your device forget about it. Follow some easy steps mentioned in the Apple Support Communities and your iPhone will not remember the Bluetooth device. If you change your mind, then you can pair the device as though it were new.
When multiple devices use the same BD address in the same room test (close enough so both can be detected by the user’s BLE scanner), it is highly recommended to change the BD address manually or use the static random address (advanced) to avoid any conflict. See Tutorial 1: Advertising contents
If you can not see any blinky messages in your UART terminal and the LED is not blinking, check the UART and LED jumper configuration. See Table 3. The DA14531 has two different UART options: either UART2 with 2 wires, or UART2 with 1 wire.
If you cannot start a debug session, check the SWD debugger jumper configuration. See Table 5.
Connect J1.23 - J1.24
Connect J1.21 - J1.22
Due to the limited number of pins on the DA14531, the P0_11 is shared with the SW_Trigger functionality. To get a capture on the SmartSnippets™ toolbox you must either remove J8[1-2] on the motherboard (you will not have SW_trigger functionality in this case), or assign the button to a different GPIO and wire it to J19 or J19.
If you have trouble with the J-link firmware or any issue with SDK operation, see DA1458x/68x Development Kit J-Link Interface Application Note AN-B-052.
If none of these actions resolved the issue, please contact the Dialog Software Forum.
When the device is programmed with an application in sleep mode, in order to attach the debugger, use a lower speed in JLink, eg 2000Khz.
9.4. What Next ?¶
This tutorial does not cover all the topics relevant to software development environments. It describes the first steps necessary to get started with the Pro Development Kit. The following links provide more information on DA14531:
DA14531 Product Brief: To know more about the SmartBond™ DA14531 SoC.
UM-B-119: DA14531 DA14585/586 SDK 6 Software Platform Reference: To know more about the software architecture.
UM-B-118: DA14531 DA14585/586 SDK 6 Porting Guide: This is the porting guide from SDK 6.0.10 to the SDK 6.0.12 release that will support the DA14531 device.
DA14531 Sleep modes Tutorial: To learn more about DA14531 Power management.
AN-B-075 DA14531 Hardware guidelines : To learn more about schematic, circuit explanation, and design guidelines for BLE applications based on the DA14531 SoC.
AN-B-072 Booting Options on DA14531 : To learn more about the Booting Sequence for DA14531.
UM-B-114 DA14531 Devkit Pro Hardware User Manual : To learn more about the hardware of the DA14531 development kit.