MPC8548 ISR throws exception

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

MPC8548 ISR throws exception

1,092 次查看
Sreekant
Contributor I

Hello,

 

We are using a powerQuicIII MPC8548 processor which is configured to have two external interrupts via the PIC. Within the ISR, we perform two actions.

:smileyinfo: Start a Decrementer

(ii) Invoke a function to do some specific processing.

 

When the above two steps are performed, after several iterations (random), the system crashes within the ISR with a program exception. We replaced the existing function with a dummy function that has an asm("nop") and returns and the problem still exists.

However, whenever I do step (ii) without step(i), it seems to work fine. The decrementer is started for 1ms and should not fire while the function itself is executing(after profiling, function takes roughly 5-10us to complete execution).

The crash only happens after running for few seconds and several iterations.

 

Any pointers in this regards would be appreciated.

 

Thanks

Sreekant

0 项奖励
1 回复

611 次查看
TomE
Specialist II

What is causing the exception?


Assuming I have the right manuals for your chip, check the E500 Core Manual, "Table 5-17. Program Interrupt Exception Conditions". The list of causes is there. It also documents that "SRR0, SRR1, MSR, and ESR are updated" and checking those registers should show the code and the reason for the "crash".

When you say "Start a Decrementer", I thought this CPU only had one of those. Are you operating on *THE* decrementer, or are you using that word to refer to something else? If you're using *THE* Decrementer, make sure nothing else in the system is, and also read up on the Decrementer. Is the Decrementer interrupt enabled?

If the Decrementer interrupt is causing the crash, then maybe something in your system is stretching the execution time of that function every few seconds. Try measuring the maximum execution time of that function using the Timebase and see if it gets slower sometimes.

Tom

0 项奖励