using CSEC_DRV_GenerateMACAddrMode calculate CMAC error for DFLASH data in S32K148

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

using CSEC_DRV_GenerateMACAddrMode calculate CMAC error for DFLASH data in S32K148

Jump to solution
854 Views
yangyong1
Contributor I

Dear,

I want to using CSEC_DRV_GenerateMACAddrMode calculate CMAC for DFLASH data, but the return value is STATUS_ERROR. The code is CSEC_DRV_GenerateMACAddrMode(CSEC_KEY1, (const uint8_t *)0x10000000, 0x30d80, flash_ext_cmac_cal);

but I using the same KEY to calclate the PFLASH data is OK, the function can return STATUS_SUCCESS.

How to using the CSEC calculate CMAC for DFLASH data?

Tags (1)
0 Kudos
1 Solution
828 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

CSEC_DRV_GenerateMACAddrMode uses command CMD_GENERATE_MAC (pointer method) where the reference manual says:

lukaszadrapa_0-1663678309596.png

So, it cannot be used for DFlash. The only option is to use CSEC_DRV_GenerateMAC which uses normal CMD_GENERATE_MAC command.

Regards,

Lukas

View solution in original post

0 Kudos
3 Replies
829 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

CSEC_DRV_GenerateMACAddrMode uses command CMD_GENERATE_MAC (pointer method) where the reference manual says:

lukaszadrapa_0-1663678309596.png

So, it cannot be used for DFlash. The only option is to use CSEC_DRV_GenerateMAC which uses normal CMD_GENERATE_MAC command.

Regards,

Lukas

0 Kudos
804 Views
yangyong1
Contributor I
thank you very much.
0 Kudos
853 Views
yangyong1
Contributor I
the MCU is S32K148
0 Kudos