Forum Discussion
tehjingy_Altera
Regular Contributor
3 years agoHi Jacob
The feature that you are looking for is the i2c probe.
Unfortunately the library does not support this feature.
As for the addressing, did you change the addressing mode from 7Bit to 10Bit addressing?
You could search for "ALT_AVALON_I2C_ADDR_MODE_10_BIT "
Regards
Jingyang, Teh
Jacob11
Occasional Contributor
3 years agoI have managed to find in the i2c driver from intel (i2c_interface.c) the following code inside the i2c_read_reg function:
if (reg > 0xff) {
txbuf[0] = reg;
txbuf[1] = reg >> 8;
txsize = 2;
} else {
txbuf[0] = reg;
txsize = 1;
}
So there is at least some attempt to control the tx buffer when the value of the register is greater than 0xFF.
This TX buffer is sent to the function
alt_avalon_i2c_master_tx_rx(pdev, txbuf, txsize, rxbuf, rxsize, 0);
This function can be found in the file altera_avalon_i2c.c:
Something about this process is broken. As long as we remain in "else" everything works. As soon as
the register goes above oxFF and we need this txsize = 2 we have issues.