FlexRAM not writable during Flash erase (FTFE_FCNFG->RAMRDY becomes 0)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FlexRAM not writable during Flash erase (FTFE_FCNFG->RAMRDY becomes 0)

653 Views
noperator
Contributor I

Hello,

I would like to use FlexRAM on K24FN1M0V as general purpose RAM, but I noticed that after initiating a Flash mass erase, attempting to write to the FlexRAM leads to a hard fault. After the mass erase is finished, the RAM is accessible again, but it is erased to 0xFF.

I found in K24P144M120SF5RM Section 29.4.10.9:

The EEERDY and RAMRDY bits are clear during the Read 1s All Blocks operation and
are restored at the end of the Read 1s All Blocks operation

Is the same true for the 'Erase All Blocks' command? It is not documented.

Is there any way to prevent this so that FlexRAM can be used as general purpose RAM?

Thanks,

Ivan

0 Kudos
Reply
2 Replies

629 Views
jay_heng
NXP Employee
NXP Employee

From RM: The Erase All Blocks operation erases all flash memory, initializes the FlexRAM, verifies all memory contents, and releases MCU security.

so it is the same true for the 'Erase All Blocks' command.

FlexRAM is part of FTF flash controller, it will always be effected by FTF operation.

0 Kudos
Reply

626 Views
noperator
Contributor I

Thanks for the confirmation, Jay. It would have been nice if the FTF left this RAM alone except for the 'Program Section' operation, but I understand it's a hardware limitation. I will stick to using the main RAM only.

0 Kudos
Reply