s32k144 CSEc usage

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

s32k144 CSEc usage

1,956 Views
JyotiRanjan
Contributor II

Hi is it necessary to do partition of flexNVM for CSEc usage and key generation?

0 Kudos
5 Replies

1,861 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @JyotiRanjan,

If you use PE Micro, you can preserve the partitioning:

danielmartynek_0-1618323690208.png

danielmartynek_1-1618323735181.png

 

Regards,

Daniel

1,849 Views
JyotiRanjan
Contributor II

Thanks a lot sir,

Now I am getting my partition even though I change in my code.

But I faced one problem is that if change my code and just try to read last written data I am getting 

255U in every byte. So my question is is there anything I have to do.

I am attaching my main.c file please have a look on that and guide to solve the issue.

 

0 Kudos

1,833 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @JyotiRanjan,

Please read the SIM_FCFG1[DEPART] register to see if the partitioning has been reserved.

If so, do not call the FLASH_DRV_EraseAllBlock() and FLASH_DRV_DEFlashPartition() function again.

The FlexRAM contains all the valid EEPROM data when the FTFC_FCNFG[EEERDY] flag is set.

 

Regards,

Daniel

1,873 Views
JyotiRanjan
Contributor II

Thanks a lot,

I understood sir, please help me some new problem I faced, I am using E-Flash in my project.

 I did,

       EEEDataSizeCode = 0x02u: EEPROM size = 4 Kbytes
       DEPartitionCode = 0x03u: EEPROM backup size = 32 Kbytes.

It is working fine , after power off also i am getting my data. Till this I completed.

My problem is , if i change anything in my code, I loose EEPROM partition and data. 

I have to do partition again. 

If I am not changing anything everything ok. So how to deal with this ,

ret = FLASH_DRV_DEFlashPartition(&flashSSDConfig, 0x02u, 0x03u, 0x0u, false, true);
DEV_ASSERT(STATUS_SUCCESS == ret);

/* Re-initialize the driver to update the new EEPROM configuration */
ret = FLASH_DRV_Init(&Flash_InitConfig0, &flashSSDConfig);
DEV_ASSERT(STATUS_SUCCESS == ret);

/* Make FlexRAM available for EEPROM */
ret = FLASH_DRV_SetFlexRamFunction(&flashSSDConfig, EEE_ENABLE, 0x00u, NULL);
DEV_ASSERT(STATUS_SUCCESS == ret);

please  help me how to solve and if u have any example for only EEPROM backup attach the link also.

Thank you. 

0 Kudos

1,943 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Yes, it is.

Please refer to

AN5401, Getting Started with CSEc Security Module

https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/s32k-automotive-mc...

danielmartynek_0-1609845025454.png

Regards,

Daniel