This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PRUSS and interrupt, general question

Other Parts Discussed in Thread: AM3359

Hi,

I'm evaluating a 3359 for an industrial application. I'm trying to figure out how to use the PRU interrupt controller (the interrupt controller described in chapter 6 in am335xPruReferenceGuide). What I would like to do is to have the PRU execute some arbitrary code and when an interrupt occurs, suspend that execution and handle the interrupt, in the same way as an ordinary processor running a real OS does.

However it seems that it is not possible. When binding system interrupts and interrupt channels to host 0 and 1 (figure 84 in am335xPruReferenceGuide) it seems that the only thing happening is that a bit in register R31 is set in the PRU when an interrupt occurs. After that the code in the PRU actively has to periodically check that bit. This is more like a polling function to see if any interrupt has occurd rather than an asynchrouneous event that suspends normal execution.

There is also a demo, PRU_PRUtoPRU_Interrupt, application in am335x_pru_package from TI. This demo application for how to send interrupts from one PRU to another indicates that a PRU actually has to poll for interrupts rather than actually be assynchrouneously interrupted, in the normal way when talking about interrupts.

I'd just like to have this confirmed by someone with a litle more experience from the am3359. Or if it is possible to have an interrupt service routine, written in assembly and executed locally on the PRU, please tell me where to find that documentation.

Br Håkan

  • Hakan,

    I think your analysis is correct. There are no ISRs... Obviously this is feature of PRU architecture and not the case that someone forgot about interrupts...

    Really to keep the strict real-time capability of PRU programming I think it was decided to have PRU poll for events only. This way it is up to the programmer when to do this and one can implement the most efficient way of checking and reacting to outside events. As the PRUs are usually dedicated to a very specific task and not targeted for any kind of multi-processing or threading I assume this is ok.

    I hope that helps.

    Regards.

  • Hi Frank,

    Yes, it helped, and I agree it seems to be a design-choice. Justed wanted to make sure that I got it right.

    Thanks for the quick reply.

    br Håkan