- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to use I2C over iLLD but I am facing an issue with slave addressing of external EEPROM.
EEPROM has different address depending on whether I write or read as well if I read/write upper addresses.
During configuration, I set: i2cDeviceConfig.deviceAddress = 0xa0 and this is fine when I have to write something, but when I have to read, deviceAddress should be set to 0xa1. I see that there is a function IfxI2c_setSlaveDeviceAddress but whenever I call this function it causes Data Access Asynchronous Error trap. I tried to call it this way to unlock the registers:
uint16 pwd = IfxScuWdt_getCpuWatchdogPassword();
IfxScuWdt_clearCpuEndinit(pwd);
IfxI2c_setSlaveDeviceAddress(i2c.i2c, 0xA1);
IfxScuWdt_setCpuEndinit(pwd);
but no luck, I have the same issue. Can someone help me with this issue? Maybe there is another way of setting a I2C slave address. My alternative way of doing it is by defining different configurations but it does not seem efficient (or I am wrong).
I am using Hightec compiler and SafeRTOS but the functions calls are executed before the scheduler is started.
Thank you in advance.
Greetings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi gott,
There is a demo code for I2C read. Please notice that the read address is 0xAF and write address 0xAE for MCP79411 as below
About READ OPERATION details, please refer to datasheet related.
Please refer above and then debug.
dw