Embeddded PPC - V2Pro - Interrupts

Dear All,

I am looking into the possibility of running nested interrupts.

Effectively what I have at the moment is a single thread of control and an external non critical irpt which does some comms stuff.

I now want to add a critical interrupt handler but what would happen if I was executing my non-crit handler and the crit irpt went off. I am under the impression that I need to complete my handler before the other one would start.

There is a query like this on the Xolinx web page but it is a one sentence, non-helpful answer.

Thanks In Advance

Reply to
Voxer
Loading thread data ...

The PowerPC Reference Manual contains the following information:

Critical and Noncritical Exceptions

The PPC405 supports critical and noncritical exceptions. Generally, the processor responds to critical exceptions before noncritical exceptions (certain debug exceptions are handled at a lower priority). Four exceptions and their associated interrupts are critical:

? Critical-input exception. ? Machine-check exception. ? Watchdog-timer exception. ? Debug exception.

Critical interrupts use a different save/restore register pair (SRR2 and SRR3) than is used by noncritical interrupts (SRR0 and SRR1).

This enables a critical interrupt to interrupt a noncritical-interrupt handler.

The state saved by the noncritical interrupt is not overwritten by the critical interrupt. Because a different register pair is used for saving processor state, a different instruction is used to return from critical interrupt handlers?rfci.

This is covered in Chapter 7. The manual can be found here:

formatting link

Reply to
drdoom_97

Doom,

Thanks for your reply.

Following my post I did a bit of reading and covered the chapter on exceptions and interrupts which suggested that it was possible due to the bits which are lefted enabled in the MSR depending on wether it is a crit or non-crit irpt.

Your response confirmed this so I am now confident about implementing it.

Just goes to show though that you can get better answers on these boards than the so called 'help' on the Xilinx website.

Thanks

Vox

Reply to
Voxer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.