Closed teburd closed 4 years ago
Thanks for taking the time to post a complete test case! I'll take a look on my display when I can.
Thanks for making a sweet embedded library! Let me know if there's anything I can test for you
Will do! I don't have a scope (which is lunacy tbh) so I'll let you know :slightly_smiling_face:
I just spent the last hour in vain trying to get the vanilla schedule.rs
example working on my Blue Pill (STM32F103, so not the same CPU) to no avail. I do however have an STM32F411RET6 board I'll try to reproduce your issue on which I'll try when I'm next at home.
Have you got any further on your side? Can you try running your code on a different dev board to see if it's the HAL/chip maybe? Also, have you tried running in --release
mode, or with a lower I2C frequency?
I did try 100 khz i2c previously without success. I have an nrf52 board I can try and an stm32f303 nucleo board I can also try, will try and make time today for that
I gave your example code a test on my STM32F411 board and it works fine in --release
mode. I can't get my setup to work with a non-release build so I can't test that.
One thing I did do differently was to use the Git repo directly, not a release on crates.io. Can you give that a go with
[dependencies.stm32f4xx-hal]
git = "https://github.com/stm32-rs/stm32f4xx-hal.git"
I also found and fixed an issue I had where nothing would show on the display without adding .set_open_drain()
. That might also help you. Details here: stm32-rs/stm32f4xx-hal#120.
I'll try that out, thanks!
@jamwaffles just an update from me on this, did spend a good amount of time playing with this last night, but couldn't get things to build properly with alpha.2. crates.io and cargo don't seem to obey anything after the last point release version, it automatically updated emebedded graphics to alpha.3 which broke this crate for me. I tried to do everything via git and fixing things up without much luck. I'll try again once this is updated to use the newer embedded graphics crate and will attach a logic analyzer.
Can recommend anything sigrok supports if you don't have one yourself.
Cheers for the update. I released ssd1306
version 0.3.0-alpha.3 yesterday which hopefully fixes the versioning issue via #103. Can you try that version (and maybe delete Cargo.lock
or do a cargo update
after) and see if you get anywhere? Apologies for the breakage.
Can recommend anything sigrok supports if you don't have one yourself.
Aye I found a knockoff 8 channel one down the back of my couch lol. Haven't had time to test it yet. Let me know how you get on!
I think I'm going to chalk up the remaining issues with this display to me either destroying it by tossing it around like the aliexpress cheapo it is, I get a line down the middle of the screen but I don't believe that's a driver or e-g issue. Cheers! Thanks for the help
There's a growing corpus of issues with I2C generally so yeah, not sure it's this driver.
I get a line down the middle of the screen
Is it bi-colour? IIRC you sent a gif and it was a blue/yellow display? They have a physical gap between the blue and yellow areas which is annoying.
Yes its a bi-colour display with yellow/blue
ssd1306
in use (if applicable): 0.3.0-alpha.2Description of the problem/feature request/other
Randomly gets NACK back over I2C. I didn't spend much time debugging, I was trying to get a little Rust logo to bounce back and forth between sides of the screen and noted that it would get about half way before a NACK i2c error.
I hacked this together to tinker with rust, rtfm, and this sweet little display so perhaps I just did something wrong. I did look at the i2c signaling on my scope and it looked clean.
Test case (if applicable)
test case dependencies