Re: CERN IPMC question

Hello Yuri,

this is probably not working as expected since you are not using a repeated start command for reading the register a specified on page 74. In your code you have two commands: a write cycle followed by a read. In this case there will be a Stop condition after the write.

Can you please try the following single function instead:

/*
Reads data from an I2C device register

@param addr I2C address of the device
@param reg device register number (4 bytes)
@param pdata pointer to the memory where received data should be placed
@param size the size of the data that should be read

@return 0 if no error.
*/
char i2c_dev_read_4bytesReg(unsigned short addr, unsigned int reg, unsigned char *pdata, unsigned char size)

In this case reg contains your command code (32 bits), and size should be 2. Unfortunately we don’t have a board where the SSYSMON I2C is connected to the IPMC, so we can’t try this out.

Let me know if it helps.

cheers,

Stefan

image001.jpg