Timeout on I2C Write BUSY - not all the time - SSD1306 #4938
Replies: 1 comment
-
Posted at 2020-10-08 by parasquid Which pins are you using the I2C on? There was a similar issue that was solved via using Software I2C http://forum.espruino.com/comments/15558111/ If it's just an SSD1306 then it should be fine to use software I2C If you need hardware I2C you can use I2C2 on b3 and b10 Posted at 2020-10-08 by Mrbbp Oh gorgeous! it's a beautifull rainy day Posted at 2020-10-08 by parasquid Happy to know software I2C works for you :P I think I'll default to software I2C for now as well until the hardware I2C on pico gets fixed (well, it's only I2C1 on b6/b7 that's having issues, I2C2 works well) Posted at 2020-10-08 by @gfwilliams
Do you think this something that used to work that doesn't now? Seems like an odd one as nothing has really changed in that part of the STM32 firmware in years Posted at 2020-10-08 by parasquid I think so, I was planning on getting an older version flashed and see if that one works (because I remember using hardware I2C on the pico before too) and then bisecting. Or maybe it just wasn't noticed and I just defaulted to software I2C that time? Posted at 2020-10-08 by parasquid You're right, I can't seem to find an old enough binary that works O_O My mind must be playing tricks on me.
Posted at 2020-10-08 by @gfwilliams Thanks for checking - well at least it's not a regression then. I'll look into whether there's anything I can do to get it going (eg shutting down the serial port) Posted at 2020-10-08 by @gfwilliams Ok, well this is odd. I've got a SSD1306 (the one actually pictured in http://www.espruino.com/SSD1306) connected to a Pico running 2v07 and the exact JS code in the example, and it works great!
So I wonder what the difference is with your setup? Worth noting that Software I2C is able to use the internal pullup resistors, but for some reason hardware I2C isn't - so if the I2C device doesn't have internal pullups then software will work but hardware won't. Posted at 2020-10-08 by parasquid Ah! In this case I wasn't using the SSD1306 (although I can try that in a bit) but rather the LCD display from the other thread. Maybe that is the issue? Some sort of stray capacitance or weak pullups from the HD44780 LCD Display ? Posted at 2020-10-08 by parasquid Yeah, just checked with a spare SSD1306 - the above code works without issues. Posted at 2020-10-08 by parasquid Tried again with the HD44780 LCD Display, connecting it to 3v3 or VBAT still gets the timeout. I'll try and see if pullup resistors would work, maybe that's the culprit. Edit: looks like the I2C expander already has pullups: https://www.best-microcontroller-projects.com/mcp23017.html Might have to break out an oscilloscope for this one :( Posted at 2020-10-08 by parasquid Adding additional 4.7k pullups don't seem to do anything different. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-07 by Mrbbp
Hello,
it's the second time i'm asking help for this init i2C problem...
This time, i play with a small SSD1306 oled screen.
in 2017 i build some pieces with this screen and picos and every time i switch on the build, the screen init correctly.
this week i start a new project with this display (same screen batch from 2017) but i have lot of pb to initialize the screen with a boring timeout and a busy error.
Have you any idea ?
retrofit with an old firmware?
is it possible to have an old google app version? (which works)
I just want to have a(n) (art)piece working (as previously). I'm suppose this not a hardware pb but a software pb...
if i use my old code, it does not work as expected (as the 2017 batch)
i work with espruino pico 2.06 firmware and googl app ide (not the online one) cause i use custom local font.
regards
Beta Was this translation helpful? Give feedback.
All reactions