4. System Features Migration

4.1. Windows and Keil® Structure Differences

  • File boot_vectors.s in the sdk_boot folder is renamed to startup_DA14585_586.s for the DA14585/586 and renamed to startup_DA14531.s for the DA14531

  • File system_ARMCM0.c is renamed to system_DA14585_586.c for the DA14585/586 and renamed to system_DA14531.c for the DA14531

../_images/system1.svg

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 and da1458x_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

../_images/system2.svg

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)

../_images/system3.svg

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).

../_images/system4.svg

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.

  1. 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

  1. 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.

  1. File da145xx_config_advanced.h selects the:

  • Low power clock (LPC is used as the sleep clock RCX, XTAL32kHz)

  1. File da145xx_config_advanced.h enables the:

  • hard coded trim value for the XTAL16MHz/XTAL32MHz clock

  1. 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.

  1. The user_periph_setup.h selects the:

  • Dialog-specific motherboard (Devkit-P or Basic Kit)

  1. 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.

../_images/system5.svg

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.