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.

TDA4VM: Processors forum

Part Number: TDA4VM


Hi,

we use mdio to access PHY registers of BCM89834, using c22 register space. I have some questions about some macros defined in "/rtos-sdk-0703/pdk_jacinto_07_03_00_29/packages/ti/csl/src/ip/mdio/V4/cslr_mdio.h", more exactly, about macros like CSL_xxx_MASK and CSL_xxx_SHIFT, as they do not meet the specification of Clause-22 frame. For example, the macro "CSL_MDIO_USER_GROUP_USER_ACCESS_REG_PHYADR_MASK", should be defined to 0x0F80000 according to  Clause-22 format, but it is defined to 0x001F0000 in cslr_mdio.h. These macros are used to form a Clause-22 frame in function CSL_MDIO_phyRegRead2() in "/rtos-sdk-0703/pdk_jacinto_07_03_00_29/packages/ti/csl/src/ip/mdio/V5/priv/csl_mdio.c", and the frame is carried by a uint32_t variable named "regVal".

Here is a picture showing the difference: 

So my question is:

1. Am I right to consider the variable "regVal" as a Clause-22 frame ?

2. If the answer to question 1 is no, what is the exact place to form this frame?