Hello,
I am studying the AM335x Technical Reference Manual and I am particularly interested in using the PRU unit from Linux, since I need to perform different tasks based on different real time events (GPIO state changes and UART or SPI).
For example:
GPIOxx input state changes → handle interrupt and perform task from Linux.
UART0 rx buffer is full → handle interrupt and perform task from Linux.
From page 225 I read that PRU-ICSS can handle various interrupts (GPIOs, UART and SPI if I am not wrong) and at the following link PRU Linux API Guide example code we have a short demo which shows how to use PRU from Linux. The code loads the binary file PRU_example.bin into the PRU and so waits for the interrupt.
So I have a few questions:
1 ) Suppose I need to handle GPIO and UART (or SPI) interrupts separately . Do I need one program and one binary PRU file (e.g. PRU_example.bin) for each interrupt handling ?
2 ) How to use SPI from PRU ? I don't understand what is the proper section of chapter 4 of AM335x Technical Reference to focus on.
Thank you in advance.
Simon