S12Z problems with Timer Interrupt in Flash Mode

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

S12Z problems with Timer Interrupt in Flash Mode

626 Views
philphilips
Contributor I

Hi,

i have problems with the Timer Interrupt when I start the code from flash.

In debug mode or when I put the code without debugging into ram it works fine.

When I flash the device the timing isn't correct anymore. The Timer Interrupt triggers too early. That is no problem. I can handle it. But the timer interval is not constant. It looks like it is varying about more the 5 cycles. In RAM-Mode it is much better.

I dont use other Interrupts. I have build the code with processor expert. Watchdog is off.

Best regards,

Phil

Tags (1)
0 Kudos
Reply
1 Reply

423 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Phil,

 

What do you mean by 5 cycles, bus clock cycles/timer counter cycles? And what function of timer do you use? Also, you didn’t mention the S12Z derivative.

 

In general, when an interrupt is recognized, the CPU responds upon completion of the instruction that is currently being executed. So, the Interrupt latency varies according to the number of cycles required to complete the current instruction. See Chapter 8 Instruction Execution Timing of the CPUS12Z_RM.

Can you share a test project so I could test it both, from Flash and RAM?

 

Regards,

Daniel

0 Kudos
Reply