16. Flash Programming

In the previous sections we built our application, loaded it directly into the RAM of the DA1453x and DA1458x devices, and executed it using the debugger. This process is suitable for development but for production the application will be stored in either OTP, external SPI flash or loaded via the I2C or UART by the ROM based bootloader present in all DA1453x and DA14585/DA14586 devices.

Refer to the following documents for more details about the boot options available on DA1453x and DA14585/DA14586 devices:

In this section we will describe how to program your application code into the external SPI flash present on all DA1453x and DA1458x development kit boards, allowing the Bootloader to load it into RAM and start execution following a power on reset.

16.1. Preparing the Development Kit

Before the SPI flash can be programmed we need to ensure the jumpers that connect it to the DA1453x and DA1458x device are present. In the following sections we describe the required jumper configuration for each of the Development Kits.

16.1.1. DA1453x DEVKT-P Flash Jumper Settings

The additional jumpers illustrated below need to be added to the DA1453x DEVKT-P (DA14535 daughter board) to enable flash programming.

_images/da14535_pro_flash.svg

Figure 30 Additional jumpers for flash programming on the DA1453x DEVKT-P

16.1.2. DA14531 DEVKT-P Flash Jumper Settings

The additional jumpers illustrated below need to be added to the DA14531 DEVKT-P to enable flash programming.

_images/da14531_pro_flash.png

Figure 31 Additional jumpers for flash programming on the DA14531 DEVKT-P

16.1.3. DA14531 USB Kit Flash Jumper Settings

No additional configuration is required, the switch settings detailed in the Preparing the development kit section of this tutorial already enable flash programming.

16.1.4. DA14585 Basic Kit Flash Jumper Settings

The additional jumpers illustrated below need to be added to the DA14585 Basic kit to enable flash programming.

_images/da14585_basic_flash.png

Figure 32 Additional jumpers for flash programming on the DA14585 Basic Development Kit

16.1.5. DA14585/6 PRO Kit Flash Jumper Settings

The additional jumpers illustrated below need to be added to the DA14585/86 PRO kit to enable flash programming when using a DA14585 Daughter Board.

_images/da14585_86_pro_flash.png

Figure 33 Additional jumpers for flash programming on the DA14585/86 PRO Development Kit

Warning

These additional jumper should not be added when using a DA14586 Daughter Board as this device contains internal flash memory.

16.2. Programming Flash Memory

Once you have correctly configured the jumpers on your development kit you can the use the Flash Programmer tool contained within the SmartSnippets™ Toolbox to program your application into the flash memory. If you’re not already familiar with the SmartSnippets™ Toolbox then it is strongly recommended that you review the section 19 of the User Manual.

To program the flash, start the SmartSnippets Toolbox, connect to the development kit board using the JTAG option and select the Flash Programmer Tool from the tools menu. Now load the application you want to program using the “Import from file” button.

Flashing : Hex and Binary Files

You can use the tool program either a hex file or a binary file into flash. For the empty_peripheral_template project these files can be found in the following folder: empty_peripheral_template\\Keil_5\\out_DA145xx\\Objects.

_images/flash_prog_file.png

Figure 34 Select a file to program into Flash memory

To program the loaded file into the flash memory simply press the Connect button and then the Burn & Verify button. Once programming is complete you’ll see a message saying SPI memory verification succeeded in the Log window.