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.

AM2434: Trying to trigger an interrupt from the PRU using the R31 register doesn't always work

Part Number: AM2434
Other Parts Discussed in Thread: TMDS243EVM

Hi,

I am using the TMDS243EVM board and want to use the sigma-delta converters of the PRU for controlling my system. The program flow is as follows:

  1. every second the R5 core triggers an interrupt and prints the current value from the shared memory to the console
  2. the PRU:
    1. waits until the interrupt of the R5 core is triggered
    2. starts the sigma-delta conversion
    3. writes the result to shared memory
    4. triggers an interrupt for the R5 core

According to the Technical Reference Manual (AM64x /AM243x Processors Silicon Revision 2.0Texas Instruments Families of Products) page 3132 the interrupt can be triggered by writing to the _r31 register of the PRU. During my tests I found that by doing that the interrupt is triggered only sporadically (see attached PRU main.c, function trigger_interrupt).

If I however set the interrupt status directly using the  ICSS_INTC_STATUS_SET_INDEX_REG register I never have problems with the generation of the interrupt from PRU to R5.

On my system I saw that the RAW_STATUS register of the INTC was not set correctly after writing the _r31 register, the ENABLE_REG and GLOBAL_ENABLE_HINT_REG registers were correct.

Am I doing sth. wrong here? As I understand it, there is no known issue and according to the documentation a write to the _r31 register should always trigger the interrupt.

I attached all files to reproduce the issue:

TriggerInterruptFromPRUSporadicError.zip

Best regards

André