daveee Posted September 7, 2018 Report Share Posted September 7, 2018 (edited) Hi! So I have my first midibox up and running :) 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. Am I missing something? TIA! Edited September 13, 2018 by daveee Quote Link to comment Share on other sites More sharing options...
Antichambre Posted September 7, 2018 Report Share Posted September 7, 2018 Hi did you configure your bootloader? Best Bruno Quote Link to comment Share on other sites More sharing options...
daveee Posted September 7, 2018 Author Report Share Posted September 7, 2018 Yes. Went through that procedure using the bootloader app, i.e. set lcd_type etc. I notice that if once I power the board up, I press the reset button, the LCD then initialises... Quote Link to comment Share on other sites More sharing options...
Antichambre Posted September 7, 2018 Report Share Posted September 7, 2018 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... Quote Link to comment Share on other sites More sharing options...
Antichambre Posted September 7, 2018 Report Share Posted September 7, 2018 Sorry this module doesn't exist, the ssd1306 is supported by the 'universal' one... I'd got this issue by the past but I don't remember how I solved it... :/ Quote Link to comment Share on other sites More sharing options...
daveee Posted September 8, 2018 Author Report Share Posted September 8, 2018 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. Quote Link to comment Share on other sites More sharing options...
daveee Posted September 8, 2018 Author Report Share Posted September 8, 2018 22 hours ago, Antichambre said: I'd got this issue by the past but I don't remember how I solved it... :/ No worries, thanks anyway! i'll keep trying things :) Quote Link to comment Share on other sites More sharing options...
Antichambre Posted September 8, 2018 Report Share Posted September 8, 2018 (edited) Which value did you put for the reset cap and resistor?http://ucapps.de/mbhp/mbhp_lcd_ssd1306_single_mios32.pdf Maybe the cap takes too much time to load increase resistor, decrease the cap(or remove it) Edited September 8, 2018 by Antichambre Quote Link to comment Share on other sites More sharing options...
daveee Posted September 9, 2018 Author Report Share Posted September 9, 2018 10uF and 1k. I'll give that a try! Maybe the display I have is a bit different spec to the one TK was using... Quote Link to comment Share on other sites More sharing options...
Hawkeye Posted September 9, 2018 Report Share Posted September 9, 2018 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 :). If this was not the problem, please ignore :). Many greets, Peter Quote Link to comment Share on other sites More sharing options...
Antichambre Posted September 9, 2018 Report Share Posted September 9, 2018 Yes remove the Cap fist and try. Could you share the spec and the origin of the one you've got? Could be interesting to know... Quote Link to comment Share on other sites More sharing options...
Antichambre Posted September 9, 2018 Report Share Posted September 9, 2018 Just now, Hawkeye said: 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 Quote Link to comment Share on other sites More sharing options...
daveee Posted September 13, 2018 Author Report Share Posted September 13, 2018 (edited) Thanks all for the replies! 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... For future reference, I am using these extremely common (and cheap!) 0.96" 128x64 OLED displays, from ebay, such as this: https://www.ebay.co.uk/i/302104546088?chn=ps&var=600918131598 Edited September 13, 2018 by daveee Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.