UCD3138064: How can I set UCD3138064 that send I2C address 0x7F return NACK?

Part Number: UCD3138064
Other Parts Discussed in Thread: UCD3138

Hi TI experts, 

When UCD3138064 PMBUS Address is set 0x58 and SLAVE_MASK=0x7F, I try send 0x7F address but it return ACK. 

image.png

 I want to implement send I2C address 0x7F return NACK, how can I set UCD3138064?

Thanks!

  • Hi Tina,

    Do you want to set up a custom I2C scenario where the UCD3138064 will send a NACK if the I2C command is 0x7F? So, the I2C steps will be the following:

    • UCD3138064 set as I2C slave
    • I2C master sends device address: 0x58, send byte CMD: 0x7F
    • UCD3138064 responds with NACK

    The thing is that the ACK response from the UCD3138064 does not necessarily mean that the UCD3138064 will do anything. It just means that the UCD3138064 acknowledges the command. Having the UCD3138064 return a NACK response purposely may be difficult to do. What is the reason why you want to do this?

    Regards,

    Jonathan Wong

  • Hello Tina,

    Correction, it is possible to manually choose a NACK based on different I2C commands. You will need to set up a Manual Command ACK. See section 10.3.7 in the UCD31xx TRM on page 378.

    Best,

    Jonathan Wong

  • Hi Jonathan

    I want to I2C master sends device address 0x7F and UCD3138064 responds with NACK.

    I want to do this because customer BMC system have address 0x7F device. When I2C master send address 0x7F to UCD3138064, UCD3138064 responds ACK. So BMC system and UCD3138064 conflict with address(0x7F). 

    Because of address(0x7F) conflict issue, I want to cancel support address 0x7F with UCD3138064.

    Thanks!

  • Hi Tina,

    As shown in my previous post, this is possible. You can manually choose which commands the UCD3138064 will send an ACK or NACK to. Please see the TRM for more information.

    Regards,

    Jonathan Wong

  • Hi Jonathan

    Thanks you for your reply.

    I think I didn't explain my problem clearly.

    Section 10.3.7 in the UCD31xx TRM is command solution, but my problem is address.

    Complementary, FW sets as follows:

    pmbus_address=0x58;

    PMBusRegs.PMBCTRL2.all = PMBCTRL2_HALF0_PEC_ENA + pmbus_address+ PMBCTRL2_HALF0_SLAVE_ADDRESS_MASK_DISABLE+PMBCTRL2_ALL_RX_BYTE_ACK_CNT;

    I2C master send receive byte to scan address 0x00 to 0x7F to UCD3148064, address 0x58 and 0x7F respond ACK, other address respond NACK.  Section 10.8.2 in the UCD31xx TRM explains that 0x7F is the reserved address. I think 0x7F respond ACK because of the reserved address of 0x7F. Therefore I ask how to set that address 0x7F can respond NACK.

    In addition, can the address 0x7F respond NACK be solved by just setting the register?

  • Hi Tina,

    Thank you for clarifying your issue. I see how this is not as simple as the solution in the TRM.

    Yes, 0x7F is a reserved command for the UCD3138. Are you saying that if you set PMBus ACK to manual mode, sending a 0x7F command will still return an ACK automatically? If you have not tried this yet, then I would try this first to confirm that the 0x7F commands responds an ACK in PMBus manual mode. 

    If the 0x7F command responds an ACK in PMBus manual mode, then that may be a hardware limitation of the device. I can look into this to see if this is true. I do know that the UCD3138 has PMBus commands it will respond to in ROM mode. These will automatically send an ACK. A full list of PMBus commands supported by UCD3138 ROM mode are shown in section 13.1.5

    Regards,

    Jonathan Wong

  • Hi Jonathan

    Thank you for your reply. But my problem is address.

    I try to set up a manual address acknowledge and I want address 0x7F respond NACK. FW set:

    Initialization PMBus:

                           PMBusRegs.PMBCTRL2.all = PMBCTRL2_HALF0_PEC_ENA

                                                             + pmbus_address

                                                             + PMBCTRL2_HALF0_SLAVE_ADDRESS_MASK_DISABLE

                                                            + PMBCTRL2_ALL_RX_BYTE_ACK_CNT

                                                            + PMBCTRL2_ALL_MAN_SLAVE_ACK;

     pmbus_idle_handler:

                            pmbst_shadow.all=PMBusRegs.PMBST.all;

                            if((pmbst_shadow.bit.SLAVE_ADDR_READY == 1) && (pmbst_shadow.bit.DATA_READY == 0))

                            {

                                    this_address = (PMBusRegs.PMBRXBUF.byte.BYTE0 & 0x7F);

                                    if(this_address == 0x58)

                                    {

                                            PMBusRegs.PMBACK.bit.ACK=1;

                                    }

                                    else

                                    {

                                            PMBusRegs.PMBACK.bit.ACK=0;

                                            MiscAnalogRegs.GLBIOVAL.bit.SYNC_IO_VALUE = !MiscAnalogRegs.GLBIOVAL.bit.SYNC_IO_VALUE;      //Debug pin

                                    }

                                    return ;

                            }

    Send address 0x7F, following this waveform, CH3 is transformation so FW respond NACK. But SDA/SCL respond ACK.

    Other address respond is correct. Address 0x77 respond NACK and 0x58 respond ACK that following FW setting.

    How can I do that send address 0x7F respond NACK?

  • Hi Tina,

    Thank you for sharing the code and the behavior based on the code. It looks like the 0x7F address will automatically respond with a NACK. I will look into this issue and get back to you by Friday. Our India team is on holiday for Diwali so I will need time to determine a work around.

    As a note, you can insert C code on E2E by going to Insert --> Code and selecting "C" in the dropdown.

    //Initialization PMBus:
    PMBusRegs.PMBCTRL2.all = PMBCTRL2_HALF0_PEC_ENA
                            + pmbus_address
                            + PMBCTRL2_HALF0_SLAVE_ADDRESS_MASK_DISABLE
                            + PMBCTRL2_ALL_RX_BYTE_ACK_CNT
                            + PMBCTRL2_ALL_MAN_SLAVE_ACK;
    
    //pmbus_idle_handler:
    pmbst_shadow.all=PMBusRegs.PMBST.all;
    if((pmbst_shadow.bit.SLAVE_ADDR_READY == 1) && (pmbst_shadow.bit.DATA_READY == 0))
        {
        this_address = (PMBusRegs.PMBRXBUF.byte.BYTE0 & 0x7F);
        if(this_address == 0x58)
        {
            PMBusRegs.PMBACK.bit.ACK=1;
        }
        else
        {
            PMBusRegs.PMBACK.bit.ACK=0;
            MiscAnalogRegs.GLBIOVAL.bit.SYNC_IO_VALUE = !MiscAnalogRegs.GLBIOVAL.bit.SYNC_IO_VALUE;      //Debug pin
        }
        return ;
    }

    Regards,

    Jonathan Wong