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.

Compiler/AMIC110: EtherNet/IP adapter issue

Part Number: AMIC110

Tool/software: TI C/C++ Compiler

Hello every experters

I try to use a project which was created by "PRU-ICSS-EthernetIP_Adapter_01.00.02.00".

When I debug it , in the "csl_mdioAux.h", there are a problem of a lable "CSL_MDIO_USER_ACCESS_REG_GO".

I try to find it's value in pdk_am335x_1_0_6, but it seems not defined here.

where is "CSL_MDIO_USER_ACCESS_REG_GO" defined ?

we need your help. Thanks a lot.

Best regard.

Tomiyama

  • The RTOS team have been notified. They will respond here.
  • Hi Tomiyama-san, I see below definitions and HW macro to set the field register value for CSL_MDIO_USER_ACCESS_REG_GO

    <PDK_Install_Path>\packages\ti\csl\src\ip\mdio\V2\cslr_mdio.h
    #define CSL_MDIO_USER_ACCESS_REG_GO_EN_0x1 ((uint32_t)(1U))
    #define CSL_MDIO_USER_ACCESS_REG_GO_EN_0x0 ((uint32_t)(0U))

    <PDK_Install_Path>\packages\ti\csl\src\ip\mdio\V2\csl_mdioAux.h
    HW_SET_FIELD(regVal, CSL_MDIO_USER_ACCESS_REG_GO, CSL_MDIO_USER_ACCESS_REG_GO_EN_0x1);

    thank you,
    Paula
  • hello Paula

    Thank you very much.

    But I don't know " CSL_MDIO_USER_ACCESS_REG_GO" is same as "CSL_MDIO_USER_ACCESS_REG_GO_EN_0x1 " or "CSL_MDIO_USER_ACCESS_REG_GO_EN_0x0 "?

    and then I find the second label of " CSL_MDIO_USER_ACCESS_REG_ACK" which was same as " CSL_MDIO_USER_ACCESS_REG_GO".
    I will port the code to another board with AMIC110_SOC, so I must know the real value of "CSL_MDIO_USER_ACCESS_REG_ACK".
    Thanks again for a lot help.

    best regard.
  • Hi Tomiyama-san, I think if you check how HW_SET_FIELD is defined your questions could be resolved. You can find this macro defined here:
    <PDK_Install_Path>\packages\ti\csl\hw_types.h

    Example below:

    /**
    * \brief Macro to write a specific field value. This macro first clears the
    * specified field value and then performs "OR" of the field value which
    * is shifted and masked. This will set the field value at its
    * desired position.
    *
    * \param regVal 32-bit variable containing the register value.
    * \param REG_FIELD Peripheral register bit field name, to which specified
    * value has to be set.
    * \param fieldVal Value of the field which has to be set.
    */
    #define HW_SET_FIELD32(regVal, REG_FIELD, fieldVal) \
    ((regVal) = ((regVal) & (uint32_t) (~(uint32_t) REG_FIELD##_MASK)) | \
    ((((uint32_t) (fieldVal)) << (uint32_t) REG_FIELD##_SHIFT) \
    & (uint32_t) REG_FIELD##_MASK))

    thank you,
    Paula
  • Hello Paula

    Thank you for your answer.
    I understand.