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.

RTOS/PROCESSOR-SDK-AM437X: Custom board issue

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: TPIC2810, SN74LVC1G08, TLK105

Tool/software: TI-RTOS

Hi

I am migrating the EtherCAT + EnDAT project from AM437x Industial EVM (version 1.4A) to my custom board.

The custom board is designed following the circuit of AM437x Industrial EVM, reducing peripheral module to EnDat, QSPI(for flash) and ICSS Ethernet port.

I am facing the problem that when the custom board execute BOARDGetDeviceCtrlModId() function in board_platform.c, it will jump to _exit() immediately.

Since the EtherCAT + EnDAT project on EVM board have UART and Industrial I/O circuit which custom board don't have.

Is this problem cause by the incorrect pinmux configuration?

Thanks a lot

Yi-Lin

  • The RTOS team have been notified. They will respond here.
  • Hi,

    Can you explain what software and release for this issue? In the BOARDGetDeviceCtrlModId(uint32_t devId, uint32_t devInstNum), what is the arguments you used in the function call that caused the exit?

    Was BoardGetDataAm43xx() executed properly inside above function? Then you may trace into BoardGetIdAm43xx() to see where the error came from? I thought board info is from I2C, if you didn't change the PINMUX for I2C part, it should be fine.

    Regards, Eric
  • Hi Eric,

    Thanks for replying.

    My software enviroment

    SYS/BIOS: ind SDK 02.01.03.02

    Compiler: GNU v4.8.4(Linaro)

    SYS/BIOS: 6.41.4.54

    XDCtool: 3.31.2.38

    The  EtherCAT + EnDAT project is developed by extending the FOC with EtherCAT example project.

    I didn't change the PINMUX setting.

    In the BOARDGetDeviceCtrlModId() function, the devId is 27(decimal) and the devInstNum is 0 

    I have check BoardGetIdAm43xx(), the "boardId" is set to "BOARD_UNKNOWN".

    I notice that there is a I2C EEPROM (CAT24C256W) which store board info.

    Do I need to config the I2C ID memory to be the same as AM437x IDK EVM? How to config it?

    And there is no I2C LED circuit(TPIC2810) on the custom board, is this also cause the problem?

    Thanks a lot

    Yi-Lin

  • Hi Eric,

    I use EEPROM programmer copy the ID memory data to my custom board.

    The board won't jump to _exit() now, but will stuck at while-loop in MDIOPhyRegRead() function.

    I found the similar issue on E2E community (https://e2e.ti.com/support/arm/sitara_arm/f/791/p/600426/2211180?tisearch=e2e-sitesearch&keymatch=MDIOPhyRegRead#2211180 )

    On the AM437x EVM and custom board, there is a PHY chip reset circuit using SN74LVC1G08.

    Because of the late delivery time of SN74LVC1G08, this chip is not placement on the custom board during the production.

    I have tired to short the AM437X_CAM1_DATA6 pin to PRUETH1_ERSETn and PRUETH0_RESETn, but this is not work.

    Since SN74LVC1G08 will arrive next week, I will continue the test on next week.

    Many Thanks.

    Yi-Lin

  • Hi Eric,

    I have put SN74LVC1G08 chip on custom board, but it still get stuck at while-loop in  bsp_tlk105_init() function.

    while(!MDIO_getPhyIdentifyStat((((PRUICSS_HwAttrs *)(
                                             pruIcssHandle->hwAttrs))->baseAddr + PRU_ICSS_MDIO), phy0addr, NULL))
    {
    }    

    The PRUETH circuit is designed following AM437x IDK without any change.

    So I think PHY address of two TLK105 should be correct.

    Is there any suggestion for me to figure out how to solve this problem?

    Please let me know

    Many thanks

    Yi-Lin

  • Hi

    I still stuck at the bsp_tlk105_init() function.

    And I found there is something weird when executing HW_WR_REG32() function in MDIOPhyRegRead (mdio.c line90)

    Since "baseAddr" and "regVal" value are "0x54432400" and "0x80400000"

    After executing HW_WR_REG32() function

    void MDIOPhyRegRead(uint32_t baseAddr,
                        uint32_t phyAddr,
                        uint32_t regNum,
                        uint16_t *pData)
    {
        uint32_t regVal = 0U;
    
        /* Wait till transaction completion if any */
        while(MDIO_USERACCESS_GO_EN_0x1 ==
            HW_RD_FIELD32(baseAddr + MDIO_USERACCESS(0U),
            MDIO_USERACCESS_GO));
    
        HW_SET_FIELD(regVal, MDIO_USERACCESS_GO, MDIO_USERACCESS_GO_EN_0x1);
        HW_SET_FIELD(regVal, MDIO_USERACCESS_WRITE, MDIO_USERACCESS_READ);
        HW_SET_FIELD(regVal, MDIO_USERACCESS_PHYADR, phyAddr);
        HW_SET_FIELD(regVal, MDIO_USERACCESS_REGADR, regNum);
        HW_WR_REG32(baseAddr + MDIO_USERACCESS(0U), regVal);

    The register value at 0x54432480 will be 0x20402000 not 0x80400000 on AM437x IDK 

    But on custom board the value will be 0x0040FFFF, which will not pass the if statement in MDIO_getPhyIdentifyStat() function (osdrv_mdio.c line509)

    /**
    * @brief Function to get the PHY ready status
    *
    **      Function returns whether the PHY is identified and ready
    *
    *       MDIO init shall be done before using this function, The Sem handle need to be passed if the
    *       Thread safe MDIO read is used, Pass NULL otherwise
    *
    * @param mdioBaseAddress    [IN] MDIO Base Address
    * @param phyAddr            [IN] Phy address of the port
    * @param mdioSemhandle      [IN] Semaphore handle if thread safe MDIO access is used
    *
    *  @retval TRUE if Phy is ready
    *          FALSE if Phy not ready
    */
    uint8_t MDIO_getPhyIdentifyStat(uint32_t mdioBaseAddress, uint32_t phyAddr,
                                    MDIOSEM_Handle mdioSemhandle)
    {
        uint16_t regStatus;
        MDIO_regRead(mdioBaseAddress, phyAddr, PHY_PHYIDR1_REG, &regStatus,
                     mdioSemhandle);
    
        if(regStatus == 0x2000)
        {
            return TRUE;
        }
    
        else
        {
            return FALSE;
        }
    }

    Is there anyone can help me get through this problem?

    Please help...

    Yi-Lin