Page 1 of 1

Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 7:09 am
by wknight
Hi
May be it will help you.

I have found only one SD card which works perfectly (I have tried 5 cards).
It is not necessary to search compatible SD card for raspberry pi.
It is much easy to solder pull-ups resistors 10k-100k on SD connector pins 1,2,7,8,9.
There is power supply +3.3V on pin 4.

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 12:45 pm
by Steep
What does this do exactly?

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 1:08 pm
by wknight
Steep wrote:What does this do exactly?
In transcend datasheet it is written "To prevent bus floating".
I think it helps to detect the type of the card.
There is the period of time during configuration sequence of SD card,
then some pins of SD card and the controller are configured like inputs.

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 1:21 pm
by KenT
Pullups stop the inputs to digital circuits waving abut in the wind due to electrical noise.

Doesn't one of the latest updates to the firmware include adding pullups to these pins. Pullups are built into the GPU hardware so can be enabled from there.

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 1:35 pm
by dom
Yes an update to bootcode.bin on June 22nd added pullups to the sdcard.
I'd be interested if you believe the pullups are still necessary on any sdcards with the updated bootcode.bin.

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 1:39 pm
by wknight
KenT wrote:Pullups stop the inputs to digital circuits waving abut in the wind due to electrical noise.
It is true if the resistance of the pullups is equal to wave impedance of the line.
In our case the value of pullups is much higher. The reason is different.
KenT wrote:Doesn't one of the latest updates to the firmware include adding pullups to these pins. Pullups are built into the GPU hardware so can be enabled from there.
Only Yesterday I have got my raspberry and have downloaded images...
I think it is not done yet. Much faster to solder the pullups ;)

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 1:40 pm
by Mortimer
Interesting. The schematic of the Raspberry Pi doesn't show any pullup resistors on the SD-card pins. There are some 33R resistors in the lines though. Investigating websites that show SD-cards being used in projects for controller like PIC and Arduino, they always seem to recommend pull up resistors on pins 1,2,5,7,8 and 9. Should the ARM SoC need pullups? I don't know. Whether or not this modification is a good idea will depend on how much proof there is that this allows SD-cards that have never worked before to start working.

If pullup resistors are the answers though, why is it, that it has been possible to get some cards working with a firmware change?

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 1:44 pm
by wknight
dom wrote:Yes an update to bootcode.bin on June 22nd added pullups to the sdcard.
I'd be interested if you believe the pullups are still necessary on any sdcards with the updated bootcode.bin.
I only know. I have took all my SD card from all my electronics to test it (mobile phone, photo camera , portable player ...) And I have found only one good card.
And Now All of them are working good.
May be pullups inside the chip are too weak.

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 1:49 pm
by mahjongg
The GPIO's of the Broadcom's SoC (the SD-Card is connected through GPIO's with dedicated SD-card logic behind them) are capable of several "tricks", one of them is that they can enable a pullup (or pulldown) resistor on GPIO's programmed as inputs, in fact its possibly possible to select either a "weak" or a "strong" pullup. This is quite common in modern microcontrollers and SoC's. The hardware has no pullups because the SoC already had them, and adding them cost money, but I assume they forgot to tell the programmer of the initialisation code for the GPIO's to turn on the pullups on the relevant GPIO's.

A similar issue existed with the GPIO for the RxD UART input, which also had its pullup not enabled in previous distro's and was therefore very sensitive, just holding your finger near the RxD GPIO pin would send streams of characters into the UART, (the built in serial port) even sometimes causing kernel panics.

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 1:51 pm
by dom
wknight wrote: Only Yesterday I have got my raspberry and have downloaded images...
I think it is not done yet. Much faster to solder the pullups ;)
The latest official image doesn't have the software pullup fix to bootcode.bin. It's only available from github or by using rpi-update.

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 1:53 pm
by wknight
dom wrote: The latest official image doesn't have the software pullup fix to bootcode.bin. It's only available from github or by using rpi-update.
By the way if you don't have a "compatible" SD card. It is hard to start.
Am I right ?

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 3:07 pm
by wknight
dom wrote:Yes an update to bootcode.bin on June 22nd added pullups to the sdcard.
I'd be interested if you believe the pullups are still necessary on any sdcards with the updated bootcode.bin.
As I understand CPU can read bootcode.bin only after first SD card initialization.
Is there some small code inside the BCM chip to read boot partition from SD card ?

With one of my SD card RPI didn't start at all.

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 3:40 pm
by dom
wknight wrote: As I understand CPU can read bootcode.bin only after first SD card initialization.
Is there some small code inside the BCM chip to read boot partition from SD card ?

With one of my SD card RPI didn't start at all.
There is a bootrom in chip that reads bootcode.bin from sdcard. This code correctly applies the pullups, so I wouldn't expect external pullups to help this stage.
With latest bootcode.bin you get the OK led on before sdcard is accessed, so you should always see this.

Now the only way I could see external pullups helping is if the brief removal of pullups between the bootrom and bootcode.bin has a bad effect on the sdcard. I haven't seen that so far.

Do you have an sdcard that fails with latest bootcode without the pullups, but works with them? If so what is the state of OK LED?

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 5:39 pm
by wknight
dom wrote: Do you have an sdcard that fails with latest bootcode without the pullups, but works with them? If so what is the state of OK LED?
I am sorry but I can't check it now because it is not so easy to desolder the resisters.
May be somebody else who didn't solder it can help us.

thanks for your answers

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 8:45 pm
by wknight
mahjongg wrote:The GPIO's of the Broadcom's SoC (the SD-Card is connected through GPIO's with dedicated SD-card logic behind them) are capable of several "tricks", one of them is that they can enable a pullup (or pulldown) resistor on GPIO's programmed as inputs, in fact its possibly possible to select either a "weak" or a "strong" pullup. This is quite common in modern microcontrollers and SoC's. The hardware has no pullups because the SoC already had them, and adding them cost money, but I assume they forgot to tell the programmer of the initialisation code for the GPIO's to turn on the pullups on the relevant GPIO's.
I can't find any parameters of builtin pull up/down. May be pullups are not so strong !?

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 08, 2012 11:11 pm
by mahjongg
I don't think the GPIO's capabilities are fully documented, but the pullups (weak or strong) should be plenty strong enough to ensure the SD-Cards always sees a "1" on relevant and not yet controlled interface lines.

Another example of non documented feature of the GPO's is that for outputs its possible to program drive strength, of either sourced or sinked signals. No explanation of how its done is given. Normally a small schematic of how a GPIO works is given in the datasheet of any microcontroller, but such a (block) schematic is unfortunately missing for the BCM2835.

Re: Now my raspberry pi works with all my SD cards

Posted: Tue Jul 10, 2012 8:02 pm
by Brasaral
Well, the internal pullups are certainly working, at least for me. I have an unbranded micro-sd card with adapter, which would fail during Debian boot, but after I replaced the bootloader.bin with the latest one, it started working. The OK led is on sooner after power-on than before...

Re: Now my raspberry pi works with all my SD cards

Posted: Tue Jul 10, 2012 9:13 pm
by Mortimer
Brasaral wrote:Well, the internal pullups are certainly working, at least for me. I have an unbranded micro-sd card with adapter, which would fail during Debian boot, but after I replaced the bootloader.bin with the latest one, it started working. The OK led is on sooner after power-on than before...
Agreed, I managed to get my class-10 SanDisk cards working for the first time today.

Re: Now my raspberry pi works with all my SD cards

Posted: Thu Jul 12, 2012 2:36 am
by bmwhite
Brasaral wrote:Well, the internal pullups are certainly working, at least for me. I have an unbranded micro-sd card with adapter, which would fail during Debian boot, but after I replaced the bootloader.bin with the latest one, it started working. The OK led is on sooner after power-on than before...
Same here. I had a flaky Kingston 2GB micro SD that worked infrequently. Replaced bootloader.bin and so far no issues.

Re: Now my raspberry pi works with all my SD cards

Posted: Sun Jul 15, 2012 3:01 am
by UristMcMouse
I just wanted to pitch in, once I replaced my bootcode.bin with the newest from the github, my SD finally booted.

This was a class 4, 4GB Sandisk, and the only one of 4 cards that wouldn't boot for me.

-Urist