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

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

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

1,968 Views
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 Kudos
Reply
5 Replies

1,063 Views
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 Kudos
Reply

1,549 Views
xuewenchen
Contributor I

hello 浩文 

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

0 Kudos
Reply

1,961 Views
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 Kudos
Reply

1,957 Views
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 Kudos
Reply

1,951 Views
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 Kudos
Reply