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.

TMDSICE3359: TMDSICE3359

Part Number: TMDSICE3359

Good day,

I try to up ethernet-prp on  am33tx-icev2, using SDK am335x-evm-linux-rt-sdk-src-06.03.00.106.

I try to use standart commands from manual, like echo 'am335x-pru0-fw' > /sys/class/remoteproc/remoteproc1/firmware

As a result i receive: operation not permitted.

why ?

I use standart u-boot  and standart dtb file (am335x-icev2-prueth.dtb).

Fed.

  • Hello Fed,

    Please attach your terminal output showing the commands you entered and the results.

    Regards,

    Nick

  • Arago 2016.10 am335x-evm ttyS3

    am335x-evm login: root
    Password:
    root@am335x-evm:~# echo 'am335x-pru0-fw' > /sys/class/remoteproc/remoteproc1/firmware
    -sh: echo: write error: Operation not permitted
    root@am335x-evm:~#
    root@am335x-evm:~#

  • root@am335x-evm:~# ip link add name prp0 type prp slave1 eth0 slave2 eth1 supervision 45
    Garbage instead of arguments "slave1 ...". Try "ip link help".

    What does it mean ?

  • Hello Fed,

    It is possible that the PRU Ethernet firmware is getting auto-loaded by the PRU Ethernet driver when it is probed by the device tree. What do you see when you cat /sys/class/remoteproc/remoteproc1/state ? Do you see any terminal output on boot that indicates that the PRU is getting initialized and firmware is getting loaded?

    You can find documentation about SDK 6.3 HSR / PRP on PRU Ethernet here

    Regards,

    Nick

  • Hello Nick.

    root@am335x-evm:~# cat /sys/class/remoteproc/remoteproc1/firmware
    am335x-pru0-fw.elf
    root@am335x-evm:~# cat /sys/class/remoteproc/remoteproc1/sate
    cat: can't open '/sys/class/remoteproc/remoteproc1/sate': No such file or direct ory
    root@am335x-evm:~# cat /sys/class/remoteproc/remoteproc1/state
    offline
    root@am335x-evm:~# echo 'start' > /sys/class/remoteproc/remoteproc1/state
    -sh: echo: write error: Operation not permitted
    root@am335x-evm:~#

  • root@am335x-evm:~# dmesg | grep remote
    [ 8.718810] remoteproc remoteproc0: wkup_m3 is available
    [ 8.809820] remoteproc remoteproc1: 4a334000.pru is available
    [ 8.810368] remoteproc remoteproc2: 4a338000.pru is available
    [ 10.515132] remoteproc remoteproc0: powering up wkup_m3
    [ 10.692669] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217284
    [ 10.819192] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [ 174.209716] remoteproc remoteproc1: powering up 4a334000.pru
    [ 174.228234] remoteproc remoteproc1: Booting fw image ti-pruss/am335x-pru0-pruprp-fw.elf, size 7864
    [ 174.287232] remoteproc remoteproc1: remote processor 4a334000.pru is now up
    [ 174.294280] remoteproc remoteproc2: powering up 4a338000.pru
    [ 174.319252] remoteproc remoteproc2: Booting fw image ti-pruss/am335x-pru1-pruprp-fw.elf, size 7588
    [ 174.372402] remoteproc remoteproc2: remote processor 4a338000.pru is now up

    Also I cann't ping other devices.

  • Hello Fed,

    PRP works as expected using the out-of-the-box demo.

    Steps:

    1) in your RT Linux SDK, use bin/create-sdcard.sh to create the SD card

    2) Refer to the Ethernet section of the "AM335x ICE EVM Rev2.1 Hardware User's Guide" for guidance on how to set J1 and J2 for PRU Ethernet. Plug in both Ethernet cables. I connected the two Ethernet cables to an Ethernet switch, and connected a third Ethernet cable from the Ethernet switch to my Linux PC Ethernet port with IP address 192.168.2.100.

    3) Out of the box, the regular PRU Ethernet firmwares get loaded. We need to use ifconfig ethX down to unload the PRU firmware before doing any additional steps:

    am335x-evm login: root
    root@am335x-evm:~# dmesg | grep remote
    [   13.201224] remoteproc remoteproc0: wkup_m3 is available
    [   13.247730] remoteproc remoteproc0: powering up wkup_m3
    [   13.307138] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 242888
    [   13.307446] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [   13.592680] remoteproc remoteproc1: 4a334000.pru is available
    [   13.638978] remoteproc remoteproc2: 4a338000.pru is available
    [   25.865264] remoteproc remoteproc1: powering up 4a334000.pru
    [   25.899912] remoteproc remoteproc1: Booting fw image ti-pruss/am335x-pru0-prueth-fw.elf, size 7796
    [   26.034235] remoteproc remoteproc1: remote processor 4a334000.pru is now up
    [   26.233031] remoteproc remoteproc2: powering up 4a338000.pru
    [   26.272668] remoteproc remoteproc2: Booting fw image ti-pruss/am335x-pru1-prueth-fw.elf, size 7712
    [   26.391587] remoteproc remoteproc2: remote processor 4a338000.pru is now up
    root@am335x-evm:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr C4:F3:12:F8:90:28  
              inet6 addr: fe80::c6f3:12ff:fef8:9028/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:267 errors:0 dropped:249 overruns:0 frame:0
              TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:19132 (18.6 KiB)  TX bytes:7219 (7.0 KiB)
    
    eth1      Link encap:Ethernet  HWaddr C4:F3:12:F8:90:2A  
              inet6 addr: fe80::c6f3:12ff:fef8:902a/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:272 errors:0 dropped:252 overruns:0 frame:0
              TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:19595 (19.1 KiB)  TX bytes:8118 (7.9 KiB)
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:2 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:140 (140.0 B)  TX bytes:140 (140.0 B)
    
    root@am335x-evm:~# ifconfig eth0 down
    [  305.600241] prueth pruss_eth eth0: Link is Down
    [  305.605522] pruss 4a300000.pruss: unconfigured system_events[63-0] = 00000600,04500000
    [  305.617724] pruss 4a300000.pruss: unconfigured host_intr = 0x00000155
    [  305.626273] remoteproc remoteproc1: stopped remote processor 4a334000.pru
    [  305.635938] net eth0: stopped
    root@am335x-evm:~# ifconfig eth1 down                                                                
    [  310.410243] prueth pruss_eth eth1: Link is Down
    [  310.415521] pruss 4a300000.pruss: unconfigured system_events[63-0] = 00600000,08a00000
    [  310.427745] pruss 4a300000.pruss: unconfigured host_intr = 0x000002aa
    [  310.436290] remoteproc remoteproc2: stopped remote processor 4a338000.pru
    [  310.450726] net eth1: stopped
    

    4) From there, follow the Getting Started steps in our HSR/PRP documentation:

    root@am335x-evm:~# ifconfig eth0 hw ether 70:FF:76:1C:0E:8C                                          
    root@am335x-evm:~# ifconfig eth1 hw ether 70:FF:76:1C:0E:8C                                          
    root@am335x-evm:~# ethtool -K eth0 prp-rx-offload on
    root@am335x-evm:~# ethtool -K eth1 prp-rx-offload on                                                 
    root@am335x-evm:~# ifconfig eth0 up
    [  477.244200] iep ptp bc clkid -1
    [  477.251252] remoteproc remoteproc1: powering up 4a334000.pru
    [  477.266880] remoteproc remoteproc1: Booting fw image ti-pruss/am335x-pru0-pruprp-fw.elf, size 7864
    [  477.281194] pruss 4a300000.pruss: configured system_events[63-0] = 00000600,00900000
    [  477.288999] pruss 4a300000.pruss: configured intr_channels = 0x00000095 host_intr = 0x00000115
    [  477.303733] remoteproc remoteproc1: remote processor 4a334000.pru is now up
    [  477.312794] remoteproc remoteproc2: powering up 4a338000.pru
    [  477.323466] remoteproc remoteproc2: Booting fw image ti-pruss/am335x-pru1-pruprp-fw.elf, size 7588
    [  477.333222] pruss 4a300000.pruss: configured system_events[63-0] = 00600000,01200000
    [  477.345160] pruss 4a300000.pruss: configured intr_channels = 0x0000012a host_intr = 0x0000022a
    [  477.355968] remoteproc remoteproc2: remote processor 4a338000.pru is now up
    [  477.366190] net eth0: started
    [  477.379312] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [  479.441022] prueth pruss_eth eth0: Link is Up - 100Mbps/Full - flow control off
    [  479.448482] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    root@am335x-evm:~# ifconfig eth1 up                                                                                     
    [  492.330159] net eth1: started
    [  492.343644] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [  494.401039] prueth pruss_eth eth1: Link is Up - 100Mbps/Full - flow control off
    [  494.408772] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
    
    root@am335x-evm:~# ip link add name prp0 type prp slave1 eth0 slave2 eth1 supervision 45         
    [  572.044500] device eth0 entered promiscuous mode
    [  572.090104] device eth1 entered promiscuous mode
    root@am335x-evm:~# ifconfig prp0 192.168.1.130                                                       
    [  587.045926] IPv6: ADDRCONF(NETDEV_UP): prp0: link is not ready
    [  587.067105] IPv6: ADDRCONF(NETDEV_CHANGE): prp0: link becomes ready
    root@am335x-evm:~# ping 192.168.1.100                                                                
    PING 192.168.1.100 (192.168.1.100): 56 data bytes
    64 bytes from 192.168.1.100: seq=0 ttl=64 time=1.116 ms
    64 bytes from 192.168.1.100: seq=0 ttl=64 time=1.232 ms (DUP!)
    64 bytes from 192.168.1.100: seq=1 ttl=64 time=0.686 ms
    64 bytes from 192.168.1.100: seq=1 ttl=64 time=0.938 ms (DUP!)
    64 bytes from 192.168.1.100: seq=2 ttl=64 time=0.539 ms
    64 bytes from 192.168.1.100: seq=2 ttl=64 time=0.779 ms (DUP!)
    64 bytes from 192.168.1.100: seq=3 ttl=64 time=0.511 ms
    64 bytes from 192.168.1.100: seq=3 ttl=64 time=0.723 ms (DUP!)
    64 bytes from 192.168.1.100: seq=4 ttl=64 time=0.536 ms
    64 bytes from 192.168.1.100: seq=4 ttl=64 time=0.767 ms (DUP!)
    64 bytes from 192.168.1.100: seq=5 ttl=64 time=0.680 ms
    64 bytes from 192.168.1.100: seq=5 ttl=64 time=0.971 ms (DUP!)
    ^C
    --- 192.168.1.100 ping statistics ---
    6 packets transmitted, 6 packets received, 6 duplicates, 0% packet loss
    round-trip min/avg/max = 0.511/0.789/1.232 ms
    
    

    If I unplug one of the Ethernet cables connected to the AM335x ICEv2 board, I can still send and receive packets:

    root@am335x-evm:~# [  657.280754] prueth pruss_eth eth0: Link is Down
    
    root@am335x-evm:~# ping 192.168.1.100
    PING 192.168.1.100 (192.168.1.100): 56 data bytes
    64 bytes from 192.168.1.100: seq=0 ttl=64 time=0.926 ms
    64 bytes from 192.168.1.100: seq=1 ttl=64 time=0.785 ms
    64 bytes from 192.168.1.100: seq=2 ttl=64 time=0.619 ms
    64 bytes from 192.168.1.100: seq=3 ttl=64 time=0.524 ms
    ^C
    --- 192.168.1.100 ping statistics ---
    4 packets transmitted, 4 packets received, 0% packet loss
    round-trip min/avg/max = 0.524/0.713/0.926 ms
    

    Regards,

    Nick

  • Grand gratitude Nick,

     With same net topology, all ping are reached,

    But in Custom board , like icev2 , i have next isuue:

     When I send command ethtool -s eth0 autoneg off

    After 10-20 sec. I see 

    RT Throttling.

    Why ?

    Regards Fed.

  • Hi,

    The message can happen only once per boot and is an indicator that over 95% of the past 1s was spent running RR/FIFO tasks. This message comes from the kernel. If you are experiencing this message you may want to investigate how your application is written. This message is an indicator that the application is not allowing non RT tasks to run.

    Best Regards,

    Schuyler 

  • Hello Schuyler.

    in fact of the matter, I do not run application, only standart kernel / drivers/ services etc.

  • Hi,

    While you may not have any running applications there could be several user level applications running as part of the boot process as per what you described. For example the TI file systems starts up several background daemons. ethtool is considered an application since it launched from the command line this could be considered the reason for the message. To rule this out you might try as a test adding the disabling of auto-negotiation to the board DTS file. 

    Overall the message is a warning that the kernel had to preempt a RR/FIFO task and that an application developer should be take this into consideration. There maybe scenarios where this message will be seen when the kernel is initializing or using tools such as ethtool that cause this message. 

    Best Regards,

    Schuyler