-
Notifications
You must be signed in to change notification settings - Fork 13.3k
I2C >> Bit Error when compiling for 160 MHz #6497
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
Comments
Got my trusty Oscilloscope going and compared the signals for CPU@80MHz and CPU@160MHz. I'm sending to Adress 0x08 and transmitting a single Character: "S". S in binary reads 01010011. On 80MHz I recive 01010011 (as expected). Besides the error, the timing is quite different. Running 80MHz, one cycle is roughly 23us. @160MHz a typical cycle is 17us. On the screenshots of the oscilloscope it' s pretty obvious, that the first bit of 01010011 is not low when the CPU is running at 160MHz. |
Maybe the same issue as #5762 |
I read that issue - definitly related. |
Can you try this? |
Removing those two interrupts breaks the reciver completely even at 80 MHz (the script outputs nothing). Sadly, that's not it, but thanks a lot, @Jason2866 ! |
Maybe this one is related? The PR description has a lot of links referring to the original issue and a detailed readme page describing what the original author tries to fix. |
@TD-er - definitly related. Just replaced the core_esp8266_si2c.cpp with the one from the PR - now works like a charm (even at 160MHz). Great Job, guys! |
#6592 is merged and released. |
I am using CORE 2.7.2 I have the same problem, anyone else? |
Basic Infos
Platform
Settings in IDE
Problem Description
Trying to let two ESPs talk to each other via I2C - easy, right? Obviosly not, when boths CPUs running at 160 MHZ.
SENDER SKETCH
RECIVER SKETCH
Compiled with both CPUs are running at 80 MHz, the reciver gets "aaAA" from the sender.
If I compile both scripts at 160 MHz CPU speed, the reciver gets
instead.
To get an idea, whats been send/recived, I dumped every recived by in the reciver script:
So the first bit of the data should have been 0 - but gets recived as 1. This sets the MSB of the first byte to 1, changing the expected 97 to a 225.
I use two 2k2 resistors as pullups on the SCL/SDA lines. Sadly no logic analyzer around, so I can't pinpoint the sender or reciver as the culprit.
The boards are connected via a triple base board, only two CPU Modules are plugged in.
Any help would be greatly appreciated! I know: simply go back to 80 MHz... but I really like to get this setup working.
The text was updated successfully, but these errors were encountered: