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-AM62: Test Ethernet using devmem2, but get "Bus error" message

Part Number: SK-AM62

Hi Ti Support Team,

We are going to test Ethernet(100 BASE-Tx Mode 5 MDI) on AM62-SK EVM.

We use the way as below after referring to “How to Configure DP838xx for Ethernet Compliance Testing.pdf”:

Ethernet:

  1. devmem2 0x001F w 0x8000
  2. devmem2 0x0000 w 0x2100
  3. devmem2 0x0010 w 0x5008
  4. devmem2 0x0009 w 0xBB00
  5. devmem2 0x0025 w 0x0480

 

Step #2, #3 work well, but #1, #4, #5 return “Bus error” message.
What results in the "Bus error"?

Please refer to the attached log file, ETHERNET_TEST_20230705.log

root@Triton:~# devmem2 0x001F w 0x8000
/dev/mem opened.
Memory mapped at address 0xffff94cfa000.
Bus error
root@Triton:~# devmem2 

Usage:  devmem2 { address } [ type [ data ] ]
        address : memory address to act upon
        type    : access operation type : [b]yte, [h]alfword, [w]ord
        data    : data to be written

root@Triton:~# devmem2 0x001f
/dev/mem opened.
Memory mapped at address 0xffffa1c40000.
Bus error
root@Triton:~# devmem2 0x0000
/dev/mem opened.
Memory mapped at address 0xffffa70cc000.
Value at address 0x0 (0xffffa70cc000): 0x0
root@Triton:~# devmem2 0x0000 w 0x2100
/dev/mem opened.
Memory mapped at address 0xffff8d954000.
Value at address 0x0 (0xffff8d954000): 0x0
Written 0x2100; readback 0x2100
root@Triton:~# devmem2 0x0010
/dev/mem opened.
Memory mapped at address 0xffff8d6a3000.
Value at address 0x10 (0xffff8d6a3010): 0x0
root@Triton:~# devmem2 0x0010 w 0x5008
/dev/mem opened.
Memory mapped at address 0xffffba857000.
Value at address 0x10 (0xffffba857010): 0x0
Written 0x5008; readback 0x5008
root@Triton:~# devmem2 0x0010
/dev/mem opened.
Memory mapped at address 0xffffb0d78000.
Value at address 0x10 (0xffffb0d78010): 0x5008
root@Triton:~# devmem2 0x0009
/dev/mem opened.
Memory mapped at address 0xffffbbb4e000.
Bus error
root@Triton:~# devmem2 0x0025
/dev/mem opened.
Memory mapped at address 0xffff8b696000.
Bus error
root@Triton:~# 

  • Hi,

    devmem2 is not used to access the PHY registers, only memory locations with the AM62 address space. The registers in the document are referencing the registers on board the PHY.  There are two utilities in the TI file system for the SDK that provide access to the PHY on the mdio bus. Please use miitool or phytool to access the PHY registers. 

    Best Regards

    Schuyler

  • Hi Schuyler,

    Thanks for your information.

    Depending on the table below:

    I manipulate these registors above sequencely.

    After writing 0x0480 into Reg 0x0025 using phytool, I try to read Reg 0x0025 and I still get the value of 0x0000.
    Why is the value of Reg 0x0025 as 0x0000 not 0x0480??

    I also confirm that the values of Reg 0x0000, Reg 0x0010 and Reg 0x0009 are same as the ones I write.

  • Hi, 

    I will need to pass this question to the TI PHY team for support on the question that you are asking. Please allow a day or two for a response.

    Best Regards,

    Schuyler

  • Hi Kylix,

    See the following FAQ for using phytool. Please share the screenshots of your terminal, I would like to verify the correct syntax is being used.

    Can you read registers other than 0x25? For example, 0x1, 0x2, 0x3?

    Other than this, is the PHY operation working as expected? Is there link up and packet transfer happening?

    Thanks,

    David

  • Hi David,

    1. The below is the screenshot of my terminal:



    2. I can read other registers other than 0x25. Please refer to the screenshot.


    3. Before executing phytool:


      After executing phytool:


      Depending on the above both screenshots, RX and TX packages have been changed after executing phytool.

    Thanks.

    Kylix

  • Hi Kylix,

    I see the issue. Phytool is not set up to automatically read extended registers (>0x1F). 0x0025 is an extended register, so the process described in section 8.4.2.1 of the datasheet must be used to write this register. Let me know if this solves the issue.

    Thanks,

    David

  • Hi David,

    I refer to the section 8.4.2.1 of the datesheet and give a try. I successfully write the value I wanted into the register 0x0025.

    Thanks.

    Kylix