I have the SSD1306 GLCD working fine - but ONLY once I have flashed my program using MIOS Studio, or if I’ve flashed the bootloader app.
If I reset the board with my program flashed, the GLCD does nothing. As soon as program it again from MIOS Studio, it starts working, and then works fine from then on, until I power down the board.
I’m doing
MIOS32\_LCD\_Init(0);
and then the usual MIOS32_LCD_Clear, MIOS32_LCD_PrintString etc… which all work fine once the display is actually initialised.
Did you try to change the lcd type in your Makefile?
# $Id: Makefile 1820 2013-09-01 15:44:33Z tk $ ################################################################################ # following setup taken from environment variables ################################################################################ PROCESSOR = $(MIOS32\_PROCESSOR) FAMILY = $(MIOS32\_FAMILY) BOARD = $(MIOS32\_BOARD) #LCD = $(MIOS32\_LCD) # explicitely select the correct LCD driver # KS0108 is supported by the "universal" driver # please configure the bootloader info range accordingly # with the bootloader update application LCD = ssd1306
If not, try it, recompile and upload your app and tell me…
ah yes I already tried explicitly specifying the universal driver!
# $Id: Makefile 1820 2013-09-01 15:44:33Z tk $ ################################################################################ # following setup taken from environment variables ################################################################################ PROCESSOR = $(MIOS32\_PROCESSOR) FAMILY = $(MIOS32\_FAMILY) BOARD = $(MIOS32\_BOARD) LCD = universal
it’s odd - it works after i’ve re-flashed my program, just not after power-up.
I thought it might be some sort of delay needed before calling MIOS32_LCD_Init() — but I tried a several second delay in code and it made no difference.
Many OLEDs depending on the cap/resistor reset line do actually need a power down/power up phase (try unplugging from USB, no MIOS studio needed for correct start). That is because a successful display init depends on the hardware reset mechanism via cap & resistor. For the new LoopA boards, Andy has invented a solution, how the reset switch will also perform a hardware display reset without the need of powering down/up :).
Many OLEDs depending on the cap/resistor reset line do actually need a power down/power up phase (try unplugging from USB, no MIOS studio needed for correct start). That is because a successful display init depends on the hardware reset mechanism via cap & resistor. For the new LoopA boards, Andy has invented a solution, how the reset switch will also perform a hardware display reset without the need of powering down/up :).
Ohhh yes I remember this issue now it was for the SSD1322 not SSD1306, and it was the opposite(no init on upload). thx Peter
I solved it in the end by hooking the RESET pin of the OLED to a GPIO pin of the STM32F4 (J10A pin 7 on the midibox board) and a pull-up resistor, and then pulling the pin low in code for 1s at boot, to ensure the OLED module is reset properly.
I couldn’t get any combination of capacitors and resistors to work. I noticed that I have quite a lot of noise on my 3V rail, caused by some WS2812 LEDs I have - even though they are running off a different 5V supply, I guess there is an issue with the common ground. Don’t know if this was related. Everything else runs fine…