4. System Features Migration
4.1. Windows and Keil® Structure Differences
File
boot_vectors.s
in thesdk_boot
folder is renamed tostartup_DA14585_586.s
for the DA14585/586 and renamed tostartup_DA14531.s
for the DA14531File
system_ARMCM0.c
is renamed tosystem_DA14585_586.c
for the DA14585/586 and renamed tosystem_DA14531.c
for the DA14531
Figure 10 SDK Boot Folder Differences
To build for the DA1453x or DA1458x, choose the desired target. The symbol is automatically inserted if the user chooses the applicable build next to the “Options for Target” option in Keil
Files
da1458x_config_advanced.h
andda1458x_config_basic.h
are divided in two sections. For each SOC there is a separated module(DA14531,DA14535,DA14585)The code
#if defined (__DA14531__)
is the general strategy in the SDK6 to differentiate between DA1458x code and DA14531 code
Figure 11 DA14531 Keil Options
In both SDKs the user application folder is located on each project under the src directory and has the structure as shown in Figure 12
The platform folder includes the same files in both SDKs
(user_periph_setup.c)
Figure 12 SDK6 Windows Folder Structure
The Keil structure in the new SDK is slightly different. See Figure 13 for the folders that have been removed (they already include .h
files).
Figure 13 SDK6 KEIL project Structure
4.1.1. File Overview of da1458x_config_basic.h
The major updates in this file are shown in Bold.
The
da145xx_config_basic.h
selects the maximum number of concurrent connections supported by the application:
DA1453x supports a maximum of 3 concurrent connections
DA14585 supports a maximum of 8 concurrent connections
The
da145xx_config_basic.h
enables:
The Disable debugging feature during production
The watchdog timer behavior in production mode
By default undefined to generate NMI
If defined in production, then generates a HW RESET
4.1.2. File Overview of da1458x_config_advanced.h
The major updates in this file are shown in Bold.
File
da145xx_config_advanced.h
selects the:
Low power clock (LPC is used as the sleep clock RCX, XTAL32kHz)
File
da145xx_config_advanced.h
enables the:
hard coded trim value for the XTAL16MHz/XTAL32MHz clock
File
da145xx_config_advanced.h
sets the:
BLE device address (Always check if this is value is unique)
Application code location (EEPROM, External Flash or OTP)
Temperature ranges (Highly application specific. Supported only in DA14585 at this moment)
Adaptive XTAL16MHz (supported in DA14585 at this moment)
4.1.3. File Overview of user_periph_setup.h
The major updates in this file are shown in Bold.
The
user_periph_setup.h
selects the:
Dialog-specific motherboard (Devkit-P or Basic Kit)
The
user_periph_setup.h
sets:
The wakeup from Hibernation GPIO configuration (DA1453x specific)
The application-specific UART GPIO configuration
4.1.4. File Overview of user_callback_config.h
File user_callback_config.h
contains the main application loop, user specific and profile specific callback configuration.
These callback APIs are used as a group of interfaces between the user application and the BLE stack.
Figure 14 user_callback_config.h File Differences
4.2. Sleep Modes – Hibernation Mode
The software architecture of the sleep modes for DA14485 and DA1453x is slightly different. The DA14531 has the following four sleep modes (DA14585 has three):
Sleep mode
Extended sleep mode
Deep sleep mode (also known as shipping clocked mode)
Hibernation mode (also known as shipping clock-less mode)
The DA1453x inherits the sleep modes from DA14585/586, but also supports the Hibernation mode. All clocks will be stopped and optionally none of the, part of the, or the whole memory is retained. Wake-up is possible from a GPIO event.
The only way to wake up from Hibernation mode is via the clockless wake up controller
Configurable polarity
GPIO signals are not debounced, RC filtered inputs (Type B pads) are used (NOT ALL PADS P01 up to P05)
4.2.1. Clockless Wake-Up: Only DA1453x
The clockless wake-up will wake up the system from hibernation mode.
- A GPIO will enable the RC32K oscillator which in turn triggers the Start-up FSM:
GPIO0_1, GPIO0_2, GPIO0_3, GPIO0_4, GPIO0_5
Configurable polarity
RC input filter
Always powered
At wake-up the Quadrature encoder can be configured to be enabled automatically to start counting without SW interaction.
4.2.2. Quadrature Decoder
Similar to the previous DA14585/586, the DA1453x also includes a quadrature decoder that:
Includes a special mode for edge counting (rising and falling) in selected channels
Has a quadrature in edge detection mode from reset
Starts counting when the power is on (check the flag)
4.2.3. Clocked Wake-Up Controller
The DA1453x includes two identical circuits of the clocked wake up controller also used on the DA14585/586 families. Because of that, DA1453x monitors 2 GPIOs in parallel.