Debugger Stuck at an interrupt Handler

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

Debugger Stuck at an interrupt Handler

313 Views
snow3847
Contributor II

Hi,

So i have this problem that when i debug the debugger is stuck at the PDB_DRV_ClearTimerIntFlag() function which is called here : 

void PDB1_IRQHandler(void)
{
/* Clear PDB instance Interrupt flag */
PDB_DRV_ClearTimerIntFlag(INST_PDB_1);
}

I cannot go beyond this point and not even in the while() loop. I suspect that the problem is in the Optimization (-O3) because i have many time critical functions the software cannot clear the flag as fast(just my theory). I have also tried with -O0 but smae result. The reason i suspect this is because i worked once when i tried with -O3 level but not anymore after that(But maybe that is just a lucky strike). So how can i fix this problem?

I am using a s32k144 Microcontroller and a s32 Design studio version 3.5 as well as the intern PE Micro Debugger.

i will attach snippets below as well as the clock configuration.

snow3847_0-1744796118336.png

the main : 

snow3847_1-1744796203421.png

Clock Config:

snow3847_2-1744796230260.png

Best regards and Thank you 

 

 

0 Kudos
Reply
3 Replies

294 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @snow3847,

Please refer to the release notes of the SDK you use.

There is a list of compiler option that must be used, otherwise we cannot guarantee the functionality of the SW.

This is from S32SDK_for_S32K1xx_RTM_4.0.2_ReleaseNotes.pdf

danielmartynek_0-1744813178279.png

 

Regards,

Daniel

0 Kudos
Reply

216 Views
snow3847
Contributor II
Hi @danielmartynek,

So i tested a bit more and changed the Optimization Level to the recommended one which is in my case -O1 but nothing changed and i still have the same problem. I also maybe it could be a clock configuration problem as i rechecked that the right packages and sdk are correctly installed. The only thing that may be different is that in my previous project the Clocks Version was v11.0 and now somehow v9.0. although the clock Config is the same for both projects(I don't know if that is a problem). I honestly out of ideas as to why this is occuring and if you could think of any other cause please let me know.

PS: i have also an inconsistent debug behaviour also in the I2C initialization and in both functions the following sub function seems to be the problem as the debugger stopps here : CLOCK_SYS_GetFreq().

Regards,
Yassmine
0 Kudos
Reply

175 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @snow3847,

Which SDK revision is it?

 

0 Kudos
Reply