cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
eimazm
Visitor
Visitor
12,460 Views
Registered: ‎07-23-2014

ZC702: Programming VADJ to 3.3V via I2C

Jump to solution

Hello.

 

I'm trying to configure VADJ to 3.3V via I2C. I'm using the xpsiic driver but I can't communicate with the UCD9248.

 

I follow these steps:

 

1. Remove J12 jumper and power on the ZC702 board.

2. Initialize I2C peripheral.

3. Select channel 7 in I2C multiplexer in order to communicate with PMBUS

4. Send VOUT_COMMAND to UCD9248 (I2C address = 53)

 

When I communicate with I2C multiplexer it works fine, but when I try to communicate with the UCD9248 y doesn't work.

 

Did someone make it work????

Can anybody help me?

 

Thanks.

0 Kudos
Reply
1 Solution

Accepted Solutions
athandr
Xilinx Employee
Xilinx Employee
21,156 Views
Registered: ‎07-31-2012

Hi,

 

The changes by the TI Power Designer, overwrites with an XML scrit and changes the voltage to 3.3V. Power-up shows 3.3V. The change is permanent. 


However with I2C, we do not have a design.

Thanks,
Anirudh

PS: Please MARK this as an answer in case it helped resolve your query.Give kudos in case the post guided you to a solution.

View solution in original post

7 Replies
athandr
Xilinx Employee
Xilinx Employee
12,448 Views
Registered: ‎07-31-2012

Hi,

 

You can read through the Pgs 37 and 58 of this guide for guidelines on how to change the VADJ voltage level - http://www.xilinx.com/support/documentation/boards_and_kits/zc702_zvik/ug850-zc702-eval-bd.pdf.

 

However, why dont you use the TI power Designer tool to change this VADJ voltage. It should be much easier to do this with the TI tool. You can get the TI power adaptor free of cost if you have purchase the evaluation kit and have a voucher number for the TI cable. Check Point 2.b of this AR for furthe rinformation - http://www.xilinx.com/support/answers/54012.html

Thanks,
Anirudh

PS: Please MARK this as an answer in case it helped resolve your query.Give kudos in case the post guided you to a solution.
0 Kudos
Reply
eimazm
Visitor
Visitor
12,442 Views
Registered: ‎07-23-2014

My code is:

 

 

XIicPs Iic; /**< Instance of the IIC Device */

 

 

/* I2C Initialization */

 

int I2C_Init(void)
{


int Status;
XIicPs_Config *Config;


Config = XIicPs_LookupConfig(IIC_DEVICE_ID);
if (NULL == Config)
{
return XST_FAILURE;
}

Status = XIicPs_CfgInitialize(&Iic, Config, Config->BaseAddress);
if (Status != XST_SUCCESS)
{
return XST_FAILURE;
}


XIicPs_SetSClk(&Iic, IIC_SCLK_RATE);

return Status;


}

 

/* Select PMBUS in I2C multiplexer*/

 

command = 0x80; // PMBUS channel

XIicPs_MasterRecvPolled(&Iic, &command, 1, 0x74);

 

/* Send VOUT_COMMAND to UCD9248 */

 

buffer[0] = 0x21; // VOUT_COMMAND

// vout = 3.3 V -> 3.3*2^12 = 13516 = 0x34CC

buffer[1] = 0xCC; // vout value low byte

buffer[2] = 0x34; // vout value high byte

XIicPs_MasterSendPolled(&Iic, buffer, 3, 0x53);

 

 

 

The program execution hangs at XIicPs_MasterSendPolled(&Iic, buffer, 3, 0x53).

 

 

0 Kudos
Reply
eimazm
Visitor
Visitor
12,443 Views
Registered: ‎07-23-2014

First of all, thank toy for your answer.

 

I must configure VADJ programatically because I'm developing a standalone application. It is not possible to use the TI USB-TO-GPIO in conbination with TI power designer.

 

I have a doubt concerning TI power designer. When you program UCD9248 to provide 3.3v, Is it a persistent change or when you power down or reset the board it is set to default value 2.5V??????

 

 

Thank you again.

0 Kudos
Reply
athandr
Xilinx Employee
Xilinx Employee
21,157 Views
Registered: ‎07-31-2012

Hi,

 

The changes by the TI Power Designer, overwrites with an XML scrit and changes the voltage to 3.3V. Power-up shows 3.3V. The change is permanent. 


However with I2C, we do not have a design.

Thanks,
Anirudh

PS: Please MARK this as an answer in case it helped resolve your query.Give kudos in case the post guided you to a solution.

View solution in original post

mhd1973
Visitor
Visitor
12,266 Views
Registered: ‎11-07-2014

hi,

i have the same problem in my project that to monitoring the power on my board.

but why do you use this adress 0x53 in this fuction XIicPs_MasterSendPolled(&Iic, buffer, 3, 0x53);?

thanks

0 Kudos
Reply
11,712 Views
Registered: ‎12-28-2014

I was also stuck with this issue for quite a few days until I stumbled upon the XAPP1159 design files.

 

The binary I2C addresses listed in UG850 Table 1-19 are incorrect for the PMBus devices. In the note for the table, it lists the I2C addresses for the TI Power controllers as 52, 53, and 54 in decimal (these are correct, the binary in the table is not). XAPP1159 (i2c_utils.c) has the correct addresses as 0x34, 0x35, and 0x36 for the three power controllers. The one that sets VADJ is hex address 0x35.

 

Keep in mind that you may also have to change VOUT_MAX or the board will shutdown with an overvoltage event.

 

Code:

int Iic_Init(u16 DeviceId) {
    int Status;
    u8 command;
    u8 vout_33_cmd[] = {PMBUS_VOUT_COMMAND, VADJ_LOW, VADJ_HIGH}; //{0x21, 0xCD, 0x34}
    XIicPs_Config *IicConfigPtr;

 

    /*
     * Initialize the IIC driver so that it's ready to use
     * Look up the configuration in the config table,
     * then initialize it.
     */
    IicConfigPtr = XIicPs_LookupConfig(IIC_DEV_ID);
    if (!IicConfigPtr) {
        return XST_FAILURE;
    }

    Status = XIicPs_CfgInitialize(&Iic, IicConfigPtr, IicConfigPtr->BaseAddress);
    if (Status != XST_SUCCESS) {
    return XST_FAILURE;
    }

 

    /*
     * Set the IIC serial clock rate.
     */
    XIicPs_SetSClk(&Iic, IIC_SCLK_RATE); // 100,000Hz

 

    /* Select PMBus on IIC channel 7 */

    command = IIC_SLAVE_ADDR; //0x80
    Status = XIicPs_MasterSendPolled(&Iic, &command, 1, IIC_MUX_ADDR); //0x74
    if (Status != XST_SUCCESS) {
        return XST_FAILURE;
    }
    while (XIicPs_BusIsBusy(&Iic)) {
        /* Wait */
    }

 

    /* Set PMBus to 3.3V */

    Status = XIicPs_MasterSendPolled(&Iic, vout_33_cmd, 3, PMBUS_VADJ_ADDR); //0x35

 

    return Status;

}

0 Kudos
Reply
11,629 Views
Registered: ‎12-28-2014

A few more notes:

  • POWER_GOOD_ON (cmd 0x5E) level may need changing (especially for new VADJ<2.5V)
  • VOUT_OV_FAULT_LIMIT (cmd 0x40) sets the trigger voltage for a shutdown, not VOUT_MAX as I thought
  • VOUT_MAX is the maximum level that VOUT_COMMAND can be set. Any higher will default to VOUT_MAX instead.

A successful reconfigure should leave LED DS24 on (you may need to move jumper J12 off and on for some reason). Although DS24 is part of rail 4, and VADJ is rail 1, the rails may be dependant on each other for certain fault conditions and power good levels (set by GPIO_SEQ_CONFIG command 0xF3).

 

Note that I have no idea what the default values for any of these are; reading hangs since the UCD9248 never ACKs to the read commands (even with repeated start set and commanding by register manipulation).

 

Saving these values to the non-volatile memory on the controller means you won't have to reconfigure after every power-up, but the Xilinx values are lost. Saving is STORE_DEFAULT_ALL cmd 0x11, RESTORE_DEFAULT_ALL is cmd 0x12.

 

After changing the following settings, VADJ was 3.3V measured by multimeter on J71:

**Deactivate VADJ (rail 1)**

  • POWER_GOOD_ON: 3.1V
  • VOUT_OV_FAULT: 3.6V
  • VOUT_MAX: 3.5V
  • VOUT_COMMAND: 3.3V

**Reactivate VADJ**

**Save new defaults**

0 Kudos
Reply