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.

AM3358: Nested Interrupt

Part Number: AM3358

Hi Team, 

I got the following request, but I'm not sure about the correct part number. The customer sent me AM3558. Please see the request below:

I implement a firmware on the PRUs from a Sitara SoC series am355x. I have a few questions about this and would ask you to pass them on to a responsible person who could help me with this.

I use BeagleBoneBlack with a soldered JTAG header, Code Composer Studio v10 and the PRUC compiler 2.3.3. I debug bare-metal (without running Linux operating system) using the XDS110 debug sample.

I need to read out an input pin in my program with the frequency of 3MHz and do other tasks in the time between the respective pin accesses – what is the best option to realize this?

Is it possible to configure a timer interrupt (as known from arm processors) that interrupts other tasks and executes an interrupt routine? Or are there other solutions?

I got familiar with the IEP timer and looked at the example from the pru software support package (PRU_IEP.c). When I executed this code, it got stuck in the while loop (line 79) – I found that the interrupt was not passed from the INTC to the 31st bit of the __R31 register. In search of a solution, I enabled Host0, the 7th system interrupt and the global host interrupt (in registers: HERE, ESR0 and GER), but it still did not work. What could be my mistake?

Thanks 

Jan

  • Jan,

    I believe your customer was referring to AM335x. I'll pass this on to our PRU expert.

    Regards,

    Jianzhong

  • Hello Jan,

    The PRU-ICSS on AM335x does not allow interrupts to preempt running code. That allows the PRU software to be completely deterministic. Note that processors with a PRU_ICSSG (AM65x, AM64x) have a task manager that does allow for code preemption. The customer will need to manually poll __R31 to see if the interrupt bit has been set.

    We provide an example of sending and receiving an interrupt with the PRUs in our PRU Software Support Package:
    https://git.ti.com/cgit/pru-software-support-package
    see examples/am335x/PRU_Direct_Connect0 and PRU_Direct_Connect1.

    AM335x assembly instructions almost all take 1 PRU clock cycle, except for the reads (e.g., LBBO). Since the PRU runs at 200MHz on AM335x, each instruction will take 5ns. The customer can use that information in figuring out how many instructions they can implement between polling the PRU GPI pins every 3MHz. See app note PRU Read Latencies for more:
    https://www.ti.com/lit/sprace8

    Regards,

    Nick

  • Hello Nick,

    thank you for your reply. It helped me in resolving the issue.
    To get the iep timer to generate the interrupt I had to map the Event 7 to Channel 1 and the channel1  to Host 1 in the pru-registers.

    Regards, 
    Aneta