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.

TPS23880: how do detect port.

Part Number: TPS23880
Other Parts Discussed in Thread: TPS23881

Hi Sir,

How do we map the PoE port to the Ethernet port at the beginning?

I have 4 ports that must be powered to bt, so the initial setting should be the following:


tps_SetDevice4PPowerAllocation(tps2388x_i2cAddList[i],_4P_90W,_4P_90W)

If I connect Ethernet port1 to PD now, take the value according to the sample code:

tps_GetDeviceAllInterruptEvents (tps2388x_i2cAddList[devNum],

> TPS_ON, &powerEnablePortEvents, &powerGoodPortEvents,

> &detectionPortEvents,

> &classificationPortEvents, &icutPortEvents, &disconnectPortEvents,

>                                                 &inrushPortEvents,

> &ilimPortEvents, &supplyEvents);

>         if(intStatus.CLASC_Classification_Cycle)

>         {

>             uint8_t i;

>             uint8_t target;

>             target = classificationPortEvents;

>             for (i = TPS238X_PORT_1; i <= TPS238X_PORT_4; i++)

>             {

>                if (target & 0x1)

>                 {

>                 }

>             }

>         }

I will find that sometimes TPS238X_PORT_1 or TPS238X_PORT_2 have values, and sometimes TPS238X_PORT_1 and TPS238X_PORT_2 have values ​​at the same time.

I want to know if it needs additional settings, how to identify which port it is currently connected to? 

look forward to your reply.

  • Hi Tommy, we have forwarded this to appropriate engineer who can support. Please note it is US holiday so there may be a delay in our E2E response. Thank you!

  • Hi Tommy,

    TPS238X_PORT_x is # define variables to make the code more readable and they don't have any actual functions. You can just use 1,2,3,4 in your code. 

    typedef enum {
    TPS238X_PORT_1 = 1,
    TPS238X_PORT_2 = 2,
    TPS238X_PORT_3 = 3,
    TPS238X_PORT_4 = 4
    } TPS238x_PortNum_t;

    One thing you need to make sure is your 0x29 setting matches your hardware design on the port mapping. BTW, we recommend TPS23881 for BT applications as it uses 200mohm sese resistor and has better performance with lower cost. Thanks.

    Best regards,

    Penny