wknight
Posts: 9
Joined: Sun Jul 08, 2012 6:25 am

Now my raspberry pi works with all my SD cards

Sun Jul 08, 2012 7:09 am

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.
Attachments
sd.jpg
PCB with pullups
sd.jpg (41.24 KiB) Viewed 3616 times

Steep
Posts: 145
Joined: Fri May 18, 2012 8:03 pm

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

Sun Jul 08, 2012 12:45 pm

What does this do exactly?

wknight
Posts: 9
Joined: Sun Jul 08, 2012 6:25 am

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

Sun Jul 08, 2012 1:08 pm

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.

KenT
Posts: 758
Joined: Tue Jan 24, 2012 9:30 am
Location: Hertfordshire, UK
Contact: Website

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

Sun Jul 08, 2012 1:21 pm

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.
Pi Presents - A toolkit to produce multi-media interactive display applications for museums, visitor centres, and more
Download from http://pipresents.wordpress.com

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5341
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

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

Sun Jul 08, 2012 1:35 pm

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.

wknight
Posts: 9
Joined: Sun Jul 08, 2012 6:25 am

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

Sun Jul 08, 2012 1:39 pm

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 ;)

User avatar
Mortimer
Posts: 923
Joined: Sun Jun 10, 2012 3:57 pm

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

Sun Jul 08, 2012 1:40 pm

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?
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

wknight
Posts: 9
Joined: Sun Jul 08, 2012 6:25 am

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

Sun Jul 08, 2012 1:44 pm

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.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12338
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

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

Sun Jul 08, 2012 1:49 pm

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.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5341
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

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

Sun Jul 08, 2012 1:51 pm

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.

wknight
Posts: 9
Joined: Sun Jul 08, 2012 6:25 am

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

Sun Jul 08, 2012 1:53 pm

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 ?

wknight
Posts: 9
Joined: Sun Jul 08, 2012 6:25 am

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

Sun Jul 08, 2012 3:07 pm

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.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5341
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

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

Sun Jul 08, 2012 3:40 pm

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?

wknight
Posts: 9
Joined: Sun Jul 08, 2012 6:25 am

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

Sun Jul 08, 2012 5:39 pm

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

wknight
Posts: 9
Joined: Sun Jul 08, 2012 6:25 am

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

Sun Jul 08, 2012 8:45 pm

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 !?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12338
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

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

Sun Jul 08, 2012 11:11 pm

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.

Brasaral
Posts: 1
Joined: Tue Jul 10, 2012 7:57 pm

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

Tue Jul 10, 2012 8:02 pm

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...

User avatar
Mortimer
Posts: 923
Joined: Sun Jun 10, 2012 3:57 pm

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

Tue Jul 10, 2012 9:13 pm

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.
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

bmwhite
Posts: 6
Joined: Sun Jul 08, 2012 6:02 pm

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

Thu Jul 12, 2012 2:36 am

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.

UristMcMouse
Posts: 1
Joined: Sun Jul 15, 2012 2:58 am

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

Sun Jul 15, 2012 3:01 am

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

Return to “Troubleshooting”