| Kinetis SDK Demo Applications User Guide 1.0.0-beta Freescale Semiconductor, Inc.

- Main Page
- Related Pages
- Demos

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Flash Demo User Guide
Flash Demo

The flash_demo application can run from either internal RAM or Flash and uses the Standard Software Drivers (SSD) to erase and program different regions of flash, and run swap if supported on the device. More...

### Flash Demo User Guide

# Getting started

The Flash Demo example code walks through different examples of how to erase and program flash contents and use the swap feature if it is supported on the device.

# Default Debugger Connection

    1. TWR-K64F120M (on board OpenSDA)
    2. FRDM-K64F120M (on board OpenSDA)

# Commands/Directions

1. Select Flash_Debug target. Both Flash_Debug and Ram_Debug targets are available.

   Flash_Debug supports Swap feature for devices that support Swap (K64F).

2. Connect one end of the USB cable to a PC host and the other end to the OpenSDA connector on the board.
3. Open Terminal program such as TeraTerm, Putty, or Hyperterminal.
4. Configure the Terminal program to select the OpenSDA COMx port for the board, using 115200 8N1: 115200 baud, 8 data bits, No parity, 1 Stop bit.
5. Connect to the board with the debugger (download & debug), run the program, and view the Terminal messages for flash operations being performed.
6. For devices that support Swap, the Flash_Debug target will copy (program) the application that is running from the lower block to the upper block, and then swap commands will be issued.
7. Flash memory blocks will be swapped at the next reset. Disconnect debug session and hit the reset button on the board.
8. Also note, during swap, memory locations 0x7F000 & 0xFF000 are swapped and displayed on the terminal showing how the memory map changes.
9. For devices that do not support swap, simply view the terminal messages for flash operations that are occurring for the demo.
10. Optionally, run the Ram_Debug target, which supports additional commands like FlashEraseAllBlock() which are not possible when executing code from flash memory space.

11. Terminal will display "Flash Demo Complete!" when finished.

    Note: GCC Builds only support "Flash Debug" target