IPMC reading data from Xilinx FPGA using SYSMON

Hi Julian,

we are coming back to a task / problem I’ve already mentioned to you:
we would like to get the temperature from an internal temperature sensor of our FPGAs.
For quite some time we were not able to establish any i2c communication with the FPGAs due to hardware issues.
Now the i2c requests do not fail any more - but unluckily we do not get the expected answers.

Having had a look at the Xilinx manual https://www.xilinx.com/support/documentation/user_guides/ug580-ultrascale-sysmon.pdf
I guess the problem is caused by the incorrect format of our request.
You have already provided us with a function which reads 2 bytes from the slave - but this is only half of the story.
As you can see in the screenshot below, we have to sent a 32-bit command to the FPGA.
Right now, I’m not aware of any way how this can be done.
I don’t know if this is worth an additional function but since Xilinx FPGAs are heavily used on site others may run into the same problem.
And we are stuck right now …

cheers

ulf

Hi Ulf,

The 4bytesReg functions have been implemented but not documented (sorry for that). Please, could you try using:

Read function:

/**
    Reads data from an I2C device register

    @param addr	    I2C address of the device
    @param reg	    device register number (2 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_2bytesReg(unsigned short addr, unsigned short reg, unsigned char *pdata, unsigned char size)

Write function:

/**
    Writes data to an I2C device register

    @param addr	    I2C address of the device
    @param reg	    register number of the device
    @param pdata    pointer to the data that should be written
    @param size	    the size of the data that should be written

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

Dear Ulf,

This is a good news. I'm happy to know that it works well. Concerning the problem with the ipmc address, it seems to be linked to discourse. Maybe because I replied from discourse.

Best regards,
Julian