Skip to content
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

reset pin not activated properly on stm32 bluepill #254

Open
gzied opened this issue Dec 12, 2022 · 0 comments
Open

reset pin not activated properly on stm32 bluepill #254

gzied opened this issue Dec 12, 2022 · 0 comments

Comments

@gzied
Copy link

gzied commented Dec 12, 2022

setup: I am using STM32 to drive an ssd1306 display with 128x64 pixels. The reset pin is connected to PA3.
Observation: The display is not going out of reset even when calling Adafruit_SSD1306::begin with reset param = true.
Analysis: PA3 in STM32 is assigned to pin number 0xC3 (-61) which is higher than 80 -> sign bit is 1.
In Adafruit_SSD1306::begin, the code is doing 'rstPin >= 0' to check if reset pin was configured. rstPin value is -61, therefore it is considered as not configured and the library is not resetting the display.
Solution: replace 'if (reset && (rstPin >= 0))' by 'if (reset && (rstPin != -1))' in Adafruit_SSD1306::begin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant