2. Software

This section describes the software-related Frequently Asked Questions.

2.1. Can I remap SWD Pins to GPIOs?

Yes. Make sure that:

  1. The SWD signal mapping is defined bySYS_CTRL_REG[DEBUGGER_ENABLE]. Set theSYS_CTRL_REG[DEBUGGER_ENABLE]bitfield to 0 to disable the debugger. SeeTable 132in theDA14531 datasheet.

  2. The alternative SWD mapping is selected by theSYS_CTRL_REG[DEBUGGER_ENABLE]bit field.

  3. The RST default functionality can be disable by theHWR_CTRL_REG[DISABLE_HWR]bit.

  4. Erase the SPI Flash.

  5. Burn the SPI Flash with your FW.

  6. Try to connect to the JTAG interface. A‘device not found’found’ error will be occurred, and the SWD pins are remapped.

The procedure is also described inNote 1of theDA14531 datasheet.

2.2. Can Prod_test run on a DA145531 daughter board with DA14580DEVKT-P?

Yes, but wiring from J5 to J7 plus a 100 Ohm resistor are required, as shown inFigure 1.

_images/wiring.png

Figure 1DA1458x Pro DK wiring

  1. Use the Keil IDE to open and compile the Production Test project from the SDK6.0.12. The Keil project is located under theprojects\target_apps\prod_test\prod_test\Keil_5SDK path. The already exiting binary for the Production Test can be also used, which is located under6.0.12.1020\binaries\da14531\prod_test.

  2. After compilation, theprod_test_531.hexshould be created in theKeil_5\out_DA14531\Objectsfolder.

  3. OpenSmartSnippets Toolbox V5.0.10. See theuser manualfor more information.

  4. InBoard Setupselectsingle wire UART communication. SeeFigure 2.

_images/board_setup.png

Figure 2SmartSnippets Toolbox Board setup

  1. Open theRF Master.

  2. Download theprod_test_531.hex.

  3. Reset the DA1458x Pro DK, and then you should be able to use the RF Master.

2.3. How to enable the debug UART mechanism and how to test it in DA145xx Pro Development Kit?

ble_app_barebone SDK6.0.12的例子是used for this demonstration. The project is located under theprojects\target_apps\ble_examplesSDK path. You should follow the steps below to enable the debug UART mechanism. In addition, the DA145xx Pro Development Kit is required as well.

  1. Define theCFG_PRINTFmacro inda1458x_config_basic.h. SeeFigure 3.

_images/CFG_PRINTF.png

Figure 3Define CFG_PRINTF macro

  1. UART2 settings are defined inuser_periph_setup.h, which can be changed according to application requirements. P06 is used to enable UART2 Tx functionality.

_images/UART2_settings.png

Figure 4UART2 configuration settings

  1. Include thearch_console.hheader file inuser_barebone.c. SeeFigure 5.

_images/arch_console.png

Figure 5Include arch_console.h header

  1. Add the following code inuser_app_adv_start()

charch=0xFF;arch_printf("Device starts advertising");arch_printf("\n\r");arch_printf("Print 1 byte");arch_puts(&ch);arch_printf("\n\r");
  1. Install the wiring fromJ2.27toJ1.17as shown inFigure 6.

_images/DA145xx_wiring.png

Figure 6DA145xx wiring

  1. Teraterm Configurations: make sure that the correct COM port is selected. The COM port is likely to be different in your setup. Select the lowest number of the two options.

  2. Run the example and the result will show in the Serial Monitor. SeeFigure 7.

_images/result.png

Figure 7Result in the Serial Monitor

2.4. How many sleep modes are available in DA14531 and how to configure?

DA14531 SoC supportsthree (3)sleep modes, namely:

  1. Extended sleep mode (with or without OTP copy).

  2. Deep sleep mode (also known as shipping clocked mode).

  3. Hibernation mode (also known as shipping clock-less mode)

See theSleep Mode Tutorialfor an overview on how to configure the DA14531 SoC in any of the three available sleep modes.

2.5. How to make the DA14531 advertising with advertising scan indication (ADV_SCAN_IND) packets?

TheADV_SCAN_IND PDUis used from the peripheral to send a scan response when operating in non-connectable mode. The device should be configured in a non-connectable advertising mode and also the scan response data should be defined. For more information, see theSimple Beacon ExampleandBLE Advertising Tutorial.

2.6. Can I use any of the DA14531 Timers in sleep mode?

Yes. Timer 1 can be kept active in sleep mode as the clock source is selectable betweenSystem Clock (sys_clk)andLow Power Clock (lp_clk). For more information, see theDA14531 Timer1Software Example.

2.7. What development path should I follow to migrate my FW from DA14585 to DA14531??

Our latest SDK6.0.12 is common for DA14531 and DA14585/586. If an existing application is based on DA14585/586 and SDK6.0.10, the the application can be easily ported to DA14531 and SDK6.0.12. Most of the functions will be changed automatically. Just some configurations must be checked before finishing the migration. TheSDK Porting Guide文档描述了变化和neede的步骤d to port an application that has been developed under DA14585/DA14586 SDK 6.0.10 release, to the latest DA14585/586/531 SDK 6.0.12 release.

2.8. What is the difference between Clockless wake-up and Clocked wake-up?

The difference is thatClockless wake-upis only used when the system is in hibernation mode and theClocked wake-upis used when the system is either in extended or deep sleep mode. In hibernation mode all clocks are stopped, but in extended or deep sleep mode the wakeup controller resides in thePD_SLPpower domain and operates on theLP_CLK.

SeeSections 17 and 18in theDA14531 datasheetfor more information on Clockless and Clocked wake-up.

TheSleep Mode tutorialdemonstrates the Clockless wake-up. TheBLE Notify Button WakeupSW Example demonstrates the Clocked wake-up.

2.9. Can the reset be mapped to any other GPIO?

Yes the reset can be mapped to any of the GPIO out of P0_0, P0_1 …, P0_11.POR_PIN_REGhasPOR_PIN_POLARITYto set the polarity andPOR_PIN_SELECTto select the GPIO. The reset time can be programmed withPOR_TIMER_REGby programming “POR_TIME: Time = POR_TIME x 4096 x RC32K clock period”. The user must keep the reset pin to high or low (based on the set POLARITY) for the duration programmed for POR_TIME.

2.10. How can I achieve hibernation (clockless or shipping) mode?

The entire process to achieve the clockless mode is explained in theConfiguring to Hibernation ModeSW Example.

2.11. What are the QDIDs of the DA14531?

Use the links below to find the QDIDs of DA14531 for Controller, Host and Profile Subsystems:

  1. QDID Controller Subsystem

  2. QDID Host Subsystem

  3. QDID Profile Subsystem