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.

Linux/PRU-CGT: Beaglebone: RPMsg not working on PRU1

Part Number: PRU-CGT

Tool/software: Linux

Hello,
I have problems with receiving remoteproc messages on PRU1 on Beaglebone Black. The code works fine when configured and executed on PRU0, but PRU1 never receives any interrupts from Linux kernel (event numbers set for each PRU accordingly).
I modified examples PRU_RPMsg_Echo_Interrupt0 and PRU_RPMsg_Echo_Interrupt1 to flip I/O pins with LEDs whenever interrupt comes.
On PRU0 example works as expected. Each time a message comes, the LED switches state. However, example for PRU1 behaves like it never receives any interrupts from ARM host. In my application I'm using interrupts to signal PRU1 from PRU0, and hey work fine, so INTC is configured and is functional.
Has anybody had similar issue?
I'm running kernel 4.14.94-ti-r93 on Debian Image 2019-01-27, with PRU tools installed by ti-pru-cgt-installer  2.1.5-0rcnee1~stretch+20180514
Regards,
Jacek.
  • Hi,

    This forum supports only the AM335x Processor SDK (www.ti.com/.../PROCESSOR-SDK-AM335X ) released by TI. Debian is a community release, supported on www.beagleboard.org Please direct your question to them.
  • Thank you for your answer, but debian package is just a wrapper, which installs TI's code generation tools for PRU. If this is not the right forum to ask questions about the CDT, could you please direct me to the more appropriate place to ask question about this product from TI?
  • ello Jacek,

    This PRU issue might be something we can help with - just keep in mind that I won't try to replicate any of your results on my side since you're using a non-TI operating system, and we may get to a point where it looks like a Debian vs SDK issue and you'll need to go somewhere else for more debug assistance.

    1) Have you checked that the unmodified examples PRU_RPMsg_Echo_Interrupt0 and PRU_RPMsg_Echo_Interrupt1 work as expected? Based on your version of Linux I'd use the most up-to-date version of the PRU Software Support Package (found at the git repo or under example-applications in Processor Linux SDK). Reference for getting those running is the RPMsg Quick Start Guide.

    2) FYI another way to debug in Linux without depending on hardware external to the processor is writing values to a known portion of the PRU's DRAM, for example:

    1
    2
    3
    4
    5
    #define TESTA    (*((volatile unsigned int *)0x100))
     
    main(void){
                  TESTA = 0xDEADBEEF;
    }

    Note that the absolute memory address is different than the memory address from the PRU’s perspective, e.g. TESTA is at 0x4a300100 when you are trying to look at it from the Linux command line on an AM335x. So you would probe the memory location using devmem2 0x4a30100

  • Nick,

    thank you for suggestions. I tried the PRU_RPMsg_Echo_Interrupt* examples with one tiny modification: Whenever an interrupt comes, I xor a bit in R30 to change status of an LED. The rest of the code is left unmodified. To make sure that the signalling works I also xor the bit just before entering the loop. PRU_RPMsg_Echo_Interrupt0 works as expected: it switches state when program starts, and every time a message comes. However on PRU1 (running PRU_RPMsg_Echo_Interrupt1) the debugging LED changes state only when the program starts.
    I asked for help on beagleboard list before posting here, but the only suggestion I've got was to check if the interrupts numbers are correct, what I did before resorting to ask on support fora.
  • Hello Jacek,

    One potential issue could be if you are trying to load the PRU firmware into the wrong cores. Please check that you are loading the correct core by inspect the names of the cores available to RemoteProc with a command like cat /sys/kernel/debug/remoteproc/remoteproc*/name .

    Regards,
    Nick
  • Hello Jacek,

    I hope everything is working on your end. I am marking this thread resolved.

    Regards,
    Nick