Dear NXPs:
ARCH:S32K142
OS:None
IDE:IAR arm 9.32.2
Bootloader- D-Flash-32K
Background Reference:Solved: Re: [Security] D-Flash CSE driver encryption/decryption interface limitations - NXP Communit...
CSEc Driver uses S32K SDK driver.
After executing the encryption and decryption interface multiple times, a Hardfault error occurred.
IHPRECISERR = 1
FORCED = 1
Test code:The encryption and decryption are called every 24ms, and a hardFault occurs after 42 executions.
Q:It is speculated that it is related to the RAMization of the CSEC Driver function. How can I solve this problem?
已解决! 转到解答。
Dear NXPS:
After executing S32_SCB->ACTLR |= S32_SCB_ACTLR_DISDEFWBUF_MASK;, the Hardfault type is determined.
Sat Jul 20, 2024 11:26:34: HardFault:
Sat Jul 20, 2024 11:26:34: Forced escalated exception
Sat Jul 20, 2024 11:26:34: BusFault fault:
Sat Jul 20, 2024 11:26:34: Precise data error
Sat Jul 20, 2024 11:26:34: BFAR is valid
Sat Jul 20, 2024 11:26:34: Fault address BFAR: 0x12
Sat Jul 20, 2024 11:26:34: PC 0x10000b12
Sat Jul 20, 2024 11:26:34: SP 0x20002f50
Sat Jul 20, 2024 11:26:34: LR 0xffffffe9
Sat Jul 20, 2024 11:26:34: Vector table: 0x1fffc000
Sat Jul 20, 2024 11:26:34: Stopped by a vector catch:
Sat Jul 20, 2024 11:26:34: BusFault fault escalated into HardFault
Sat Jul 20, 2024 11:26:34: The BusFault handler is disabled
Sat Jul 20, 2024 11:26:34: HardFault exception.
Sat Jul 20, 2024 11:26:34: The processor has escalated a configurable-priority exception to HardFault.
Sat Jul 20, 2024 11:26:34:
Sat Jul 20, 2024 11:26:34: A precise data access error has occurred (CFSR.PRECISERR, BFAR)
Sat Jul 20, 2024 11:26:34: At data address 0x12.
Sat Jul 20, 2024 11:26:34:
Sat Jul 20, 2024 11:26:34: Exception occurred at PC = 0x100012ce, LR = 0x10000ee1
Sat Jul 20, 2024 11:26:34:
Sat Jul 20, 2024 11:26:34: See the call stack for more information.
As mentioned above, looking forward to your help.