Part Number: TMS320F28035
Other Parts Discussed in Thread: TPS40422
Hi.
I´m using a 28035 controller to talk with an evaluation module(PWR091EVM) that has a TPS40422 Dual-Output Buck Controller (and the two bucks) that accepts commands by a PMBus interface.
For that, I used the example code for PMBus interfaces that can be found in Control Suite (specific for the 28035 microcontrollers). I only changed the slave address(1B) and the clock pre-scaler(23, to get a 100kHz frequency).
My problem is in this little piece of code.
unsigned char I2CMaster_SlavePresent(unsigned char I2CMaster_SlaveAddress)
{
unsigned char ACKStatus;
I2caRegs.I2CSAR = I2CMaster_SlaveAddress;
I2caRegs.I2CCNT = 0x01; //prepare to send a dummy byte
I2caRegs.I2CDXR = 0x00; //dummy byte to be written
I2caRegs.I2CMDR.all = 0x2E20; // I2C TX, start condition
//DELAY_US(5000);
while (I2caRegs.I2CMDR.bit.STP == 1); // wait for STOP condition
ACKStatus = !I2caRegs.I2CSTR.bit.NACK;
return ACKStatus; // return whether or not
// a NACK occured
}
This is used in the PMBus master init in order to know that the slave is there, the problem is that even with the slave connected the micro gets stuck here. I was able to see the outputs with an oscilloscope and found out that after the master sends the address it doesn´t release the line in order to let the slave send an ACK bit, getting a step between the high logic value and the low logic value, so I know that the slave has the right address.
The master doesn´t send anything after the address (no command byte and no data byte).
Has anyone found a problem like this and was able to figure it out?
Thanks in Advance.