romapi_flashiap#
Hardware requirements#
Mini/micro USB cable
Personal Computer
Board settings#
Prepare the Demo#
Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J1) on the board
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
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo#
When the example runs successfully, the following message is displayed in the terminal:
Flash driver API tree Demo Application.
Initializing flash driver.
Flash init successfull!.
Config flash memory access time.
PFlash Information:
kFLASH_PropertyPflashBlockBaseAddr = x
kFLASH_PropertyPflashSectorSize = x
kFLASH_PropertyPflashTotalSize = x
kFLASH_PropertyPflashPageSize = x
Erase a sector of flash
Calling FLASH_EraseNonBlocking() API.
Calling FLASH_VerifyErase() API.
Successfully erased sector: xx -> xx
Calling FLASH_Program() API.
Calling FLASH_VerifyProgram() API..
Successfully Programmed and Verified Location: xx-> xx
End of PFlash Example!
Supported Boards#
FRDM-MCXA153
Hardware requirements
Type-C USB cable
FRDM-MCXA153 board
Personal Computer
Board settings
No special settings are required. Note: By default, the on chip flash cannot erase. The Memory Block Configuration Word in MBC for on chip flash default value is 4. It means all the flash blocks can read and execute, but cannot erase. To run flash erase function, please configure ACL_SEC_14(the erased sector is sector 14) in IFR table to 0x0 in ISP mode: blhost -p com8 flash-erase-region 0x01000000 0x100 blhost -p com8 write-memory 0x01000000 cmpa.bin Note: The com8 need update based on your EVK com number It means the sector 14 of flash could read and write.
Prepare the Demo
Connect a Type-C USB cable between the host PC and the MCU-Link port(J15) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Flash driver API tree Demo Application.
Initializing flash driver.
Flash init successfull!.
Config flash memory access time.
PFlash Information:
kFLASH_PropertyPflashBlockBaseAddr = x
kFLASH_PropertyPflashSectorSize = x
kFLASH_PropertyPflashTotalSize = x
kFLASH_PropertyPflashPageSize = x
Erase a page of flash
Calling FLASH_EraseNonBlocking() API.
Calling FLASH_VerifyErase() API.
Successfully erased page: xx -> xx
Calling FLASH_Program() API.
Calling FLASH_VerifyProgram() API..
Successfully Programmed and Verified Location: xx-> xx
End of PFlash Example!
FRDM-MCXA156
Hardware requirements
Type-C USB cable
FRDM-MCXA156 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the LPC-Link USB port (P6) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Flash driver API tree Demo Application.
Initializing flash driver.
Flash init successfull!.
Config flash memory access time.
PFlash Information:
kFLASH_PropertyPflashBlockBaseAddr = x
kFLASH_PropertyPflashSectorSize = x
kFLASH_PropertyPflashTotalSize = x
kFLASH_PropertyPflashPageSize = x
Erase a sector of flash
Calling FLASH_EraseNonBlocking() API.
Calling FLASH_VerifyErase() API.
Successfully erased sector: xx -> xx
Calling FLASH_Program() API.
Calling FLASH_VerifyProgram() API..
Successfully Programmed and Verified Location: xx-> xx
End of PFlash Example!
FRDM-MCXA346
Hardware requirements
Type-C USB cable
FRDM-MCXA346 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the LPC-Link USB port (P6) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Flash driver API tree Demo Application.
Initializing flash driver.
Flash init successfull!.
Config flash memory access time.
PFlash Information:
kFLASH_PropertyPflashBlockBaseAddr = x
kFLASH_PropertyPflashSectorSize = x
kFLASH_PropertyPflashTotalSize = x
kFLASH_PropertyPflashPageSize = x
Erase a sector of flash
Calling FLASH_EraseNonBlocking() API.
Calling FLASH_VerifyErase() API.
Successfully erased sector: xx -> xx
Calling FLASH_Program() API.
Calling FLASH_VerifyProgram() API..
Successfully Programmed and Verified Location: xx-> xx
End of PFlash Example!
FRDM-MCXL255
Hardware requirements
Type-C USB cable
FRDM-MCXL255 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port (J16) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
Flash driver API tree demo application.
Initializing flash driver.
Flash init successfull!
Config flash memory access time.
PFlash Information:
kFLASH_PropertyPflashBlockBaseAddr = 0x0
kFLASH_PropertyPflashSectorSize = 8192
kFLASH_PropertyPflashTotalSize = 262144
kFLASH_PropertyPflashPageSize = 0x80
Erase a sector of flash
Calling flash_verify_erase_sector() API.
Successfully erased sector: 0x3c000 -> 0x3e000
Calling FLASH_Program() API.
Calling FLASH_VerifyProgram() API.
Successfully programmed and verified location: 0x3c000 -> 0x3c200
End of PFlash Example!
FRDM-MCXA174
Hardware requirements
Type-C USB cable
FRDM-MCXA174 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the LPC-Link USB port (P6) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Flash driver API tree Demo Application.
Initializing flash driver.
Flash init successfull!.
Config flash memory access time.
PFlash Information:
kFLASH_PropertyPflashBlockBaseAddr = x
kFLASH_PropertyPflashSectorSize = x
kFLASH_PropertyPflashTotalSize = x
kFLASH_PropertyPflashPageSize = x
Erase a sector of flash
Calling FLASH_EraseNonBlocking() API.
Calling FLASH_VerifyErase() API.
Successfully erased sector: xx -> xx
Calling FLASH_Program() API.
Calling FLASH_VerifyProgram() API..
Successfully Programmed and Verified Location: xx-> xx
End of PFlash Example!
FRDM-MCXA344
Hardware requirements
Type-C USB cable
FRDM-MCXA344 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the LPC-Link USB port (P6) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Flash driver API tree Demo Application.
Initializing flash driver.
Flash init successfull!.
Config flash memory access time.
PFlash Information:
kFLASH_PropertyPflashBlockBaseAddr = x
kFLASH_PropertyPflashSectorSize = x
kFLASH_PropertyPflashTotalSize = x
kFLASH_PropertyPflashPageSize = x
Erase a sector of flash
Calling FLASH_EraseNonBlocking() API.
Calling FLASH_VerifyErase() API.
Successfully erased sector: xx -> xx
Calling FLASH_Program() API.
Calling FLASH_VerifyProgram() API..
Successfully Programmed and Verified Location: xx-> xx
End of PFlash Example!
FRDM-MCXA266
Hardware requirements
Type-C USB cable
FRDM-MCXA266 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the LPC-Link USB port (P6) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Flash driver API tree Demo Application.
Initializing flash driver.
Flash init successfull!.
Config flash memory access time.
PFlash Information:
kFLASH_PropertyPflashBlockBaseAddr = x
kFLASH_PropertyPflashSectorSize = x
kFLASH_PropertyPflashTotalSize = x
kFLASH_PropertyPflashPageSize = x
Erase a sector of flash
Calling FLASH_EraseNonBlocking() API.
Calling FLASH_VerifyErase() API.
Successfully erased sector: xx -> xx
Calling FLASH_Program() API.
Calling FLASH_VerifyProgram() API..
Successfully Programmed and Verified Location: xx-> xx
End of PFlash Example!
FRDM-MCXA366
Hardware requirements
Type-C USB cable
FRDM-MCXA366 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the LPC-Link USB port (P6) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Flash driver API tree Demo Application.
Initializing flash driver.
Flash init successfull!.
Config flash memory access time.
PFlash Information:
kFLASH_PropertyPflashBlockBaseAddr = x
kFLASH_PropertyPflashSectorSize = x
kFLASH_PropertyPflashTotalSize = x
kFLASH_PropertyPflashPageSize = x
Erase a sector of flash
Calling FLASH_EraseNonBlocking() API.
Calling FLASH_VerifyErase() API.
Successfully erased sector: xx -> xx
Calling FLASH_Program() API.
Calling FLASH_VerifyProgram() API..
Successfully Programmed and Verified Location: xx-> xx
End of PFlash Example!
FRDM-MCXA577
Hardware requirements
Type-C USB cable
FRDM-MCXA577 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the LPC-Link USB port (P6) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Flash driver API tree Demo Application.
Initializing flash driver.
Flash init successfull!.
Config flash memory access time.
PFlash Information:
kFLASH_PropertyPflashBlockBaseAddr = x
kFLASH_PropertyPflashSectorSize = x
kFLASH_PropertyPflashTotalSize = x
kFLASH_PropertyPflashPageSize = x
Erase a sector of flash
Calling FLASH_EraseNonBlocking() API.
Calling FLASH_VerifyErase() API.
Successfully erased sector: xx -> xx
Calling FLASH_Program() API.
Calling FLASH_VerifyProgram() API..
Successfully Programmed and Verified Location: xx-> xx
End of PFlash Example!
FRDM-MCXA287
Hardware requirements
Type-C USB cable
FRDM-MCXA287 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the LPC-Link USB port (P6) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Flash driver API tree Demo Application.
Initializing flash driver.
Flash init successfull!.
Config flash memory access time.
PFlash Information:
kFLASH_PropertyPflashBlockBaseAddr = x
kFLASH_PropertyPflashSectorSize = x
kFLASH_PropertyPflashTotalSize = x
kFLASH_PropertyPflashPageSize = x
Erase a sector of flash
Calling FLASH_EraseNonBlocking() API.
Calling FLASH_VerifyErase() API.
Successfully erased sector: xx -> xx
Calling FLASH_Program() API.
Calling FLASH_VerifyProgram() API..
Successfully Programmed and Verified Location: xx-> xx
End of PFlash Example!