Dear Sir/Madam,
I have a prototype with Vybrid VF3x chip. There is an I2C interfaced real time clock (RTC, Seiko S35390A) chip, which I connected it to I2C2.
I am using MQX 4.0.2
The MQX can detect the acknowlede bit only when I select the write to status register of RTC which is 0x60 with
param = 0x60;
ioctl (fd, IO_IOCTL_I2C_SET_DESTINATION_ADDRESS, ¶m)
fwrite (¶m, 1, 0, fd);
ioctl (fd, IO_IOCTL_FLUSH_OUTPUT, ¶m);
if I want to read the status register, which its address is 0x61 (or any other write command, like 0x62,0x63...), and put this value into the param, instead of 0x60, the MQX could not detect the ACK bit, even I see it with Oscilloscope.
Sould I use IO_IOCTL_I2C_SET_STATION_ADDRESS, instead of IO_IOCTL_I2C_SET_DESTINATION_ADDRESS?
When Should we use IO_IOCTL_I2C_SET_STATION_ADDRESS?
Wish you happy new year.
Mehmet Ali Ipin