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.

Questions about PRU (Swpkg) and TI SDK7 AM335x

Other Parts Discussed in Thread: PRU-SWPKG

Hello,

I have few more questions about PRU and TI SDK AM335x on beaglebone black Hardware.

1. It is said  that for next SDK based on kernel 3.14 LTS, the beaglebone community code and TI code will be pretty much aligned for PRU. I want to know in which direction either in UIO driver side or RemoteProc driver side, PRU software will be aligned ?

2. After installing PRU package released on 30 june 2014 for TI SDK7, I find out that in Documentation "PRU-Package-v1.0-Manifest" pruss_rpmsg software name is also listed but in /drivers/rpmsg no such file or driver available and also no such patch available is in PRU-Swpkg that create pruss_rpmsg driver . Is it error in documentation or some files are missing in a PRU package?

3. In one of my project, I tried to get  SPI0 interrupt in PRU. I followed the example PRU_PRUtoARM_Interrupt. SPI peripheral Interrupt Status Register indicate event is generated, but I could not get in PRU. I use Interrupt Number 44 for McSPI0 as referenced in AM335x-PRU-Reference guide and map channel 1 to host channel 1. Is Interrupt number 44 is correct? Any solution? I tested GPIO0 Interrupt number 57, PRU get interrupt successfully in this case. (baremetal project on BBB)

4. It is written on TI wiki that I should change PRU.out file to rproc_pru0_fw so that pruss_remoteproc driver load the PRU program, but this syntax does not load the program and give error message. If I try rproc-pru0-fw, it seems to work.

5. With Remoteproc, the examples provided does not work out of the box e.g PRU_gpioToggle example when try to load out the box gives following messages
            pruss-rproc 4a300000.pruss: creating platform devices for PRU cores
[ 22.020163] remoteproc0: 4a334000.pru0 is available
[ 22.025573] remoteproc0: Note: remoteproc is still under development and considered experimental.
[ 22.035184] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[ 22.095168] pru-rproc 4a334000.pru0: booting the PRU core manually
[ 22.133999] remoteproc0: powering up 4a334000.pru0
[ 22.182005] pru-rproc 4a334000.pru0: rproc_boot failed
[ 22.223568] pru-rproc: probe of 4a334000.pru0 failed with error -12

But if I include header file <rsc_table_am335x_pru.h>, the following messages appears
[ 22.276970] remoteproc1: 4a338000.pru1 is available
[ 22.282277] remoteproc1: Note: remoteproc is still under development and considered experimental.
[ 22.291839] remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[ 22.324978] pru-rproc 4a338000.pru1: booting the PRU core manually
[ 22.357013] remoteproc1: powering up 4a338000.pru1
[ 22.414664] remoteproc1: Booting fw image rproc-pru1-fw, size 28732
[ 22.422968] pruss-rproc 4a300000.pruss: configured system_events = 0x000000000f7e0000 intr_channels = 0x000000ff host_intr = 0x000000cf
[ 22.435990] remoteproc1: remote processor 4a338000.pru1 is now up
[ 22.442645] pru-rproc 4a338000.pru1: PRU rproc node /ocp/pruss@4a300000/pru@4a338000 probed successfully

I also tried PRU_Direct_Connect0 and Connect1 examples but no success
pruss-rproc 4a300000.pruss: creating platform devices for PRU cores
[ 9.060012] remoteproc0: 4a334000.pru0 is available
[ 9.065313] remoteproc0: Note: remoteproc is still under development and considered experimental.
[ 9.074957] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guarantee d.
[ 9.257162] remoteproc0: registered virtio0 (type 7)
[ 9.262707] pru-rproc 4a334000.pru0: PRU rproc node /ocp/pruss@4a300000/pru@4a334000 probed successfully
[ 9.329701] remoteproc1: 4a338000.pru1 is available
[ 9.335001] remoteproc1: Note: remoteproc is still under development and considered experimental.
[ 9.344622] remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guarantee d.
[ 9.635051] pru-rproc 4a338000.pru1: booting the PRU core manually
[ 9.672447] remoteproc1: powering up 4a338000.pru1
[ 9.738602] remoteproc1: Booting fw image rproc-pru1-fw, size 28732
[ 9.746755] pruss-rproc 4a300000.pruss: configured system_events = 0x000000000f7e0000 intr_channels = 0x000000ff host_intr = 0x000000cf
[ 9.759835] remoteproc1: remote processor 4a338000.pru1 is now up
[ 9.766459] pru-rproc 4a338000.pru1: PRU rproc node /ocp/pruss@4a300000/pru@4a338000 probed successfully
[   16.448776]  remoteproc0: powering up 4a334000.pru0
[ 16.493157] remoteproc0: Booting fw image rproc-pru0-fw, size 45560
[ 16.500311] pru-rproc 4a334000.pru0: [0] event 17 already assigned to channel 1
[ 16.508137] remoteproc0: Failed to process post-loading resources: -17
[ 16.515232] remoteproc0: rproc_boot() failed -17

6. For my application, I need to have user interaction between ARM and PRU to handle events and read/write data on memory e.g DDR. Any user space program will be helpful to understand to how events are handled and messages are communicated using remoteproc/rpmesg driver from userspace.

  • Hi Mussab,

    Your questions have been sent to the factory team. This thread will be updated when feedback comes.

  • Mussab Zubair1 said:
    1. It is said  that for next SDK based on kernel 3.14 LTS, the beaglebone community code and TI code will be pretty much aligned for PRU. I want to know in which direction either in UIO driver side or RemoteProc driver side, PRU software will be aligned ?

    We are going the remoteproc/rpmsg route. I believe the plan is to eventually phase out the uio driver completely, but to my knowledge that process has not yet begun in earnest.

    Mussab Zubair1 said:
    2. After installing PRU package released on 30 june 2014 for TI SDK7, I find out that in Documentation "PRU-Package-v1.0-Manifest" pruss_rpmsg software name is also listed but in /drivers/rpmsg no such file or driver available and also no such patch available is in PRU-Swpkg that create pruss_rpmsg driver . Is it error in documentation or some files are missing in a PRU package?
    This was supposed to be in there, but it missed the original deadline as it needs some additional work. This is on the roadmap, but I don't have an immediate ETA for the driver as of today.

    Mussab Zubair1 said:
    3. In one of my project, I tried to get  SPI0 interrupt in PRU. I followed the example PRU_PRUtoARM_Interrupt. SPI peripheral Interrupt Status Register indicate event is generated, but I could not get in PRU. I use Interrupt Number 44 for McSPI0 as referenced in AM335x-PRU-Reference guide and map channel 1 to host channel 1. Is Interrupt number 44 is correct? Any solution? I tested GPIO0 Interrupt number 57, PRU get interrupt successfully in this case. (baremetal project on BBB)
    Event 44 looks correct to me. Which steps did you take to program this? By my count you should have something like...

    HIEISR |= 1 << 1; //Enable host 1
    HMR0 |= 1 << 8; // Ch1 -> host 1
    CMR11 |= 1 << 0; // Evt44 -> Ch1
    SICR = 44; // Clear evt44
    EISR = 44; // Enable evt44
    GER = 1; // Enable global interrupts

    At this point you'd monitor R31[31] for the bit to go high signalling the interrupt. It sounds like you've figured this stuff out for the GPIO interrupt, but I'd like to make sure you've got something comparable to the above.

    Mussab Zubair1 said:
    4. It is written on TI wiki that I should change PRU.out file to rproc_pru0_fw so that pruss_remoteproc driver load the PRU program, but this syntax does not load the program and give error message. If I try rproc-pru0-fw, it seems to work.
    Thanks for pointing this out. We actually found this mistake yesterday and corrected the Wiki. It's suppose to use hyphens rather than underscores.

    Mussab Zubair1 said:
    5. With Remoteproc, the examples provided does not work out of the box e.g PRU_gpioToggle example when try to load out the box gives following messages [ ... ]
    Error -12 looks like the system ran out of memory (ENOMEM), and -17 is showing that the resources are already used. I'd remove the interrupt assignment from the second resource table header (for PRU1) and assign all ten as HOST_UNUSED. This will be corrected in the next release of the SWPKG.

    Mussab Zubair1 said:
    6. For my application, I need to have user interaction between ARM and PRU to handle events and read/write data on memory e.g DDR. Any user space program will be helpful to understand to how events are handled and messages are communicated using remoteproc/rpmesg driver from userspace.
    This is something we are hoping to have completed soon, but it's not 100% done today. I don't have any great suggestions for the short-term, but you could cobble something together using some of the uio features if necessary. That's probably the easiest/quickest stop-gap solution for now.

  • HI Tim,


    Thanks for valueable information regarding PRU.

    1. For SPI0 Interrupt, I tried steps you mentioned but no success. I am not sure why it works for GPIO0 but not for SPI0.  Any clue? Any other register which i need to enable to as i did power managment register for SPI0 and GPIO0.

    2. Do you have any expected release date for new PRU SWPKG?

    3. At the moment i am using linux kernel 3.8.13 because of stable uio_pruss driver support. But I want to use TI SDK 7. Do you have complete patches of uio_pruss for TI SDK7?

    Best Regards,

    Mussab Zubair 

  • Mussab,

    Mussab Zubair1 said:
    1. For SPI0 Interrupt, I tried steps you mentioned but no success. I am not sure why it works for GPIO0 but not for SPI0.  Any clue? Any other register which i need to enable to as i did power managment register for SPI0 and GPIO0.

    As sanity check, just to make sure SPI0 is setup correctly, have you tried to have SPI0 generate an ARM side interrupt?
    There is in the starterware a none OS based SPI example that you can build/load using CCS. You could use it for test purpose:
    http://processors.wiki.ti.com/index.php/StarterWare_McSPI

    Mussab Zubair1 said:
    3. At the moment i am using linux kernel 3.8.13 because of stable uio_pruss driver support. But I want to use TI SDK 7. Do you have complete patches of uio_pruss for TI SDK7?

    As far as I understand from Tim the uio_pruss driver will stay a community initiative and will not be provided as part of the Linux SDK.

    A.

  • Hi Mussab,

    I'm starting with PRU firmware development and actually need something very simple that will just work (will be loaded with pruss_remoteproc kernel module for start). I'm having the same issue as you had from your first comment in this post but I am unable to resolve it just based on previous comments.

    Were you able to build simple PRU FW that worked at the end? Is it possible you to share simple example in C that works for you?

    Thank you in advance!

    Aleksandar