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.

RTOS/AM5728: AM57xx-EVM

Part Number: AM5728

Tool/software: TI-RTOS

Hi,

Am trying to create GPIO interrupt based program using PRU on AM572x-EVM. But getting trouble to build project using PRU .

Am using CSL library for GPIO interrupt.  Am able to run program if am using CSL_xbarDspIrqConfigure or CSL_xbarIrqConfigure. But my requirement is to generate interrupt based on PRU so am using CSL_xbarPrussIrqConfigure to configure PRU interrupt for GPIO.

Am getting below error while build my project:

undefined first referenced
symbol in file
--------- ----------------
CSL_xbarPrussIrqConfigure ./main.obj
GPIOPinIntEnable ./main.obj
GPIO_config ./GPIO_drv.obj
Intc_Init ./main.obj
Intc_IntEnable ./main.obj
Intc_IntPrioritySet ./main.obj
Intc_IntRegister ./main.obj
Intc_SystemEnable ./main.obj

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "TestPRU.out" not built
gmake[1]: *** [TestPRU.out] Error 1
gmake: *** [all] Error 2

>> Compilation failure
makefile:140: recipe for target 'TestPRU.out' failed
makefile:136: recipe for target 'all' failed

Can i know how to achieve this. PRU example i found on SDK are without interrupt & also using GPIO which are directly attach to PRU unit. 

My main aim is to generate Interrupt on GPIO for DSP1 core using PRU.

Thanks 

geek13

  • Hi,

    It appears you didn't have corresponding library linked or these modules are not specified in your .cfg file. Can you upload your CCS project here?

    Regards,
    Garrett
  • I tried by adding specific library, but problem is libraries required are built for either A15 or C66x. I given an error while build as project i created for PRU.

    Kindly see below mention error for your reference. Like CSL_xbarPrussIrqConfigure is a part of ti.csl.aa15fg or ti.cl.c66x.

  • Hi Garrett,
    Is there any way to setup PRU to communicate with DSP core?. As per my understanding I need to run two applications, one of PRU core & another of DSP1 core and communication between these two cores is only possible with RPMsg. Correct me if am wrong at any stage.

    Will explain my application: we are using one 12bit, dual channel ADC @ 10MSPS for real time voltage and current measurement. With a clock of 10MHz, we want to capture the 12bit data (GPIOs, parallel) and use this data for DSP algorithms.
    Previously i made this application entirely on DSP1 core using CSL library, but am getting interrupt latency of approx 2usec.
    So someone from the TI forum suggest me to use the PRU unit to generate interrupts on DSP1. But am struggling right now to create such interface between PRU core & DSP core.

    Hope you get some clarity on an issue, kindly share your knowledge to overcome this problem.
    There is no interrupt latency for clock till 100KHz. But as I move further 2usec latency start showing on interrupt to trigger.

    Am having doubt whether PRU can resolve this issue or not or i need to explore other then this. If yes then procedure i mention above is right or i miss something.

    Thanks
    geek13
  • Hi geek13,

    RPMsg is mainly for ARM Linux communication with PRU. In the use case of DSP and PRU, you can implement the communication through interrupt and share memory.

    The ARM/PRU example on AM335x should still help -
    git.ti.com/.../PRU_ARMtoPRU_Interrupt

    git.ti.com/.../PRU_PRUtoARM_Interrupt

    And you can refer this to implement the DSP/PRU communication on AM572x.

    >> getting interrupt latency of approx 2usec
    The latency is from SYS/BIOS on DSP. Did he suggest you to trigger interrupt from PRU or capture data through PRU?

    Regards,
    Garrett
  • Hi Garrett,

    Thanks for your suggestions.

    Kindly see the below  thread we open on TI forum for more detail:

    https://e2e.ti.com/support/processors/f/791/t/796814?tisearch=e2e-sitesearch&keymatch=%20user:294338

     

    And am not able to open a link you provided above for PRU_ARMtoPRU_Interrupt  ==> git.ti.com/.../PRU_ARMtoPRU_Interrupt

    And trying to apply as you suggested, let you know soon.

    Thanks

    Geek13

  • Hi Garrett,
    Is there any example to use shared memory between cores??
    Regards
    Geek13
  • Hi Geek13,

    Try this again - git.ti.com/.../pru-software-support-package then look into the examples folder in source tree.

    There is no standalone share memory example, but you can refer to icss_emac driver where OCMC is used for packets transfer between firmware and host.

    Regards,
    Garrett
  • Hi Garrett,

    I tried to access OCMC memory location to share data between PRU & DSP core. Am able to read, write in the OCMC RAM1 location using DSP core, but not able to do same on PRU core.
    As per my observation under AM57xx_PRU.cmd only L3_OCMC with address 0x40000000 & size = 0x00010000 is defined .
    So I add OCMC_RAM1 with following data: org = 0x40300000 len = 0x00080000 CREGISTER=32, but am not getting clarity on CREGISTER, why this is defined & its use.

    To access this location I used the same approach as PRU used to share data with ARM using DDR memory location. But this approach doesn't work for me.


    Is there any link which describes how to use OCMC memory for shared data between cores like DSP-PRU.

    Along with this, Is there any way to connect DSP & PRU core while my AM572x-EVM is running under Linux. As rightnow am only able to connect single core when I stop my board under uboot.

    Regards
    Geek13
  • Hi Garrett,
    I refer your previous discussion mention below and need some clarity regarding PRU - DSP interrupts mapping.

    e2e.ti.com/.../755591


    Am having confusion regarding channel & host mapping using CMR & HMR register.
    Can you please give a single example to map one event from PRU to DSP?

    Am referring PRUToARM interrupt example for AM335x but not able to do same with PRUToDSP.

    Regards,
    Geek13
  • Hi Garrett, 

     Have you got time to see mention queries.

    Regards,

    Geek13

  • Hi Geek13,

    I did try to recall if there is such example to demonstrate map just one even from PRU to DSP but could not find. The section processors.wiki.ti.com/.../ICSS_EMAC_LLD_developers_guide may help (and hopefully not even confuse) understand the host/channel mapping though it's based on AM335x and ARM/PRU.

    Also there is some discussion on crossbar setting of DSP interrupt in the thread may help - e2e.ti.com/.../695117

    Regards,
    Garret
  • Hi Garret,
    Am trying to build PRUSS_TestApplication mention in below link
    software-dl.ti.com/.../index_device_drv.html

    Is there any documentation available for this how to run this program. At which core I need to upload its generated out file. By default mapping is given for ARM-PRU. How to check same code for DSP-PRU. Besically, I want to know the steps to debug this program for DSP-PRU interaction.

    Regrads,
    Geek13
  • Hi Geek13,

    Good finding! I almost forgot the application which is actually a good start point for getting familiar with the ARM/DSP and PRU communication.
    The PRU firmware _bin.h file is loaded by the ARM/DSP application through function PRUICSS_setPRUBuffer(). To debug the program, you may go head to create the CCS project then load the program via JTAG,

    C:\ti\pdk_am57xx_1_0_1x\packages>pdkProjectCreate.bat AM572x all little pruss all dsp

    And set breakpoint in the while loop of eventwait() to observe the INTC event from PRU. When the PRU is halted, the event should never arrive.

    Regards,
    Garrett
  • Hi Garrett,

    Thanks for you valuable suggestion, will try this soon, right now am able to interact between PRU & DSP using Mailbox.

    Regards,

    Geek13