Part Number: AM3358
Is it possible for code in the AM335x PRU to identify which particular PRU (PRU0 or PRU1) it is running in?
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.
Part Number: AM3358
Is it possible for code in the AM335x PRU to identify which particular PRU (PRU0 or PRU1) it is running in?
Hi Damon,
There is no PRU hardware feature to enable this. However, there is a software trick that is commonly used.
Before running the firmware, you can have the ARM write a '0' into PRU DRAM0 and '1' into the same address in PRU DRAM1. The firmware can then read this address (using the PRU local data memory map or constant table) to identify whether it's running on PRU0 or PRU1.
Regards,
Melissa