-
Notifications
You must be signed in to change notification settings - Fork 112
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
Workaround random hangs when first powering on GBS-C #501
base: master
Are you sure you want to change the base?
Conversation
Recommend you do any pin init before your delay, just making sure the IO are in a controlled state. Otherwise, good idea, probably :) |
Oh, and what really matters: |
I won't have time to develop further because while I was debugging my main computer's sleep-wake issues, my SSD locked up on me for the second time (previously 3 months ago). I'm running a full system backup and may have to buy a new SSD.
|
Pin init: Just the basic IO setup. All the active pads should start in a resting state, where they won't cause trouble or draw current. But really, if it's for just 500ms, then this PR is fine as it is, those won't matter. |
Sorry I haven't looked into this further, I've mostly relied on my power strip to toggle the USB charger's AC input, rather than (flaky) barrel jack plugging. This results in (sometimes) a momentary voltage spike impulse of ±2 volts, then (a second or two later as the I haven't gotten any failed startups with this code in place, when toggling the GBS-C charger (and powering on my Wii in sleep mode) through the power strip. Is this good enough to merge?
I could make the following reorderings ( void setup()
{
pinMode(pin_clk, INPUT_PULLUP);
pinMode(pin_data, INPUT_PULLUP);
pinMode(pin_switch, INPUT_PULLUP);
// Wait for power to stabilize, to reduce the risk of the ESP failing to boot until
// manually reset (https://github.com/ramapcsx2/gbs-control/issues/480).
delay(500);
display.init(); //inits OLED on I2C bus
display.flipScreenVertically(); //orientation fix for OLED
//ISR TO PIN
attachInterrupt(digitalPinToInterrupt(pin_clk), isrRotaryEncoder, FALLING); Also I found out that Hopefully there's not more pin init that I've missed (are both clockgen and TV5725 hooked up to I2C and Sidenote: would I have been better off buying a DHO800 now, if I didn't already get a scope a few months ago? |
Fixes #480.