The program runs normally with a debugger, but the program runs flying without a debugger

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

The program runs normally with a debugger, but the program runs flying without a debugger

ソリューションへジャンプ
1,461件の閲覧回数
SethWang
NXP Employee
NXP Employee

Hi,

Using S32K312, I found that when debugging on FLASH with a debugger, the program ran normally. Without a debugger, when running the ADC to initialize the operation on the MCR registers, the program runaway. After doing some debugging, I found that when operating the registers of PWM or SPI without a debugger, the program will also runaway, but with a debugger, the program runs normally.

The program are all running on FLASH, I don't know the difference between with and without a debuger? Do you know why the program runaway without a debugger?

Thank you

0 件の賞賛
返信
1 解決策
1,437件の閲覧回数
SethWang
NXP Employee
NXP Employee
Thank you.
The reasons is the configuration problem of PLL .The problem has solved.

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,453件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @SethWang,

What does it actually do? Do you see a fault exception or a system reset?

The debugger can typically disable the WDOG or initialize SRAM ECC.

Can you double-check the SRAM ECC?

 

Thanks,

BR, Daniel

0 件の賞賛
返信
774件の閲覧回数
anakha
Contributor III
how can I check them without debugger?
My app also runs OK with debugger but goes to hard fault handler but I am not sure.
I put below code to my app and my test rgb led goes to red(error).

void HardFault_Handler(void)
{
set_rgb_status(ERROR);
while(TRUE){};
}
0 件の賞賛
返信
767件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @anakha,

What debugger do you have?

Multilink can be attached to the running MCU stuck in the exception handler.

danielmartynek_0-1713256703869.png

 

Make sure the clocks are configured precisely to one of the clock options.

RM, 24.7.2 System clocking configurations

 

Regards,

Daniel

 

0 件の賞賛
返信
1,438件の閲覧回数
SethWang
NXP Employee
NXP Employee
Thank you.
The reasons is the configuration problem of PLL .The problem has solved.
0 件の賞賛
返信
848件の閲覧回数
DouDou1
Contributor III

Can you tell me how you solved the problem?

0 件の賞賛
返信