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.

SK-AM62A-LP: Intermittent Link up/down on eht0 when directly connecting an IP camera

Part Number: SK-AM62A-LP

Hello,

I am encountering a problem when connecting an automotive ethernet camera directly on the eth0 port.

Here are the diagnostic messages when the camera is connected :

root@am62axx-evm:~# [ 463.495667] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
[ 471.687912] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 480.904167] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
[ 483.975908] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 506.503657] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
[ 509.575893] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 515.719701] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
[ 518.791913] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 528.007633] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
[ 530.056362] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off

This is of course making the module lose ping packets and sometimes freezing the gstreamer stream from the camera.

Yet this problem seems non-existent when connecting the camera through a switch and on other devices.

Do you have some ideas on how I could fix up this issue? Thanks.

Best Regards,

Thomas

  • Hi Thomas, 

    The messages you are seeing appear to be similar to the result of an errata on MDIO interface corruption. You can find more information on in the following links.

    https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM62AX/latest/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW3g.html?highlight=link%20down#errata-i2329-mdio-interface-corruption-cpsw-and-pruss 

    AM62x Sitara Errata (Rev. D) (ti.com)  And search for i2329 MDIO Interface Corruption. 

    The first link refers to a workaround solution for SDK v8.5 or higher which you could try out.

    It's strange that when connecting through a switch, there are no issues with detecting a link, I will check with the team on this.

    Best regards,

    Daolin

  • I've recently experienced similar Link Up/Down messages when using a bad ethernet cable so I would check that out sooner than later.

  • Thank you for your answer. 

    I have read the errata and the suggested workaround. As I understand it, a solution could be to set the SoC to communicate on the MDIO interface in software rather than hardware. I do not see how that would change anything so I will see if my setup could be made more electrically stable by swapping cables and power supplies.

  • If it's the cable's fault, it will be hard to change because it's the one shipped with the camera and it has an automotive connector on the other end

  • Hi,

    Are you using the TI EVM or a custom board design?

    Cycling Link up/down console messages can have a variety of sources. When plugging the camera into a Linux PC do you see the same cycling of up/down link messages? 

    Best Regards,

    Schuyler

  • Hi Schuyler,

    I am using the SK-AM62A-LP E2 evaluation board. No cycling Link up/down messages are to be seen when plugging the camera everywhere else (two PCs and a network switch) than the board.

    Best Regards,

    Thomas

  • Hi,

    Could you please post the results of uname -a from the console on the TI Board?

    Does the link up/down happen without passing any data from the camera or while the camera is passing data? When plugging into the PC is the camera passing data?

    Best Regards,

    Schuyler

  • Here are the results of uname-a:

    root@am62axx-evm:/opt/edgeai-gst-apps# uname -a
    Linux am62axx-evm 6.1.46-g247b2535b2 #1 SMP PREEMPT Wed Dec 6 17:54:04 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

    The Link up/down happens when the camera is connected regardless of if and IP address is configured or if the stream is on.

    However, the camera is always sending UDP packets wether they are processed or not, on anything it is plugged in.

  • Hi,

    Thanks for the uname results. The errata mentioned earlier should be handled in this SDK for the release you are using so I don't think that is the source of the link cycling. Could you connect to eth1 if not already on the EVM? I know this may not show much as only the camera is showing the issue on eth0.

    Back to cable suggestion from earlier contributor,  this may sound odd but is there a cable wiring diagram? I am looking to see if it is like a CAT5 or CAT6 cable and all 4 pairs are used.

    Best Regards,

    Schuyler

  • Hi Schuyler,

    Thanks for your message. Unfortunately, I don't have access to eth1 as I'm missing the appropriate daughterboard required for it.

    The cable is CAT5e M12-D to RJ45 and only two pairs are cabled to the RJ45 connector. Its picture below:

    Its M12-D pinout:

    The camera only does 100Base TX.

    Best regards,

    Thomas

  • Hi Thomas,

    Thanks for sharing the cabling diagram. Since only 2 pairs of the RJ45 connector this may be something to further look into to see how the carrier is detected and a link is setup and maintained. I will need to check with fellow team members in different time zones for some more debug ideas. This could take a couple of days, I will update this thread by Wednesday on progress.

    Best Regards,

    Schuyler 

  • Hi Thomas, Schuyler,

    Apologies for the delay in response. Do we know what PHY ETH0 is? If this is a linux terminal, please try running the command:

    dmesg | grep mdio 

    This command will help identify the PHY and if the driver has loaded correctly.

    Based on the error message in the initial post, the PHY is operating at 100 Mbps, which only requires 2 pairs. I don't believe this to be the cause of your issue.

    Have you tried connecting eth0 to anything else via a regular ethernet cable? Maybe to another PC or switch? If so, does the link up/down issue persist with the non-camera link partner?

    Regards,

    Alvaro

  • Hi Alvaro,

    The camera is rated for a maximum network speed of 100Mbps.

    The results of the dmesg command:

    root@am62axx-evm:/opt/edgeai-gst-apps# dmesg | grep mdio
    [    1.414232] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [    1.423297] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver TI DP83867
    [    8.339333] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
    

    If anything else is connected to eth0, there is no issue whatsoever:

    100M switch:  am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

    (the link up/down issue does not manifest even if I connect the camera to the switch)

    Intel I225-V: am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

    My Toshiba work laptop: am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

    Best regards,

    Thomas

     

  • Hi Thomas,

    Thank you for performing the dmesg command and trying different link partners.

    As mentioned before, the dmesg command identified the DP83867 PHY, a robust gigabit PHY, and that the driver was loaded correctly.

    Intel I225-V: am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

    Regarding the different link partners, thank you for providing the message log instead of just saying that it links up, I believe there is a hint here. Earlier in the thread it is mentioned that only 2 pairs of the mdi are connected (I have not verified, I am trusting). If this is the case, our PHY should NOT be able to link up at 1 Gbps. Our driver should recognize this and output a message saying that the 867 is downshifting from 1 Gbps to 100 Mbps. Before diving into driver specifics I want to perform another test.

    Register 0x4 (10/100 Advertisements) & 0x9 (Gigabit Advertisement) contain information for what speeds are available during the Auto-negotiation process. Could you de-advertise both 10 Mbps and 1 Gbps modes and see if this has any effect on the camera connection?

    Regards,

    Alvaro

  • Hi Alvaro,

    Thank you for your reply.

    Reading and setting the right registers:
    phytool read eth0/0x0/0x04
    0x05e1
    phytool read eth0/0x0/0x09
    0x0200


    phytool write eth0/0x0/0x04 0x0581

    phytool write eth0/0x0/0x09 0x0000

    After the camera is connected, reading the Auto-Negotiation Link Partner Ability Register:

    phytool read eth0/0x0/0x05
    0xc1e1

    This manipulation does not solve the link up/down issue.

    Regards,

    Thomas

  • Hi Thomas,

    Again, thank you for the detailed reply. You were very thorough in showing how the registers were set and you did exactly what I asked, unfortunately it didn't help.

    Can you check the Link Quality Registers mentioned in Section 3.5 Link Quality in our DP83867 Troubleshooting Guide? Please note that these are extended registers, Section 3.9.2 Extended Register Access in the troubleshooting guide has more information. 

    In the same breath, could you also give me a register dump from Reg 0x0 through Reg 0x1F, in both link up and link down scenarios?

    Can I also confirm the Block diagram of your setup? 

    SK-AM62A-LP <-> DP83867 <-RJ-45 to CAT5e M12-D Cable-> Camera  

    Regards,

    Alvaro

  • Hi Alvaro,

    I checked the Link Quality Registers and they're all over the place.

    I setup the registers to access channel A's Link Quality register, then read this register automatically every 0.5 seconds with the following commands:

    phytool write eth0/0x0/0x0D 0x001F
    phytool write eth0/0x0/0x0E 0x0225
    phytool write eth0/0x0/0x0D 0x401F
    phytool read eth0/0x0/0x0E 
    
    while true; do phytool read eth0/0x0/0x0E; sleep 0.5; done

    You can find the Link quality log in the "Link quality log.txt" file:

    Link quality Channel A:
    
    root@am62axx-evm:/opt/edgeai-gst-apps# while true; do phytool read eth0/0x0/0x0E; sleep 0.5;
    0x0053
    0x0051
    0x0055
    0x0033
    0x004c
    0x001d
    0x0051
    0x0054
    0x0034
    0x003c
    0x004f
    0x0038
    0x001d
    0x0036
    0x0034
    0x0034
    0x003a
    0x0032
    0x0048
    [15825.319110] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control
    0x0075
    0x00e6
    0x0100
    0x0061
    0x011d
    0x0058
    0x016a
    0x007f
    0x0100
    0x01f3
    0x0067
    0x0069
    0x01d0
    0x01a2
    0x010a
    0x0093
    0x00a7
    0x017a
    [15834.534815] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x003b
    0x002d
    0x004c
    0x0057
    0x6ad5
    0x0088
    [15837.607151] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control
    0x008f
    0x01e4
    0x0111
    0x004c
    [15839.656851] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x004c
    0x002b
    0x0035
    0x003d
    [15841.703100] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control
    0x0384
    0x0057
    0x02b4
    0x03d7
    0x0055
    0x02fd
    [15844.780346] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x0035
    0x003b
    0x0033
    0x0053
    0x005c
    0x0065
    [15847.847094] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control
    0x0096
    0x013f
    0x0046
    0x0053
    0x0049
    0x0053
    0x00c2
    0x004e
    0x005e
    0x0048
    [15852.966845] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x004f
    0x0034
    0x0034
    0x2be8
    [15855.015099] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control
    0x0064
    0x00c7
    0x0089
    0x0167
    0x00af
    0x00db
    0x012a
    0x00f6
    0x0226
    0x00cb
    0x007b
    0x0125
    0x00f0
    0x007e
    0x00db
    0x0073
    0x0082
    0x00b7
    0x0089
    0x023f
    0x00e0
    0x005a
    0x00ad
    0x0141
    0x0065
    0x00a5
    0x03ee
    0x0101
    0x00d9
    0x0092
    0x0158
    0x0080
    0x005c
    0x018a
    0x012f
    0x02fe
    0x009d
    0x0141
    0x0095
    0x009f
    0x0028
    [15875.494559] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x002f
    0x004b
    0x004f
    0x0053
    0x0065
    0x00c8
    [15878.566781] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control
    0x011a
    

    The first "Link is Up" message is when I connect the IP camera and leave it connected.

    I also made two graphs of this log with the Link quality in blue and the Link Up/Down in green and red respectively. One graph with the values as is: "Link quality and Up-Down graph.pdf" and one with the weird astronomical values removed to make the other variations clearer: "Link quality and Up-Down graph extreme values removed.pdf". 

    Link quality and Up-Down graph.pdf

    Link quality and Up-Down graph extreme values removed.pdf

    The other channels B,C and D always return a link quality of 0x7fff.

    All the PHY registers are dumped in this file:

    #The camera is not connected
    
    root@am62axx-evm:/opt/edgeai-gst-apps# x=0; while  [ $x -le 31 ]; do printf  "Register 0x%02X = " $x ; phytool read eth0/0/$x  $(( x++ )) ; done
    Register 0x00 = 0x1140
    Register 0x01 = 0x7949
    Register 0x02 = 0x2000
    Register 0x03 = 0xa231
    Register 0x04 = 0x05e1
    Register 0x05 = 0000
    Register 0x06 = 0x0066
    Register 0x07 = 0x2001
    Register 0x08 = 0000
    Register 0x09 = 0x0200
    Register 0x0A = 0000
    Register 0x0B = 0000
    Register 0x0C = 0000
    Register 0x0D = 0x401f
    Register 0x0E = 0x0050
    Register 0x0F = 0x3000
    Register 0x10 = 0x5048
    Register 0x11 = 0x0002
    Register 0x12 = 0000
    Register 0x13 = 0x1c46
    Register 0x14 = 0x2bc7
    Register 0x15 = 0x0127
    Register 0x16 = 0000
    Register 0x17 = 0x0040
    Register 0x18 = 0x6150
    Register 0x19 = 0x4444
    Register 0x1A = 0x0002
    Register 0x1B = 0000
    Register 0x1C = 0000
    Register 0x1D = 0000
    Register 0x1E = 0x0202
    Register 0x1F = 0000
    
    
    #I connected the camera at this moment
    
    root@am62axx-evm:/opt/edgeai-gst-apps# [ 4325.112811] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 4327.148577] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    
    root@am62axx-evm:/opt/edgeai-gst-apps# x=0; while  [ $x -le 31 ]; do printf  "Register 0x%02X = " $x ; phytool read eth0/0/$x  $(( x++ )) ; done
    Register 0x00 = 0x1140
    Register 0x01 = 0x796d
    Register 0x02 = 0x2000
    Register 0x03 = 0xa231
    Register 0x04 = 0x05e1
    Register 0x05 = 0xc1e1
    Register 0x06 = 0x006f
    Register 0x07 = 0x2001
    Register 0x08 = 0x6801
    Register 0x09 = 0x0200
    Register 0x0A = 0000
    Register 0x0B = 0000
    Register 0x0C = 0000
    Register 0x0D = 0x401f
    Register 0x0E = 0x0049
    Register 0x0F = 0x3000
    Register 0x10 = 0x5048
    Register 0x11 = 0x7c02
    Register 0x12 = 0000
    Register 0x13 = 0x1c46
    Register 0x14 = 0x2bc7
    Register 0x15 = 0x012c
    Register 0x16 = 0000
    Register 0x17 = 0x0040
    Register 0x18 = 0x6150
    Register 0x19 = 0x4444
    Register 0x1A = 0x0002
    Register 0x1B = 0000
    Register 0x1C = 0000
    Register 0x1D = 0000
    Register 0x1E = 0x0202
    Register 0x1F = 0000
    
    [ 4531.947588] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    
    root@am62axx-evm:/opt/edgeai-gst-apps# x=0; while  [ $x -le 31 ]; do printf  "Register 0x%02X = " $x ; phytool read eth0/0/$x  $(( x++ )) ; done
    Register 0x00 = 0x1140
    Register 0x01 = 0x796d
    Register 0x02 = 0x2000
    Register 0x03 = 0xa231
    Register 0x04 = 0x05e1
    Register 0x05 = 0xc1e1
    Register 0x06 = 0x006f
    Register 0x07 = 0x2001
    Register 0x08 = 0x6801
    Register 0x09 = 0x0200
    Register 0x0A = 0000
    Register 0x0B = 0000
    Register 0x0C = 0000
    Register 0x0D = 0x401f
    Register 0x0E = 0x004d
    Register 0x0F = 0x3000
    Register 0x10 = 0x5048
    Register 0x11 = 0x6f02
    Register 0x12 = 0000
    Register 0x13 = 0x1c44
    Register 0x14 = 0x2bc7
    Register 0x15 = 0x012c
    Register 0x16 = 0000
    Register 0x17 = 0x0040
    Register 0x18 = 0x6150
    Register 0x19 = 0x4444
    Register 0x1A = 0x0002
    Register 0x1B = 0000
    Register 0x1C = 0000
    Register 0x1D = 0000
    Register 0x1E = 0x0202
    Register 0x1F = 0000
    
    
    

    Your Block diagram of my setup is right. The DP83867 is on the SK-AM62A-LP board.

    Regards,

    Thomas

  • Hi Thomas,

    Thank you again for the detailed reply (especially the graphs).

    Channel B-D reading 0x7FFF is expected when linked up in 100 Mbps (when linked at gigabit, all registers give MSE values).

    In your PHY register log, you initially have the camera disconnected and print register 0x0-1F, then connect the camera afterwards.

    Kernel message says link is up - 100 Mbps Full, but then another kernel message says link is down before you print the registers again (lines 38 -43).

    Register 0x01 in Line 44 says link is up, which contradicts the kernel message. Is this a consistent trend where the Kernel says link is down but the PHY is still showing link high (Register 0x1 & 0x11 can be used to check link)? 

    I also noticed some RX Errors in Register 0x15, can we read extended Registers 0x2D, 0x6E & 0x6F? If both bits 14 & 3 of Reg 0x2D are both high this could be the reason for link down. 

    Regards,

    Alvaro

  • Hi Alvaro,

    Thank you for your reply.

    As you can see in the following register dumps, there is sometimes an inconsistency between the Kernel messages about link's state and the register reads, maybe due to some delay?

    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x2D
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x6E
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x6F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0x0140
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x01
    0x7949
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0x0140
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x11
    0x0002
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x13
    0x0040
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x15
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# [ 1876.875813] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [ 1876.882493] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x2D
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x6E
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x6F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0x0140
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x01
    0x796d
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0x0140
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x11
    0x6f02
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x13
    0x1c40
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x15
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# [ 1939.337581] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 1942.419306] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2077.579887] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 2079.630371] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2207.625454] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 2210.702528] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2365.321759] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 2368.398916] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2372.486776] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 2374.543214] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2381.707261] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 2384.780252] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2413.449740] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 2416.526497] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2457.478724] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 2467.719571] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2468.742831] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    phytool read eth0/0x0/0x15
    0x01b2
    root@am62axx-evm:/opt/edgeai-gst-apps# [ 2470.791669] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2473.867150] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 2475.918550] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2486.158441] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    
    root@am62axx-evm:/opt/edgeai-gst-apps# [ 2488.199048] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2498.442939] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x2D
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x6E
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x6F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0x0140
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x01
    0x796d
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    [ 2500.486554] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    0x0140
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x11
    0x6c02
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x13
    0x1c46
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x15
    0x01ca
    root@am62axx-evm:/opt/edgeai-gst-apps# [ 2521.999882] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x2D
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x6E
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x6F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0x0140
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x01
    0x7949
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0x0140
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x11
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x13
    0x0442
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x15
    0x01ca
    root@am62axx-evm:/opt/edgeai-gst-apps# [ 2525.070942] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2533.262459] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 2536.328669] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2540.427036] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x2D
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0E 0x6E
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x401F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool read eth0/0x0/0x0E
    0000
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/0x0/0x0D 0x001F
    root@am62axx-evm:/opt/edgeai-gst-apps# phytool write eth0/[ 2546.574723] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2636.678774] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 2638.734521] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 2682.762401] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    

    I do not think the registers contradict the kernel message for more than a fraction of a second like this polling of the registers 0x01 and 0x11 shows:

    [ 6331.515307] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    [ 6388.839975] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x7949
    0x0302
    0x7949
    0x0302
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x0302
    0x7949
    0x0002
    0x7949
    0x0302
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x0302
    0x7949
    0x0302
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x0302
    0x7949
    0x0302
    0x7949
    0x0302
    0x7949
    0x0002
    0x7949
    0x0302
    0x7949
    0x0302
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x0302
    0x7949
    0x0302
    0x7949
    0x0002
    0x7949
    0x0302
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x1002
    0x7949
    0x1002
    0x796d
    0x7c02
    0x796d
    0x6c02
    [ 6407.271927] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x7949
    0x0002
    [ 6427.756323] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x7949
    0x0002
    0x7949
    0x0302
    0x7949
    0x0002
    0x7949
    0x1002
    [ 6429.800255] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x7949
    0x0002
    [ 6435.943974] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x7949
    0x0002
    0x7949
    0x1002
    0x7949
    0x0002
    0x7949
    0x7002
    [ 6437.992233] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    [ 6442.087970] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x0302
    0x7949
    0x1302
    0x7949
    0x1302
    0x796d
    0x6f02
    [ 6445.160244] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x7949
    0x0302
    [ 6447.207983] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x7949
    0x0302
    0x7949
    0x0002
    0x7949
    0x1002
    0x7949
    0x1002
    [ 6449.256248] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x7949
    0000
    [ 6451.303985] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x7949
    0000
    0x7949
    0x0302
    0x7949
    0x1302
    0x7949
    0x1302
    [ 6453.352298] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x796d
    0x6f02
    0x7949
    0x0302
    [ 6457.447999] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x7949
    0x0302
    0x7949
    0x0002
    0x7949
    0x1002
    0x7949
    0x1002
    0x796d
    0x7c02
    0x796d
    0x6c02
    [ 6460.520244] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    [ 6462.572606] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    0x7949
    0x0002
    0x7949
    0x0002
    0x7949
    0x0302
    0x7949
    0x1002
    0x7949
    0x1002
    0x796d
    0x7c02
    [ 6465.640263] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    0x796d
    0x6c02
    

    The 0x2D and 0x6E registers always return 0x0000 and 0x6F always return 0x0140.

    Regards,

    Thomas

  • Hi Thomas,

    Thank you for the log. I did not have time to dedicate to this query today, please allow me until next week Monday to provide a more detailed response.

    Glad to know we can dismiss the kernel vs phy link discrepancy.

    Regards,

    Alvaro 

  • Hi Thomas,

    Apologies for the delay. I'm honestly not sure why this intermittent link up/down issue persists. The relevant people on my team that can assist are currently traveling, they will be back next week Monday, March 11th. Have you discovered anything else on your side?

    Regards,

    Alvaro

  • Hi Alvaro,

    For my part, I will be back at my job on Tuesday April 2nd. 

    Regards,

    Thomas

  • Hi Thomas,

    Understood.

    Regards,

    Alvaro

  • Hi Alvaro,

    I'm back to work. I haven't conducted any further checks yet, but I suspect that the electrical noise may be originating from some switched-mode power supply (SMPS) in my setup.
    Here is a diagram of said setup if it can help :

    Regards,

    Thomas

  • Hi Thomas,

    I will ask Alvaro to respond to your post.

    Best Regards,

    Schuyler

  • Hi Thomas,

    Please let me consult with my team. Will respond again today.

    Regards,

    Alvaro

  • Hi Thomas,

    Could you try setting Reg 0x1D5 = 0xF508? This increases the VOD swing on the MDI output.

    Regards,

    Alvaro

  • Hi Alvaro,

    Thank you for your suggestion. However, it does not appear to change the intermittent link disconnections.

    Regarding the power supplies, lithium batteries in series have been tested as a replacement to the camera's SMPS, yet the issue persists.

    Regards,

    Thomas

  • Hi Thomas,

    I'm afraid I don't have any more debug steps to take. The problem is specifically only with the camera correct? When eth0 is connected to any other device (pc, switch, etc) there is stable communication with no packet loss?

    Regards,

    Alvaro

  • Hi Alvaro, 

    Yes there is stable communication with every other device. The problem has been experimented with two cameras of the same model.

    Regards,

    Thomas

  • Hi Thomas,

    Admittedly this is a hail Mary shot, but could you try replacing the current DP83867.c file included in the SDK with our most current one: https://github.com/TexasInstruments/ti-ethernet-software/tree/main/linux_drivers 

    Within the SDK there should be a folder for the Linux Kernel, from this folder the ethernet drivers can be found in drivers/net/phy
    Keep a copy of the old driver and replace it with the new to see if anything changes (don't change the file names). You will have to run the make command again from the SDK_Install_Directory for the new driver to be built.

    Regards,

    Alvaro