Hard Fault in S32K312 while doing Sector Erase and Write

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

Hard Fault in S32K312 while doing Sector Erase and Write

552 Views
ArifJ
Contributor I

Hello Everyone i am facing one anonymous issue in the bootloader while doing sector erase and write in S32K312 Controller  
i will  explain what are things i have done till now ,

1)i moved all 4 functions of C40Ip driver .srambss section (sector erase ,status,write,write status )
2)for bootloader i allocated 128KB in which hardly i am using 70KB and from next 128KB the Application will start which is 0x00420000

After all these it is working fine i am able to erase and write but with some delay after erase and write in the same block write and erase Now if i am making any changes in the bootloader like i added just 1.c and 1.h file where i am not calling any one of the function from that .c file in the bootloader but suddenly if i add that .c file it is hitting hardfault for erase and write .

i don't what kind of behaviour is this but if i make any changes which are not related to write or erase still it is hitting hard fault 

Please Help and support me in this issue ASAP

Thank You ,

0 Kudos
Reply
1 Reply

509 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @ArifJ,

You need to debug the fault exception, find the fault instruction, type of the exception etc.

https://community.nxp.com/t5/S32K-Knowledge-Base/How-To-Debug-A-Fault-Exception-On-ARM-Cortex-M-V7M-...

https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K312-HARDFAULT-Handling-Interrupt-DS3-5-...

https://community.nxp.com/t5/S32K-Knowledge-Base/Fault-handling-on-S32K14x/ta-p/1114447

 

The C40_Ip code should be in the .ramcode section.

https://community.nxp.com/t5/S32K/S32K344-C40-IP-Hardware-Fault-Problem/td-p/1697432

 

Due to limited resources, we are currently unable to support customers writing from generic email accounts such as gmail.com or qq.com or similar. Please ensure that you use your company email address when communicating with NXP so that we can prioritize your question accordingly. Thank you for your understanding.

 

Regards,

Daniel

0 Kudos
Reply