S32 download program can run in debug and cannot be run offline

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32 download program can run in debug and cannot be run offline

1,381 次查看
Alien浩文
Contributor I

使用S32的Debug功能可以在开发板上运行程序,功能正常,但是断开JTAG连接后,重新供电,程序不会运行。使用J-Flash下载程序,也无法运行。请问如何解决?

Google Translate:

The Debug function of S32 can be used to run the program on the development board, and the function is normal. However, after the JTAG connection is disconnected and the power is supplied again, the program will not run. Using J-Flash to download the program can not run.How to solve this problem?

0 项奖励
5 回复数

476 次查看
Florijan
Contributor III

Hi Alien!

Sorry for the late response. I had the same issue and I found out that the problem is the NMI interrupt which is sometimes triggered after reset in standalone mode but not in debug mode with probe connected. The walkaround I've used is to simply add disable NMI interrupt instruction in NMI interrupt rutine itself (in my case it is located in a file "events.c":

void Cpu_OnNMI(void)
{
SIM_SOPT0=SIM_SOPT0 & ~SIM_SOPT0_NMIE_MASK; // here you disable NMI interrupt
}
 
Best regards,
Florijan
0 项奖励

962 次查看
xuewenchen
Contributor I

hello 浩文 

我遇到了和你同样的问题 请问你解决了吗?

0 项奖励

1,374 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

 

are you able attach into running program and see what's going on? Anyway, what's your MCU? 

jiri_kral_0-1602585539047.png

 

 

 

0 项奖励

1,370 次查看
Alien浩文
Contributor I

I can see what happened because the program can run normally in the debug state, but after exiting debug and resetting it, it cannot work or even change the state of a G P I O

ARM :S 9 K E A Z 128

DEBUG :s e g g e r J-Link Debugging

 

0 项奖励

1,364 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

what about attach to running target? At last you can see on which address is program stuck - some unhandled interrupt or exception? 

0 项奖励