zwenergy / gbaHD

An open-source GBA consolizer.
GNU General Public License v3.0
169 stars 21 forks source link

gbaHD is randomly resetting on its own #31

Open unmaker64 opened 6 months ago

unmaker64 commented 6 months ago

Hi there,

I've been experiencing random resets and I can't figure out what the issue could be. And by reset I mean the console is power cycling. It's been happening anywhere between just a few minutes to a few hours of playing, most often between 30 to 90 minutes of playing. They happen both in 1080p and 720p modes at 60Hz. I've tried multiple power supplies, both 5V 1A and 5V 2A. I've had resets while using an OEM SNES controller, 8BitDo 2.4GHz SNES controller, and a few different bluetooth controllers. What controller I use doesn't seem to make a difference. My gbaHD is built using an AGB-CPU-02 with the capacitors replaced and the Mancloud shield with an ATMEGA168p.

Out of curiosity, I let my console run for 24 hours and it didn't reset during that time. It only seems to reset randomly when it's receiving inputs from a controller.

I'm really stumped here. Could the ATMEGA168p be the issue? I'm using the 168p because the ATMEGA328p was out of stock at both Digikey and Mouser at the time I ordered my parts.

On a side note, I've noticed the WebUI is very stable now with the latest firmware. With previous firmwares it would randomly timeout after roughly 5 to 20 minutes, so thank you very much for that.

unmaker64 commented 6 months ago

Well I spoke too soon. My console is power cycling without any controller inputs.

zwenergy commented 5 months ago

Did you have this issue also before updating?

unmaker64 commented 5 months ago

Thanks for the reply.

I didn't notice this issue with firmware 1.3H, which is the firmware that I've played on the most. I only very briefly played on firmwares 1.3I and 1.3J, so I'm unsure if I would have had the issue with those. It wasn't until firmware 1.4A that I started to play more GBA again and noticed the issue. I have two fully assembled consoles with me and I have the same issue with both.

I should mention that I have sold a few of these and the initial console I had played on a lot was sold a while ago. I'm trying to remember any differences in the way I may have assembled them. The only notable thing that comes to mind is the way I programmed the SEA boards. The consoles I have now with the reset issue were programmed using the CMD-Shell method as described in the Shield wiki. I used this method as I was having too much trouble getting the installation to complete when using the https://gbahd.github.io/ link. I'll try to reprogram them using the https://gbahd.github.io/ link and see if that makes a difference.

unmaker64 commented 5 months ago

As I remember, I'm having issues getting the installation to complete when using the https://gbahd.github.io/ link. I'm able to get the installation to initialize by holding the BOOT button while clicking on Install but it eventually fails to complete. I may have just found a workaround for that which is not to just hold the BOOT button while clicking Install, but by holding the BOOT button until the installation completes. I also selected the Erase option. I'll let my console run now and see if there's any improvement.

And oddly enough, the SEA board on my second console is no longer recognized by my PC which I believe indicates a dead CP2102. Not sure how that might have happened.

unmaker64 commented 5 months ago

Unfortunately that didn't seem to help. My console reset about 1 hour in

unmaker64 commented 5 months ago

I was able to run both consoles for 50 hours without a reboot using the new 1.6.1 firmware. Thank you guys very much for the workaround

unmaker64 commented 3 months ago

Unfortunately I'm still getting occasional resets with shield firmware 1.6.1 so I've decided to reopen the issue.

If I understand correctly, the random resets are caused by some sort of bug while the WebUI is active. I believe the current firmware is meant to be a workaround for this issue by forcing the WebUI to become inactive after 3 to 5 minutes. What I've noticed is the WebUI does not consistently shut down after 3 to 5 minutes. Sometimes it will shut down after 3 minutes, sometimes after 10 minutes, and sometimes it's still active 50 minutes later. I've had a few resets occur because the WebUI did not shut down after the 3 to 5 minutes as I believe it should.

I was wondering if this is a known issue or if maybe something funky is going on with my setup. Any help would be greatly appreciated.