s32k322 boot issue

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

s32k322 boot issue

327 Views
YongxiangLi
Contributor I

Hi

  We encountered an anomaly while developing with the S32K322 microcontroller using RTD version 6.0.0. To eliminate interference from upper-layer application code, we created a blank S32K322 project, compiled it, and successfully flashed it to the target board. However, we observed that when the assembly code for disabling WDG0 (Watchdog 0) is executed in the startup code, the chip immediately triggers a HardFault exception. Upon investigation, we found that the memory address range 0x404800 to 0x414000 is entirely filled with 0xFFFFFFFF. Interestingly, when the assembly code for disabling WDG0 is removed, the data in that memory region returns to normal. We would greatly appreciate any assistance in providing a solution or further troubleshooting suggestions.

 

Best regards.

Yongxiang Li

Tags (3)
0 Kudos
Reply
8 Replies

281 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @YongxiangLi,

Can you share the blank project along with the binary so that I can test it?

 

Thank you,

BR, Daniel

 

0 Kudos
Reply

266 Views
YongxiangLi
Contributor I

Hi @danielmartynek 

Additional context: once we removed the code that disables WDG0, the MCU boots fine. However, connecting a debugger still frequently triggers a hard fault — we suspect a possible watchdog timeout, but we aren't 100% sure. Hopefully this helps with the analysis.

Best regards.

Yongxiang Li

0 Kudos
Reply

270 Views
YongxiangLi
Contributor I

Hi, @danielmartynek 

  Thanks for your reply, here is the blank project generated by S32DS with RTD6.0.0.

 

Best regards

Yongxiang Li

 

0 Kudos
Reply

245 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @YongxiangLi,

Is HSE_FW installed on the MCU?

Do you have more MCU/boards that can replicate the problem?

 

Thank you

0 Kudos
Reply

89 Views
YongxiangLi
Contributor I

Hi @danielmartynek ,

HSE_FW is not installed on MCU, the Reset_Handler in Project_Settings/Startup_Code/startup_cm7.s is the entry of MCU. The problem is replicated on all our s32k322 MCUs.

Best regards

Yongxiang Li

0 Kudos
Reply

304 Views
YongxiangLi
Contributor I

The 0xFFFFFFFF which filled in range 0x404800 to 0x414000 also cause init_data_bss load error, the len will be recognized as 0xffffffff and MCU boot will be failed.

YongxiangLi_0-1781071691759.png

 

0 Kudos
Reply

312 Views
db16122
Contributor III

watchdog may protect the memory area to be erase by mistake. Enable the watchdog can make MCU under protection

0 Kudos
Reply

306 Views
YongxiangLi
Contributor I

Thanks for your reply! The watchdog is closed by the start code in Project_Settings/Startup_Code/startup_cm7.s rather than by my logic. When the MCU do 'ldr r0, =0x40270000', MCU falls into hard fault.

YongxiangLi_0-1781071083832.png

 

0 Kudos
Reply