-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ULP reads one additional invalid bit from I2C chip register #938
Comments
The issue is that RTC I2C controller samples SDA on the falling edge of SCL, rather than on the rising edge (as a well-behaving I2C device should). This is mentioned in section 26.6.2.1 of the TRM (v2.3)
|
@igrr Thanks, that dispelled my doubts. |
@Mucka , is this issue solved? Can we close it? |
Sorry, for leaving it open. |
Same issue
So data on Logic analyser and data on R0 register are not matching |
I am using ULP coprocessor to read data from digital mems sensor. But
i2c_rd
ulp instruction seems to work incorrectly. Every time I am reading external device register I am receiving data shifted left and stuffed with1
bit, for example I see on oscilloscope correct transmission with0x33
byte sent by device but on ULP side I see0x67
byte, when I see0xFB
on oscilloscope I see0xF7
on ULP side. My code is simple:When starting ULP I am using option
which was mentioned in one of previous issues about ULP I2C, maybe this is a problem (but without this line I am unable to wake up main CPU anyway). I am receiving output:
when I clearly (I2C transmission on oscilloscope is correct) should receive
0x7B
so my most significant bit is lost.I have used I2C configuration from previous issue so I hope it is not a problem:
but as I mentioned, communication on I2C lines is perfectly fine, only data stored in memory is incorrect. I have also noticed that
bit mask
field ofi2c_rd
instruction does not work, I can put there any numbers and instruction works exactly the same (no bits are masked or anything).The text was updated successfully, but these errors were encountered: