User avatar
Thursten
Posts: 50
Joined: Thu Jul 20, 2017 3:19 pm
Location: Eindhoven, The Netherlands

Reflash Pi Zero W factory rom?

Fri Dec 14, 2018 4:02 pm

Hey guys!
So lately I've posted in one of the topics around here about my Pi Zero W not recognizing it's Wifi and Bluetooth devices, it so turns out there has been a problem at the Pi factory..
So apparently the Raspberry Pi's have some sort of super lowlevel rom/firmware, that gets flashed in the factory on some memory on the PCB..
Now there has been an error/mistake made at the factory as a batch of Pi Zero W's got the wrong rom flashed and so it "thinks" it has different hardware.

Now I have gotten a new one, but the old one still kind of works, can I reflash that firmware so the right hardware is detected? (Mind you, I'm not talking about the SD card image!!)

Here is the link to the article where it is kind of explained: Article on Pimoroni forums

Thanks in advance!
I hope the explanation is a bit clear.. As I don't know how to explain it in little text, please feel free to ask for more clarification! =)

Greets,
Thursten

User avatar
bensimmo
Posts: 4187
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Reflash Pi Zero W factory rom?

Fri Dec 14, 2018 4:05 pm

There was an OTP write for a Camera problem back with the Zero/Zero"C"?

But that as much as I can remember (there is a sticky thread on that, Zero missing camera iirc).

Edit found,
Something like this viewtopic.php?t=160611

W. H. Heydt
Posts: 11115
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Reflash Pi Zero W factory rom?

Fri Dec 14, 2018 5:36 pm

Thursten wrote:
Fri Dec 14, 2018 4:02 pm
So apparently the Raspberry Pi's have some sort of super lowlevel rom/firmware, that gets flashed in the factory on some memory on the PCB..
The SoC on a Pi has a minimal ROM that is not writable in any way (it's "programmed" by the masks used in manufacturing the chips). There is a very small amount of One Time Programming (OTP) space. A matter of perhaps as much as 8 bytes. This does not contain any instructions to run. It contains the board serial number (32 bit random number) and some flags that control certain behaviors. Note that any given bit can only be change ONE TIME, and that from a zero to a one, there is no going back. Other than that, the only "firmware" used on any PI is loaded from the SD card (or other boot media).

User avatar
Thursten
Posts: 50
Joined: Thu Jul 20, 2017 3:19 pm
Location: Eindhoven, The Netherlands

Re: Reflash Pi Zero W factory rom?

Fri Dec 14, 2018 7:02 pm

W. H. Heydt wrote:
Fri Dec 14, 2018 5:36 pm
Thursten wrote:
Fri Dec 14, 2018 4:02 pm
So apparently the Raspberry Pi's have some sort of super lowlevel rom/firmware, that gets flashed in the factory on some memory on the PCB..
The SoC on a Pi has a minimal ROM that is not writable in any way (it's "programmed" by the masks used in manufacturing the chips). There is a very small amount of One Time Programming (OTP) space. A matter of perhaps as much as 8 bytes. This does not contain any instructions to run. It contains the board serial number (32 bit random number) and some flags that control certain behaviors. Note that any given bit can only be change ONE TIME, and that from a zero to a one, there is no going back. Other than that, the only "firmware" used on any PI is loaded from the SD card (or other boot media).
Yeah, so the thing is, that during the programming by the manufacturer there has been made a mistake, where in the board is recognized and "identifies" as a Pi model from 2012..
Something went wrong with programming the model and revision version..

If you would check the link I posted in my OP you'll see what I mean.. Now I've got a replacement since they are familiar with the mistake, I'm about to fire the new one up, but I didn't have to send the old one back.. So since it's only a rom/firmware mistake, and it does work, I was hoping to be able to reflash it and make it fully functional!

Do you guys think it might help if I contact the Pi foundation or customer service for extra information? Or are they on these forums as well?

Edit I think I'm refering to the SoC minim rom thing you're talking about..


mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Reflash Pi Zero W factory rom?

Fri Dec 14, 2018 10:57 pm

Thursten wrote:
Fri Dec 14, 2018 7:02 pm
...So since it's only a rom/firmware mistake, and it does work, I was hoping to be able to reflash it and make it fully functional!
The clue is in the name(s)
ROM - Read Only Memory (i.e. not write-able so you cant flash it)
OTP - One Time Programmable (i.e. can only be set once, in the case of the board revision that's set in the factory)

So if the issue is a bad board revision as the linked post suggests there's nothing you can do to change it permanently (there's a suggestion of a parameter you can set in config.txt but the person reporting the issue said it didn't work for them)

W. H. Heydt
Posts: 11115
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 12:43 am

mfa298 wrote:
Fri Dec 14, 2018 10:57 pm
Thursten wrote:
Fri Dec 14, 2018 7:02 pm
...So since it's only a rom/firmware mistake, and it does work, I was hoping to be able to reflash it and make it fully functional!
The clue is in the name(s)
ROM - Read Only Memory (i.e. not write-able so you cant flash it)
OTP - One Time Programmable (i.e. can only be set once, in the case of the board revision that's set in the factory)

So if the issue is a bad board revision as the linked post suggests there's nothing you can do to change it permanently (there's a suggestion of a parameter you can set in config.txt but the person reporting the issue said it didn't work for them)
And there is nothing the factory can do to fix it, either...short of replacing the SoC.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24192
Joined: Sat Jul 30, 2011 7:41 pm

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 8:20 am

W. H. Heydt wrote:
Sat Dec 15, 2018 12:43 am
mfa298 wrote:
Fri Dec 14, 2018 10:57 pm
Thursten wrote:
Fri Dec 14, 2018 7:02 pm
...So since it's only a rom/firmware mistake, and it does work, I was hoping to be able to reflash it and make it fully functional!
The clue is in the name(s)
ROM - Read Only Memory (i.e. not write-able so you cant flash it)
OTP - One Time Programmable (i.e. can only be set once, in the case of the board revision that's set in the factory)

So if the issue is a bad board revision as the linked post suggests there's nothing you can do to change it permanently (there's a suggestion of a parameter you can set in config.txt but the person reporting the issue said it didn't work for them)
And there is nothing the factory can do to fix it, either...short of replacing the SoC.
Which is why the OP was sent a new board.....
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

mikerr
Posts: 2791
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 8:56 am

If it has the wrong revision, and so loading the wrong dtb,
would renaming the dtb file on SD work?
(Obviously just as an awful hack to get a working unit)
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
bensimmo
Posts: 4187
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 9:54 am

It's a almost fully working Zero board though, just minus the BT/W .. (anything else, LEDs indicators, the extra gpio ?)

Would it need the 'overclock' setting to 1GHz too, if it's seeing it as a B v2 which defualts to 700MHz?

Of course, no harm in asking to find if he could or couldn't. :-)

User avatar
Thursten
Posts: 50
Joined: Thu Jul 20, 2017 3:19 pm
Location: Eindhoven, The Netherlands

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 9:56 am

Hmm.. That is kinda sad, that for a mistake at the factory, so many faulty boards can just be trown away..
It has the default value, doesn't that mean it hasn't been programmed at all? Or has it been done wrong?

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 10:09 am

Thursten wrote:
Sat Dec 15, 2018 9:56 am
Hmm.. That is kinda sad, that for a mistake at the factory, so many faulty boards can just be trown away..
It has the default value, doesn't that mean it hasn't been programmed at all? Or has it been done wrong?
If it's not been set at all then it might be possible for the factory to set the relevant bits (depending when in the process that part is done). But the cost of doing so is almost certainly prohibitive (it probably wasn't even worth the store asking for it to be returned to them which is why you still have it).

Not every board made will work perfectly, most of those should get picked up in QA testing but a few will get through. It sounds like you got one of those few (and the odd ones that get through usually mean something else gets added to the QA checks so it doesn't happen again).

User avatar
bensimmo
Posts: 4187
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 10:29 am

An alternative to throwing away, buy one of these. It'll be an upgrade to the Zero version I have (mines only $5)

Image

User avatar
davidcoton
Posts: 4264
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 10:32 am

Thursten wrote:
Sat Dec 15, 2018 9:56 am
Hmm.. That is kinda sad, that for a mistake at the factory, so many faulty boards can just be trown away..
It has the default value, doesn't that mean it hasn't been programmed at all? Or has it been done wrong?
But we don't know how many boards were affected. Only a handful have been reported here. Even if they are unprogrammed and could be repaired, it would cost more to collect the boards, repair, and return then than simply to replace them.

So you get the challenge of trying to salvage a board that is otherwise scrap. Free bonus, if you succeed. I guess @mikerr's suggestion (take the right dtb file and rename it as the one the board will load) is the best option. Add @bensimmo's suggestion about settings that may need attention (but maybe not id the renaming trick works?). Then just enjoy getting somethin for (financially) notthing, though I'm sure the salvage effort is worth far more than the board costs ... which is why it was replaced without a return.
Signature retired

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24192
Joined: Sat Jul 30, 2011 7:41 pm

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 12:08 pm

davidcoton wrote:
Sat Dec 15, 2018 10:32 am
Thursten wrote:
Sat Dec 15, 2018 9:56 am
Hmm.. That is kinda sad, that for a mistake at the factory, so many faulty boards can just be trown away..
It has the default value, doesn't that mean it hasn't been programmed at all? Or has it been done wrong?
But we don't know how many boards were affected. Only a handful have been reported here. Even if they are unprogrammed and could be repaired, it would cost more to collect the boards, repair, and return then than simply to replace them.

So you get the challenge of trying to salvage a board that is otherwise scrap. Free bonus, if you succeed. I guess @mikerr's suggestion (take the right dtb file and rename it as the one the board will load) is the best option. Add @bensimmo's suggestion about settings that may need attention (but maybe not id the renaming trick works?). Then just enjoy getting somethin for (financially) notthing, though I'm sure the salvage effort is worth far more than the board costs ... which is why it was replaced without a return.
This. AFAIK, it's only a very few boards. It has happened a couple of times, I'm not sure how, but Sony are responsible so it all gets reported back to them to fix whatever caused the problem.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 12:56 pm

As it is the correct SoC with the correct board, it should be possible to still access the HW, you just need to recode drivers to do what they should regardless of what the board/firmware reports to the OS (which would take a bit of work, though should still be doable).

And if you have an application that does not need WiFi/BlueTooth then you have the board for it.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

W. H. Heydt
Posts: 11115
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 5:57 pm

jamesh wrote:
Sat Dec 15, 2018 12:08 pm
davidcoton wrote:
Sat Dec 15, 2018 10:32 am
Thursten wrote:
Sat Dec 15, 2018 9:56 am
Hmm.. That is kinda sad, that for a mistake at the factory, so many faulty boards can just be trown away..
It has the default value, doesn't that mean it hasn't been programmed at all? Or has it been done wrong?
But we don't know how many boards were affected. Only a handful have been reported here. Even if they are unprogrammed and could be repaired, it would cost more to collect the boards, repair, and return then than simply to replace them.

So you get the challenge of trying to salvage a board that is otherwise scrap. Free bonus, if you succeed. I guess @mikerr's suggestion (take the right dtb file and rename it as the one the board will load) is the best option. Add @bensimmo's suggestion about settings that may need attention (but maybe not id the renaming trick works?). Then just enjoy getting somethin for (financially) notthing, though I'm sure the salvage effort is worth far more than the board costs ... which is why it was replaced without a return.
This. AFAIK, it's only a very few boards. It has happened a couple of times, I'm not sure how, but Sony are responsible so it all gets reported back to them to fix whatever caused the problem.
One would surmise that someone in the factory made a setup error and anything up to when the error was caught, to a whole batch run were wrong.

W. H. Heydt
Posts: 11115
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Reflash Pi Zero W factory rom?

Sat Dec 15, 2018 5:57 pm

DavidS wrote:
Sat Dec 15, 2018 12:56 pm
As it is the correct SoC with the correct board, it should be possible to still access the HW, you just need to recode drivers to do what they should regardless of what the board/firmware reports to the OS (which would take a bit of work, though should still be doable).

And if you have an application that does not need WiFi/BlueTooth then you have the board for it.
One wonders if setting some dtoverlay values might do the trick...

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24192
Joined: Sat Jul 30, 2011 7:41 pm

Re: Reflash Pi Zero W factory rom?

Sun Dec 16, 2018 11:42 am

W. H. Heydt wrote:
Sat Dec 15, 2018 5:57 pm
jamesh wrote:
Sat Dec 15, 2018 12:08 pm
davidcoton wrote:
Sat Dec 15, 2018 10:32 am


But we don't know how many boards were affected. Only a handful have been reported here. Even if they are unprogrammed and could be repaired, it would cost more to collect the boards, repair, and return then than simply to replace them.

So you get the challenge of trying to salvage a board that is otherwise scrap. Free bonus, if you succeed. I guess @mikerr's suggestion (take the right dtb file and rename it as the one the board will load) is the best option. Add @bensimmo's suggestion about settings that may need attention (but maybe not id the renaming trick works?). Then just enjoy getting somethin for (financially) notthing, though I'm sure the salvage effort is worth far more than the board costs ... which is why it was replaced without a return.
This. AFAIK, it's only a very few boards. It has happened a couple of times, I'm not sure how, but Sony are responsible so it all gets reported back to them to fix whatever caused the problem.
One would surmise that someone in the factory made a setup error and anything up to when the error was caught, to a whole batch run were wrong.
I don't know what the specific issue was/is. As I said, we feed back any production issues to Sony, and they fix them!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

Return to “General discussion”