Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

SDK/AM5749:How to set remoteproc as suspended/offline/running during kernel loading?

Other Parts Discussed in Thread: PRUCAPE

Hi, TI Experts,

    The am574x_IDK comes with 8 remoteproc.
    How to set remoteproc as suspended/offline/running during kernel loading?

    For example, I programmed a code for blinking LED with pru_2_0(remoteproc4).
    How to set remoteproc4 as suspended/offline/running during kernel loading?
    
Best regards,
Greatcat

//---Currently status.

root@am57xx-evm:~# cat /sys/class/remoteproc/remoteproc0/state
suspended
root@am57xx-evm:~# cat /sys/class/remoteproc/remoteproc1/state
suspended
root@am57xx-evm:~# cat /sys/class/remoteproc/remoteproc2/state
suspended
root@am57xx-evm:~# cat /sys/class/remoteproc/remoteproc3/state
suspended
root@am57xx-evm:~# cat /sys/class/remoteproc/remoteproc4/state
offline
root@am57xx-evm:~# cat /sys/class/remoteproc/remoteproc5/state
offline
root@am57xx-evm:~# cat /sys/class/remoteproc/remoteproc6/state
running
root@am57xx-evm:~# cat /sys/class/remoteproc/remoteproc7/state
running

root@am57xx-evm:~# dmesg | grep remoteproc0
[   11.782331] remoteproc remoteproc0: 58820000.ipu is available
[   12.531981] remoteproc remoteproc0: powering up 58820000.ipu
[   12.537775] remoteproc remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 6887428
[   12.586266] remoteproc remoteproc0: registered virtio0 (type 7)
[   12.595014] remoteproc remoteproc0: remote processor 58820000.ipu is now up
root@am57xx-evm:~# dmesg | grep remoteproc1
[   11.878213] remoteproc remoteproc1: 55020000.ipu is available
[   12.505659] remoteproc remoteproc1: powering up 55020000.ipu
[   12.511592] remoteproc remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3747220
[   12.746720] remoteproc remoteproc1: registered virtio1 (type 7)
[   12.752683] remoteproc remoteproc1: remote processor 55020000.ipu is now up
root@am57xx-evm:~# dmesg | grep remoteproc2
[   12.021905] remoteproc remoteproc2: 40800000.dsp is available
[   14.525476] remoteproc remoteproc2: powering up 40800000.dsp
[   14.549817] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 20482288
[   14.590390] remoteproc remoteproc2: registered virtio2 (type 7)
[   14.597479] remoteproc remoteproc2: remote processor 40800000.dsp is now up
root@am57xx-evm:~# dmesg | grep remoteproc3
[   12.148035] remoteproc remoteproc3: 41000000.dsp is available
[   14.782259] remoteproc remoteproc3: powering up 41000000.dsp
[   14.793545] remoteproc remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 20482288
[   15.081639] remoteproc remoteproc3: registered virtio3 (type 7)
[   15.101674] remoteproc remoteproc3: remote processor 41000000.dsp is now up
root@am57xx-evm:~# dmesg | grep remoteproc4
[   15.438956] remoteproc remoteproc4: 4b234000.pru is available
root@am57xx-evm:~# dmesg | grep remoteproc5
[   15.514671] remoteproc remoteproc5: 4b238000.pru is available
root@am57xx-evm:~# dmesg | grep remoteproc6
[   15.567085] remoteproc remoteproc6: 4b2b4000.pru is available
[   18.116982] remoteproc remoteproc6: powering up 4b2b4000.pru
[   18.133503] remoteproc remoteproc6: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 7228
[   18.188381] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
root@am57xx-evm:~# dmesg | grep remoteproc7
[   15.626588] remoteproc remoteproc7: 4b2b8000.pru is available
[   17.933163] remoteproc remoteproc7: powering up 4b2b8000.pru
[   17.958906] remoteproc remoteproc7: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 7256
[   18.016665] remoteproc remoteproc7: remote processor 4b2b8000.pru is now up


//---
Board : am574x_IDK TMDSIDK5749 REV 1.0C

root@am57xx-evm:~# uname -ar
Linux am57xx-evm 4.19.94-gbe5389fd85 #1 SMP PREEMPT Sun Apr 19 02:36:36 UTC 2020 armv7l GNU/Linux

root@am57xx-evm:~# /usr/share/ti/examples/opencl/platforms/platforms   
[  198.396103] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
[  198.434292] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
[  198.440224] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
[  198.447143] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
[  198.453038] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
PLATFORM: TI AM57x
  Version: OpenCL 1.2 TI product version 01.02.00.02 (b1dfed9)
  Vendor : Texas Instruments, Inc.
  Profile: FULL_PROFILE
    DEVICE: TI Multicore C66 DSP
      Type       : ACCELERATOR | CUSTOM
      CompUnits  : 2
      Frequency  : 0.75 GHz
      Glb Mem    :  360448 KB
      GlbExt1 Mem:       0 KB
      GlbExt2 Mem:       0 KB
      Msmc Mem   :    1024 KB
      Loc Mem    :     128 KB
      Max Alloc  :  344064 KB
    DEVICE: TI Embedded Vision Engine (EVE)
      Type       : CUSTOM
      CompUnits  : 1
      Frequency  : 0.65 GHz
      Glb Mem    :  360448 KB
      Loc Mem    :       0 KB
      Max Alloc  :  344064 KB
    DEVICE: TI Embedded Vision Engine (EVE)
      Type       : CUSTOM
      CompUnits  : 1
      Frequency  : 0.65 GHz
      Glb Mem    :  360448 KB
      Loc Mem    :       0 KB
      Max Alloc  :  344064 KB

  • SDK version ?

    Regards

    Vineet

  • Hi, Vineet:

    The SD card was created by ti-processor-sdk-linux-am57xx-evm-06.03.00.106-Linux-x86-Install.bin.

    Regards

    Greatcat

  • Hi Greatcat,

    I am sorry i did not understand the question quite correctly. 

    I can set the state runtime by the below command:

    echo start > /sys/class/remoteproc/remoteproc4/state
    [ 175.052008] remoteproc remoteproc4: powering up 4b234000.pru
    [ 175.066882] remoteproc remoteproc4: Booting fw image am57xx-pru1_0-fw, size 77812
    [ 175.074860] pruss 4b200000.pruss: configured system_events[63-0] = 00000000,00030000
    [ 175.082689] pruss 4b200000.pruss: configured intr_channels = 0x00000005 host_intr = 0x00000005
    [ 175.092117] virtio_rpmsg_bus virtio3: rpmsg host is online
    [ 175.092162] virtio_rpmsg_bus virtio3: creating channel rpmsg-pru addr 0x1e
    [ 175.105209] remoteproc remoteproc4: registered virtio3 (type 7)
    [ 175.112545] remoteproc remoteproc4: remote processor 4b234000.pru is now up
    root@am57xx-evm:~# [ 175.125419] rpmsg_pru virtio3.rpmsg-pru.-1.30: new rpmsg_pru device: /dev/rpmsg_pru30

    root@am57xx-evm:~#
    root@am57xx-evm:~# cat /sys/class/remoteproc/remoteproc4/state
    running

    Is that what you want?

    Best Regards,
    Keerthy

  • Hi, Keerthy:

    Your method is that start remoteproc4 after login.
    I would like to start remoteproc4 before login instead of after login.

    For example, the remoteproc0 is started during booting. It is before login.
    [   12.595014] remoteproc remoteproc0: remote processor 58820000.ipu is now up

    I would like to do as it. But I can't find out how to do it.

    Best Regards,
    Greatcat

  • Hi, Keerthy:

    A moment ago, I notice the timestamp with some delay in the first post.
    I guess that, maybe, it confused you.

    I tried to find out the cause.
    AM574x_IDK usually finishs boot in 13 seccond.
    But it sometime stuck here :
    [    3.650611]   No soundcards found.
    [   12.565125] EXT4-fs (mmcblk0p2): recovery complete

    Best Regards,
    Greatcat

  • Hi, Keerthy:

    By the way, I share some of pru code.
    Maybe someone else need these to test pru on am574x IDK :)

    They blink red LED#0 ~ #3 on am574x IDK.
    They work with remoteproc4(PRU#1_0) or remoteproc5.(PRU#1_0)

    Best regards,
    Greatcat
    pru_blink_LED_ctrl_arm_core.tar

    pru_build_guide.txt
    install 
    ti_cgt_pru_2.3.3_linux_installer_x86.bin
    to (my case)
    /home/gcat/dk2/sdkpru
    
    unzip 
    pru-software-support-package-5.7.0.zip
    to (my case)
    /home/gcat/dk2/pru_test
    
    #set envirenment (my case)
    export PRU_CGT=/home/gcat/dk2/sdkpru
    export PRU_SSP=/home/gcat/dk2/pru_test/pru-software-support-package-5.7.0
    
    #test 
    ~/dk2/pru_test/pru-software-support-package-5.7.0/labs/Getting_Started_Labs/c_code/solution/am335x
    make
    #If the envirenment is ok and you will get :
    ~/dk2/pru_test/pru-software-support-package-5.7.0/labs/Getting_Started_Labs/c_code/solution/am335x/gen/am335x.out
    
    #build code
    untar PRU_LEDxR_GPIOx.x.tar
    make
    

  • Hi Greatcat,

    I found out why pru2_0 and pru2_1 are loaded but not pru1_0 and pru1_1.
    i.e remoteproc4/5 is not started but remoteproc6/7 is started.

    This is because pru2_0 and pru2_1 are needed by pruss2_eth under: "arch/arm/boot/dts/am57xx-idk-common.dtsi"

    pruss2_eth: pruss2_eth {
    compatible = "ti,am57-prueth";
    prus = <&pru2_0>, <&pru2_1>;

    So those instances are started.

    Now there is no such instance for pruss1_eth in arch/arm/boot/dts/am57xx-idk-common.dtsi.

    So the remoteproc4/5 are not started until you explicitly give a command.

    I figured this out adding WARN_ON(1) in rproc_boot. Log: https://pastebin.ubuntu.com/p/tqppbfxb4M/

    Line 953: [ 14.794671] [<bf0ccfd4>] (rproc_boot [remoteproc]) from [<bf36c0c4>] (emac_ndo_open+0xfac/0x2030 [ti_prueth])

    emac_ndo_open which is for prueth2 ends up loading and starting the pru2_0 and pru2_1.

    Hope this answers your question.

    Please resolve this if you question is answered.

    Best Regards,
    Keerthy

  • Hi Greatcat,

    I suggest creating a new ticket with the PRU code question so that it can be assigned to the relevant expert.

    Best Regards,
    Keerthy

  • Hi, Keerthy:

    Thank you for your suggestion and answer.
    I bought "PRUCAPE" and "Beaglebone black" and they arrived yesterday.
    The "PRUCAPE" comes with clear and good examples.
    It solves a lot of my questions on am574x_IDK.

    Best regards,
    Greatcat

  • Hi Greatcat,

    That is awesome. I am closing this thread.

    Best Regards,
    Keerthy