DFUSec programming examples

Document created by jorge_plascencia Employee on Apr 26, 2016Last modified by jorge_plascencia Employee on Apr 27, 2016
Version 3Show Document
  • View in full screen mode

These examples show several possible uses for the DFUSec programming feature of the tool.

LPC1857 single bootable image programmed in internal FLASH

This example shows how to burn a snigle bootanle image into internal FLASH.

When booting from internal FLASH, the boot address is 0x1A000000. The image has been linked for this address with data in IRAM.

This operation requires a simple 1-step programming sequence. The operation will do the following:

  • Erase just the area of internal FLASH dedicated to the bootable image (we'll use 64K starting at address 0x1A000000)
  • Program the image (up to 64K) into address 0x1A000000

DFUSec configuration

The image below shows the DFUSec configuration and a successful program cycle.

This uses the LPC18xx/43xx internal FLASH programming algorithm.

The 2nd file box contains the path/filename to the image file to program. The image file already includes the checksum and CRP.

The address (0x1A000000) and size (0x10000) designate the erase region, program address, and maximum program size. Since the 'Erase region before programming' option is selected, the FLASH at address 0x1A000000-0x1A00FFFF will be erased prior to programming. After rease completes, the image will be sent to the board (in small chunks) and programmed into FLASH. If the image exceeds 64K (specified by the same size parameter used for region erase), an error will be generated, even if FLASH extended beyond the 64K limit specified.

dfusec1.00NS_progmode_progsimple1_screenshot.preview.jpg

 

LPC1857 multiple images in internal FLASH

This example shows how to burn multiple images into different location in internal FLASH. Although this example is shown using the Keil MCB1857 board, the example can easily be used to separately program (or update) M0 and M4 images into different location in internal FLASH for the LPC4350 dual core device! Either image can be updated later without erasing the entire device or the other image.

This operation requires a 2-step programming sequence. Step 1 will erase the entire device and program image_1 into bank A. Step 2 will program image_2 into bank B. Optionally, with step 2, we can program image_2 into another area of bank A if needed.

Step 1 DFUSec configuration

The internal FLASH programming algorithm is used with the image_1.bin program file. Step 1 will erase the entire device (both bank A and B) before programming. Then image_1 will be placed at the bootup address (0x1A000000). We'll limit the image size to a maximum of 128K for programming. The configuration is show below:

dfusec1.00NS_progmode_step1ex_screenshot.preview.jpg

Step 2 DFUSec configuration

The internal FLASH programming algorithm is used with the image_2.bin program file. Step 2 will place image_2 at the 2nd bank address (0x1B000000). We'll limit the image size to a maximum of 16K for programming. The configuration is show below:

dfusec1.00NS_progmode_step2ex_screenshot.preview.jpg

 

Screenshot of the completed DFUSec 2-step program operation

dfusec1.00_2imageprog_screenshot.preview.jpg

Attachments

    Outcomes