OLED boot problems

Picking up and old thread, I know, but I’m having a similar issue with an oled screen - not with static on the screen, but occasionally on booting the saber , the screen just doesn’t start up. Shutdown the saber, reboot again and it works.

There isn’t a 100 percent definitive pattern, but the problem does seem more likely if the saber has been powered off for any length of time (i.e. more than a few minutes). Once it’s worked once, you can keep booting and shutting down in relatively quick succession and it keeps working. But if you leave ti for a while, odds are the first boot won’t work.

I’m horribly afraid it’s hardware, but as it will be fiddly to replace, I just wanted to exhaust any potential software hacks first.

@profezzorn, @NoSloppy - any suggestions before I get the toolbox out?

I can only wild guess at the moment.
What if you add a boot delay with #define CONFIG_STARTUP_DELAY 1000
Maybe giving it a chance to receive power for a moment before being initialized helps?

Would that delay startup for the whole system?
I’ll give it a go and see what happens…

Yes. 1 second.

Just tried 500. I can hear the delay, but first boot is generally still not playing.
Dang!

Just tried 1000. Still no good. It does seem to be the first boot after standing for a while pretty consistently.

So unless I can hack the code to send two boot commands in quick succession (which I suspect in reality would cause more problems than it solves, even if I could figure out how to do it) it looks like I’m going to have to swap it out! Sigh!

C’est la vie - no rest for the smiths! LOL!

Thanks for your help Brian - appreciated as always.
:slight_smile:

I split this off into a new thread, since I don’t think it was helpful to the original poster.

The problem might be in the star sequence itself.
The display has three different off states, but the code only uses one of them during standby.
Maybe transitioning from real off requires larger timeouts than transitioning from standby?

(Although I don’t think the display would remain in standby for more than a second when power is turned off…)

Another possibility would be that there is a register on the display that ends up in a random state, and the Proffie bootup sequence doesn’t reset that particular register for some reason.

The sequence of commands sent to the display on startup lives here:

Once upon a time this was written based on the adafruit ssd1306 library, and it’s startup sequence can be seen here:

Theirs have changed a bit since then. Wonder if mirroring those changes would help?