S32K3 HardFault Error

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

S32K3 HardFault Error

750 Views
LZY
Contributor II

Hello, I'm currently encountering a hardfault situation during the development process. The compilation is successful, but as soon as it runs, it enters the hardfault function.
I tried two approaches to solve it, but I didn't find the root cause of the problem.


Approach one: Move some global variables to ".dtcm_data",
eg.

__attribute__((section(".dtcm_data"))) Service_SocComm_TxSubCmd_t AppTxSub_0xDB_Cmd[] =
{
    TX_SUBCMD_STRUCT(MCU_SOC_0XDB01_CMD,FRAME_TYPE_IMMEDIATELY,ACK_NO,200u,0u,0x00u),
};


Method Two: Remove the const modifier from some global variables that were originally defined as const.
Could you please infer the cause of the problem?thanks

Labels (3)
Tags (1)
0 Kudos
Reply
1 Reply

677 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

In order to resolve hard fault you can simply follow the guide we have posted:

https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/S32K%40tkb/128/1/How%20To%20Debug%20A%20...

Best regards,

Peter

0 Kudos
Reply