2388814_en-US

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

2388814_en-US

2388814_en-US

[secureboot] S32K14X 37.5.8.4 Allowed simultaneous flash operations

Dear NXPs

S32K-RM.pdf  

37.5.8.4 Allowed simultaneous flash operations

Prophet_Samuel_0-1782888009624.png

Prophet_Samuel_2-1782888105980.png

Based on the figure above, there is a **race condition** between CSEc and P-Flash read operations (as indicated by the red box).

Therefore, when calling `CSEC_DRV_VerifyMAC` from P-Flash, should the following workarounds be applied?

1. **Disable interrupts** before invoking `CSEC_DRV_VerifyMAC`, and **re-enable interrupts** after the function returns.

2. **Relocate `CSEC_DRV_VerifyMAC` to RAM** for execution (i.e., run the function from RAM rather than P-Flash).


Re: [secureboot] S32K14X 37.5.8.4 Allowed simultaneous flash operations

Hi @Prophet_Samuel 

Something similar was already discussed here:

https://community.nxp.com/t5/S32K/use-CSEC-DRV-GenerateMACAddrMode-to-generate-CMAC-but-occurs/m-p/1...

It is sufficient to disable interrupts because CSEc driver in SDK already executes critical part of the code from RAM.

And there's one more thing - there's a difference between CSEC_DRV_VerifyMAC and CSEC_DRV_VerifyMACAddrMode (and CSEC_DRV_GenerateMAC and CSEC_DRV_GenerateMACAddrMode). 

Only the pointer method (that's terminology from S32K1 reference manual. SDK API uses "addr mode") does not allow program flash access during the execution. Normal non-pointer method does not have such limitation. 

Regards,

Lukas


Tags (1)
No ratings
Version history
Last update:
Thursday
Updated by: