using CSEC_DRV_GenerateMACAddrMode calculate CMAC error for DFLASH data in S32K148

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

using CSEC_DRV_GenerateMACAddrMode calculate CMAC error for DFLASH data in S32K148

跳至解决方案
10,245 次查看
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?

标记 (1)
0 项奖励
回复
1 解答
10,219 次查看
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 项奖励
回复
3 回复数
10,220 次查看
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 项奖励
回复
10,195 次查看
yangyong1
Contributor I
thank you very much.
0 项奖励
回复
10,244 次查看
yangyong1
Contributor I
the MCU is S32K148
0 项奖励
回复