System is getting stuck in hard fault on initialization of WD

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

System is getting stuck in hard fault on initialization of WD

1,659 Views
nitinverma
Contributor III

Hi,

I am trying to configure Watchdog module for S32K148 Controller with S32_SDK_EAR_0.8.3 SDK.

When we try to access watchdog register in WDOG_DRV_Init function, System is giving "Hard fault".

For few modules we got the same problem but it was resolved after enabling clock from PCC register for that module.

I tried to find PCC register for Watchdog but in 0.8.3 SDK but I didi't find it. 

Please See available clock source names in "S32K148_features.h" file.Please guide us to resolve this issue.

Thanks

Nitin verma

0 Kudos
5 Replies

1,135 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

The bus clock for WDOG is not gated, as you can see in Table 25-9. There is no PCC register for WDOG. So the problem must be somewhere else.  You may try to debug the Hard Fault as it is described in this document: https://community.nxp.com/docs/DOC-334902

 

Regards,

Daniel

0 Kudos

1,135 Views
nitinverma
Contributor III
Thanks Denial for your prompt response.
 
We have gone through your link. In S32_Sys->CFSR register, We are getting 0x00008200.(i.e. PRECISERR bit = 1 Data bus error has occurred)
 
Attaching screen shot for your reference.
 
Please let us know how can we solve this errors.
Thanks
Nitin. 
Wd_Reply.jpg
0 Kudos

1,135 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

CFSR[BFARVALID] is also set, so BFAR register holds a valid address that has caused the bus fault. To get the instruction that access the bus address, you need to get its PC address from the stack.

I don't have S32K148, so I cannot check the SDK example.

Regards,

Daniel

0 Kudos

1,135 Views
truongtranvan
NXP Employee
NXP Employee

Hello Nitin verma,

I ran the WDOG project example with S32_SDK_EAR_0.8.3 SDK  version with S23K148 chips, then no problem.

From the image you send, I see the project you created with S23K148 chip but when you run debug then you used S32K144 chip. -> That may be the cause of the current error.

Please help me to check it again.

Thank you very much!

0 Kudos

1,135 Views
truongtranvan
NXP Employee
NXP Employee

Wd_Reply.jpg

If possible, please send me your project? Let me check it?

Thank you.

0 Kudos