MCUXpresso SDK Documentation

iap_flash

iap_flash#

Overview#

The IAP Flash project is a simple demonstration program of the SDK IAP driver. It erases and programs a portion of on-chip flash memory. A message a printed on the UART terminal as various operations on flash memory are performed.

Supported Boards#

LPC845BREAKOUT
Hardware requirements
  • Micro USB cable

  • LPCXpresso845 Breakout board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a micro USB cable between the host PC and the LPC-Link USB port (J8) on the target board.

  2. Open a serial terminal with the following settings:

    • 9600 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

Running the demo
  1. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

The following lines are printed to the serial terminal when the demo program is executed.

IAP Flash example

Writing flash sector 1

Erasing flash sector 1

Erasing page 1 in flash sector 1

Flash signature value of page 1

XXXXXXXXXXXXXXXXXXXXX

End of IAP Flash Example

LPCXpresso51U68
Hardware requirements
  • Micro USB cable

  • LPCXpresso51U68 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J6) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

Running the demo
  1. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

The following lines are printed to the serial terminal when the demo program is executed.

IAP Flash example

Writing flash sector 1

Erasing flash sector 1

Erasing page 1 in flash sector 1

Entire flash signature

XXXXXXXX

End of IAP Flash Example

LPCXpresso54628
Hardware requirements
  • Micro USB cable

  • LPCXpresso54628 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a micro USB cable between the host PC and the LPC-Link USB port (J8) on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

Running the demo
  1. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

The following lines are printed to the serial terminal when the demo program is executed.

IAP Flash example

Writing flash sector 1

Erasing flash sector 1

Erasing page 1 in flash sector 1

Flash signature value of page 1

XXXXXXXXXXXXXXXXXXXXX

End of IAP Flash Example

LPCXpresso802
Hardware requirements
  • Micro USB cable

  • LPCXpresso802 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a micro USB cable between the host PC and the CMSIS DAP port(CN1 on the board).

  2. Open a serial terminal with the following settings:

    • 9600 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

Running the demo
  1. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

The following lines are printed to the serial terminal when the demo program is executed.

IAP Flash example

Writing flash sector 1

Erasing flash sector 1

Erasing page 1 in flash sector 1

Flash signature value of page 1

XXXXXXXXXXXXXXXXXXXXX

End of IAP Flash Example

LPCXpresso804
Hardware requirements
  • Micro USB cable

  • LPCXpresso804 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a micro USB cable between the host PC and the CMSIS DAP port(CN2 on the board).

  2. Open a serial terminal with the following settings:

    • 9600 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

Running the demo
  1. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

The following lines are printed to the serial terminal when the demo program is executed.

IAP Flash example

Writing flash sector 1

Erasing flash sector 1

Erasing page 1 in flash sector 1

Flash signature value of page 1

XXXXXXXXXXXXXXXXXXXXX

End of IAP Flash Example

LPCXpresso824MAX
Hardware requirements
  • Micro USB cable

  • LPCXpresso824MAX board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a micro USB cable between the host PC and the CMSIS DAP port(J3 on the board).

  2. Open a serial terminal with the following settings:

    • 9600 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

Running the demo
  1. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

The following lines are printed to the serial terminal when the demo program is executed.

IAP Flash example

Writing flash sector 1

Erasing flash sector 1

Erasing page 1 in flash sector 1

Flash signature value of page 1

XXXXXXXXXXXXXXXXXXXXX

End of IAP Flash Example

LPCXpresso845MAX
Hardware requirements
  • Micro USB cable

  • LPCXpresso845MAX board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a micro USB cable between the host PC and the CMSIS DAP port(J4 on the board).

  2. Open a serial terminal with the following settings:

    • 9600 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

Running the demo
  1. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

The following lines are printed to the serial terminal when the demo program is executed.

IAP Flash example

Writing flash sector 1

Erasing flash sector 1

Erasing page 1 in flash sector 1

Flash signature value of page 1

XXXXXXXXXXXXXXXXXXXXX

End of IAP Flash Example

LPCXpresso860MAX
Hardware requirements
  • Micro USB cable

  • LPCXpresso860MAX board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a micro USB cable between the host PC and the CMSIS DAP port(J4 on the board).

  2. Open a serial terminal with the following settings:

    • 9600 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

Running the demo
  1. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

The following lines are printed to the serial terminal when the demo program is executed.

IAP Flash example

Writing flash sector 30

Erasing flash sector 30

Erasing page 1 in flash sector 30

Flash signature value of page 30

XXXXXXXXXXXXXXXXXXXXX

End of IAP Flash Example