CSEc Working of S32K1

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

CSEc Working of S32K1

440 次查看
Kunal_Gettobyte
Contributor III

I am understanding working of CSEc peripheral to use CSEc operations of it efficiently.

In CSEc their is use of FTFC module for doing operations and we do flash memory partitioning. Flex NVM is partiononed into Emulated EEEROM and FlexRAM is partionined into Emulated EEERAM.

Now after erase keys, according to Docuemnt AN5401, page 23:

Kunal_Gettobyte_0-1742374304830.png

 

Meaning EEERAM size in FlexRAM is reset to 0 and EEEROM size in FlexNVM is configured back to data flash not to EEEROM.

So, if we want to check the flash memory configuration via Flash Configuration Register 1 in SIM Module, EEERAMSIZE should be set to 0 bytes( 0x1111) and DEPART bits value is set to default value( 0x1111).

Kunal_Gettobyte_1-1742374628968.png

Kunal_Gettobyte_2-1742374649382.pngKunal_Gettobyte_3-1742374670550.png

 

But when i erase the keys and see the register value of FCFG1, EEERAM size is still 0x02 meaning 4KB. Why is it so?? 

Kunal_Gettobyte_5-1742374908274.png

 

Let me know if my understanding is correct... basically i want to see the flash memory configurations and partioning status after and before the partioning of memory for CSEc.

 

 

 

 

0 项奖励
回复
1 回复

423 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Kunal_Gettobyte 

If you have brand new device or if you have a device where you just erased the keys, the state of DEPART bits is 0b1111 (notice that DEPART is updated after reset, not immediately after key erase) and state of EEESIZE is 0b0010.

So, if DEPART is 0b1111, the manual says: "Default value. FlexNVM not configured with a valid DEPART code"
EEESIZE is not important in this case.
Even if Emulated EEPROM is not used and user wants to use FlexNVM as normal data flash and FlexRAM is normal RAM, it's mandatory to run partition command anyway. After partitioning, both EEESIZE and DEPART will contain correct/expected values.

To check if the device is partitioned or not, read the DEPART only (DEPART = 0b1111 -> not partitioned).

Regards,
Lukas

0 项奖励
回复