FredQ
Posts: 13
Joined: Tue Jun 02, 2020 5:21 pm
Location: Scotland

EEPROM upgrade from GPIO?

Tue Jun 02, 2020 5:40 pm

Hi,

I bought a raspberry pi 4, 4GB last year in July. And I think I got a broken one, let me explain:

I have 2 raspberry pi 1B, two pi zero, and 3 raspberry pi 3, and in total 30 or 40 SD cards I've used in the pis, cameras and phones. (most of them Sandisk)
I've tried almost all of the SD cards I had in stock, and none of them worked in the pi 4, even though they all worked in the other pis.

I was trying it and giving up, and so on. I tried again this week, and after so much SD card movement I finally broke the SD card holder. My bad. It's still under warranty but I'm pretty sure it's not going to be covered (unless somebody knows otherwise? ;) )

Anyway, I've never used it, and now it's like a brick. The only thing that could save it would be to change the firmware for a recent one where I can boot from the network (I have some other pis doing exactly that). But since there's still the stock firmware from last year in the EEPROM, I'm stuck.

So here's the question: Is there a way you can upload a firmware via the GPIO?

If you're about to tell me I need to boot up with the new firmware on a SD card only once, please read my post again. :D

cleverca22
Posts: 581
Joined: Sat Aug 18, 2012 2:33 pm

Re: EEPROM upgrade from GPIO?

Wed Jun 03, 2020 1:40 am

if the SPI boot fails for some reason (making it fail might be tricky...) then the rpi4 will fall back to usb-device boot (not usb host/msd)

you can then use https://github.com/raspberrypi/usbboot to push code over for execution

the problem, is that the officially supplied `recovery.bin` isnt made for use over usb, and will just try to read from the uSD

there are also some OTP registers you can program to let GPIO disable SPI boot temporarily (like, hold a button to make it go into flashing mode), but without it booting, you cant program those to allow things

so your kind of stuck until you somehow repair the uSD slot or you want to desolder the SPI and reflash it out of the board, but its really small, so that may be harder

emma1997
Posts: 774
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: EEPROM upgrade from GPIO?

Wed Jun 03, 2020 2:42 am

I also broke an SD socket by hundreds of insertions. Turns out quite easy to fix by tacking on an old SD adapter. Only a few of the wires actually used and took less than 5 minutes:

viewtopic.php?f=29&t=270345&p=1642681#p1642681

Image

hippy
Posts: 7459
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: EEPROM upgrade from GPIO?

Wed Jun 03, 2020 12:12 pm

Replacing the SD Card socket would seem the easiest option. It technically doesn't have to be a well done job, just enough to get the Network / USB compatible Boot Eeprom loaded. Though having it working is useful if something gets screwed and you are back to needing an SD Card again.

But, given you never managed to get it to boot, it may be worth buying another Pi 4B first and ensuring you have an SD Card which will boot on that, just in case the first really is broken and all the effort of replacing the SD Card socket goes to waste.

FredQ
Posts: 13
Joined: Tue Jun 02, 2020 5:21 pm
Location: Scotland

Re: EEPROM upgrade from GPIO?

Wed Jun 03, 2020 4:58 pm

Yeah I think I will order another Pi 4 and start from there, thanks for your pointers.
It's a bit sad if it's dead though. It's not for the price of it, but it's just that we're such a throwaway society :roll:

I can't check that on mine obvsiouly: but can you see the EEPROM on the SPI controller accessible from the GPIO? or is it connected to a another SPI port on the Broadcom?

trejan
Posts: 1874
Joined: Tue Jul 02, 2019 2:28 pm

Re: EEPROM upgrade from GPIO?

Wed Jun 03, 2020 5:10 pm

FredQ wrote:
Wed Jun 03, 2020 4:58 pm
I can't check that on mine obvsiouly: but can you see the EEPROM on the SPI controller accessible from the GPIO? or is it connected to a another SPI port on the Broadcom?
The SPI EEPROM isn't connected to the same GPIO pins that are on the header.

FredQ
Posts: 13
Joined: Tue Jun 02, 2020 5:21 pm
Location: Scotland

Re: EEPROM upgrade from GPIO?

Wed Jun 03, 2020 7:30 pm

trejan wrote:
Wed Jun 03, 2020 5:10 pm
The SPI EEPROM isn't connected to the same GPIO pins that are on the header.
That's what I suspected, thanks for the confirmation

FredQ
Posts: 13
Joined: Tue Jun 02, 2020 5:21 pm
Location: Scotland

Re: EEPROM upgrade from GPIO?

Thu Jun 04, 2020 9:05 am

emma1997 wrote:
Wed Jun 03, 2020 2:42 am
I also broke an SD socket by hundreds of insertions. Turns out quite easy to fix by tacking on an old SD adapter. Only a few of the wires actually used and took less than 5 minutes:
I'm rather a beginner in soldering sadly. I'm more of a software kind of guy :D but I would be happy to try. If only I would be able to boot up the pi by holding a card in place, but I keep trying with no luck. Best I found to keep it in place was a clothe peg :lol: ... but still doesn't work.

In the actual state I'm not sure it's worth trying to fix the card holder...

Anyway, the new Pi 4 in on the way ;)

FredQ
Posts: 13
Joined: Tue Jun 02, 2020 5:21 pm
Location: Scotland

Re: EEPROM upgrade from GPIO?

Fri Jun 05, 2020 1:11 pm

Yoohoo! I received my new Pi today.

So... no problem to boot up this one. I noticed it had an old firmware so I created a quick recovery.bin sd card and it worked on first try.

Then I tried this recovery card on the other pi (with the clothe peg), and bing I get an error code that is not in the list:
2 long and 4 short blinks, then a red screen.

Surely the sd card should be readable when pressed in the socket with a clothe peg?
can the socket be completely damaged?

hippy
Posts: 7459
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: EEPROM upgrade from GPIO?

Fri Jun 05, 2020 2:24 pm

FredQ wrote:
Fri Jun 05, 2020 1:11 pm
Then I tried this recovery card on the other pi (with the clothe peg), and bing I get an error code that is not in the list:
2 long and 4 short blinks, then a red screen.
That seems to be the topic of this thread, though I haven't been following it in detail ...

viewtopic.php?f=28&t=276108

Might be worth reading that, continuing on there, rather than end up with multiple threads on what could be the same issue.

dkushagra
Posts: 12
Joined: Sun Jun 28, 2020 12:24 am

Re: EEPROM upgrade from GPIO?

Sun Jun 28, 2020 4:26 pm

Any solution for this issue ? I have the same problem broken (SD Card slot), If only I could update the EEPROM with the new USB Boot Bootloader. I am pretty good with soldering and can write over SPI.
Going through general information about the PI it seems that every board is booted before it is sent out. I am sure this is not done using a microsd card and done using the test pins. Do the test pins in the bottom correspond to the SD Card slot or the EEPROM ? If yes that would fix my issue otherwise the RPI will be a brick just cos of a broken connector :((((

FredQ
Posts: 13
Joined: Tue Jun 02, 2020 5:21 pm
Location: Scotland

Re: EEPROM upgrade from GPIO?

Sun Jun 28, 2020 9:50 pm

No I have kind-of given up with this one. Also I'm still angry at myself for breaking the SD card slot.

Now if you tell me there are some test PINs that I can use to attach a SD card, that could definitely help solving the issue. I should look into it 8-)

cleverca22
Posts: 581
Joined: Sat Aug 18, 2012 2:33 pm

Re: EEPROM upgrade from GPIO?

Sun Jun 28, 2020 10:48 pm

there probably are testpoints on the bottom of the board, that route to the sd card slot

if you think the SD slot is already beyond repair, you could just desolder it entirely, then use an ohm meter to find out which testpoint each pin of the socket goes to

and then documenting that, would let others use the testpoints directly, without having to remove the suspect SD slot fully

you would of course still need a 2nd SD slot breakout board, to attach via the testpoints

https://gist.github.com/cleverca22/b50a ... 572ad20d64

also, if netboot is enabled (requires flashing the EEPROM), the latest version can reflash itself again, from an update provided over the network
(but if something goes wrong, you still need recovery.bin on SD to recover)

trejan
Posts: 1874
Joined: Tue Jul 02, 2019 2:28 pm

Re: EEPROM upgrade from GPIO?

Sun Jun 28, 2020 11:06 pm

cleverca22 wrote:
Sun Jun 28, 2020 10:48 pm
there probably are testpoints on the bottom of the board, that route to the sd card slot
It doesn't look like there are test points for the SD interface on the Pi 4. The nearby test points are power related.

cleverca22
Posts: 581
Joined: Sat Aug 18, 2012 2:33 pm

Re: EEPROM upgrade from GPIO?

Sun Jun 28, 2020 11:30 pm

yeah, i checked mine and the only obvious ones are usb and ethernet-led related, nothing SD or SPI

viewtopic.php?f=28&t=278537

its looking like the only viable option is to desolder the eeprom, and reflash it outside of the pi, and that thing is dang tiny

dkushagra
Posts: 12
Joined: Sun Jun 28, 2020 12:24 am

Re: EEPROM upgrade from GPIO?

Mon Jun 29, 2020 12:43 am

Yeah I checked too. I wonder how they test the model 4B's. Earlier generation Pi's used to have test points to the SD card reader.
cleverca22 wrote:
Sun Jun 28, 2020 11:30 pm
yeah, i checked mine and the only obvious ones are usb and ethernet-led related, nothing SD or SPI

viewtopic.php?f=28&t=278537

its looking like the only viable option is to desolder the eeprom, and reflash it outside of the pi, and that thing is dang tiny

FredQ
Posts: 13
Joined: Tue Jun 02, 2020 5:21 pm
Location: Scotland

Re: EEPROM upgrade from GPIO?

Fri Jul 03, 2020 2:44 pm

cleverca22 wrote:
Sun Jun 28, 2020 11:30 pm
yeah, i checked mine and the only obvious ones are usb and ethernet-led related, nothing SD or SPI

its looking like the only viable option is to desolder the eeprom, and reflash it outside of the pi, and that thing is dang tiny
I'm not good enough at soldering I would make a complete mess of it :lol:

Return to “Advanced users”