MCUXpresso SDK Documentation

flexnvm_flexram

flexnvm_flexram#

Overview#

The flexnvm_flexram example shows how to use flash driver to operate flexram as traditional RAM:

Running the demo#

When the example runs successfully, you can see the similar information from the terminal as below.

  1. For parts with FlexNVM:

 FlexNVM FlexRAM Example Start
 Flash is UNSECURE!
 FlexRAM Information: 
 FlexRAM Base Address: (0xxx)
 FlexRAM Total Size: xx B
 Make FlexRAM available for traditional RAM
 FlexNVM FlexRAM Example Start
 Flash is UNSECURE!
 FlexRAM Information: 
 FlexRAM Base Address: (0xxx)
 FlexRAM Total Size: xx B
 Program the first 16 bytes memory space of FlexRAM as 10,11,12,13.
 Read 16 bytes data from start of FlexRAM space
 The first 16 bytes data in EEPROM are what we have progrommed before
 Read the first 16 bytes memory space of FlexRAM as10,11,12,13.
 Successfully Programmed Location xx -> xx

 End of FlexNVM EEprom example
  1. For Some parts Without FlexNVM (such as K65FN):

 FlexNVM FlexRAM example Start
 Current device doesn't support FlexNVM feature


 End of FlexNVM EEprom example

Supported Boards#

FRDM-KE15Z
Hardware requirements
  • Micro USB cable

  • FRDM-KE15Z board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB port on the board.

  2. Open a serial terminal with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

When the example runs successfully, the following message is displayed in the terminal

FlexNVM EEprom Example Start 

 Flash is UNSECURE!

 There is no available EEprom (FlexNVM) on this Device by default.
 Example is trying to configure FlexNVM block as EEprom.
 Perform a system reset 
 FlexNVM EEprom Example Start 

 Flash is UNSECURE!

 EEprom Information: 
 EEprom Base Address:	262144 KB, Hex: (0x10000000) 
 EEprom Total Size:	1 KB, Hex: (0x400)
 Program a buffer to a sector of EEprom
 Successfully Programmed Location 0x14000000 -> 0x14000010 

 End of FlexNVM EEprom Example 
FRDM-MCXE247
Hardware requirements
  • Micro USB cable

  • FRDM-MCXE247 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the PC host and the OpenSDA USB port on the board.

  2. Open a serial terminal with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the example.

Running the demo

When the example runs successfully, the following message is displayed in the terminal

FlexNVM EEprom Example Start 

 Flash is UNSECURE!

 There is no available EEprom (FlexNVM) on this Device by default.
 Example is trying to configure FlexNVM block as EEprom.
 Perform a system reset 
 FlexNVM EEprom Example Start 

 Flash is UNSECURE!

 EEprom Information: 
 EEprom Base Address:	262144 KB, Hex: (0x10000000) 
 EEprom Total Size:	1 KB, Hex: (0x400)
 Program a buffer to a sector of EEprom
 Successfully Programmed Location 0x14000000 -> 0x14000010 

 End of FlexNVM EEprom Example