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.

USB-2-MDIO: Re: USB-2-MDIO: Source of USB-2-MDIO Would be very helpful

Part Number: USB-2-MDIO
Other Parts Discussed in Thread: MSP430F5529

In

Was said "We can share though a pseudo code and basic process for implementation if that would help you in your development.". How can I get it? It would be great to have a possibility to have a python script able to read and write into the PHY using the MSP430F5 launch pad. To make that it would be ok to have better understanding of the commands that USB-2-MDIO send over the com port to init (connect / select extended addressing etc), and the read an write registers. Another option would be to have command line options in the USB-2-MDIO tool to instruct it to connect / read and write.  That would allow to use the USB-2-MDIO tool from python to read and write.

  • Hi Roel,

    My apologies for the delay in the response, but I had to go through the source code to get your info.

    If you are writing a script to interface with the MSP430F5529, then the following information is needed.

    The MSP430F5529 opens the UART port using 9600 baud 8N1 format.

    The MSP430F5529 expects to receive a string of 7 to 12 chars in 300ms. If the string is not transmitted entirely in 300ms, the communication times out.

    To write to a register, send the following string: '=' 'PHY_ID[2]' 'REG_ADD[4]' 'DATA[4]' '/'

    To read a register, send the following string: '=' 'PHY_ID[2]' 'REG_ADD[4]' '/'

    Where '=' is beginning of string.

    Where PHY_ID[2] is a char coded decimal value between 0 and 32.

    Where REG_ADD[4] is a char representation of hex values from 0000 to 001F

    where DATA is a char representation of hex values from 0000 to FFFF

    where '/' is termination char for the string.

    For example, the string to be sent to the MSP430F5529 to write value 0x01e1 to register 0x4 at PHY_ID 0d10 would be: '=', '1', '0', '0', '0', '0', '4', '0', '1', 'e', '1', '/'

    When executing a read command, the MSP430F5529 will respond by printing a char[4] string to the serial port that contains the data in the queried register.

    Best Regards,
  • Thanks Rob ! I will let you know whether I get my own code working.