I'll make some tests on this during the weekend however the cards I have never had problems with this.
Giovanni
[DONE] SDC read fails.
Moderators: RoccoMarco, barthess
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
-
- Posts: 276
- Joined: Mon Sep 24, 2012 3:52 pm
- Location: Donetsk
- Been thanked: 32 times
- Contact:
Re: [TODO] SDC read fails.
Hi,
I think it is hardware problem. Check carefully the board with a magnifying glass - possibly a cold solder joints! Also check contacts of the reader.
resset wrote:@alexblack, @Giovanni, can you tell if you have any other information on this?
I use STM32F407-DISCOVERY with Embest board and SDIO interface. ChibiOS/RT is 2.7.0unstable (most recent). My four cards, as turned out below, are most likely all V2.0. And I have quite related problem with them.
I think it is hardware problem. Check carefully the board with a magnifying glass - possibly a cold solder joints! Also check contacts of the reader.
-
- Posts: 32
- Joined: Thu Dec 20, 2012 11:57 pm
- Location: Poland
- Has thanked: 2 times
- Been thanked: 1 time
- Contact:
Re: [TODO] SDC read fails.
alexblack wrote:Hi,
I think it is hardware problem. Check carefully the board with a magnifying glass - possibly a cold solder joints! Also check contacts of the reader.
I checked every line between discovery board and card socket and they are continous. Also solder joints look ok. I also tried another STM32F4-DISCOVERY board, same results. So only hardware sources of this failures can be either bad socket or bad cards (four of them).
MCU ports connected to D0-3, CMD, CLK are configured as floating, but there are external 47k pullups on all lines except CLK.
On the other hand I tried to delay a bit (10ms) first call to sdConnect after insertion was sensed. No difference, however. Once or twice I got error 12, which is SDC_DATA_TIMEOUT | SDC_COMMAND_TIMEOUT, but couldn't repeat in finite time it in order to debug the cause.
As soon as I get another SD card I'll test it.
Re: [TODO] SDC read fails.
Have a look here:
viewtopic.php?f=3&t=519&hilit=pito+sdio#p4807
There is a working example attached within the posts somewhere for SDIO card speed measurements, maybe it helps you somehow.
viewtopic.php?f=3&t=519&hilit=pito+sdio#p4807
There is a working example attached within the posts somewhere for SDIO card speed measurements, maybe it helps you somehow.
-
- Posts: 276
- Joined: Mon Sep 24, 2012 3:52 pm
- Location: Donetsk
- Been thanked: 32 times
- Contact:
Re: [TODO] SDC read fails.
Hi,
I configured all pins D0-D3, SCK, CMD as "Alternate OUT", not floating.
resset wrote:MCU ports connected to D0-3, CMD, CLK are configured as floating, but there are external 47k pullups on all lines except CLK.
As soon as I get another SD card I'll test it.
I configured all pins D0-D3, SCK, CMD as "Alternate OUT", not floating.
-
- Posts: 32
- Joined: Thu Dec 20, 2012 11:57 pm
- Location: Poland
- Has thanked: 2 times
- Been thanked: 1 time
- Contact:
Re: [TODO] SDC read fails.
pito wrote:Have a look here:
viewtopic.php?f=3&t=519&hilit=pito+sdio#p4807
There is a working example attached within the posts somewhere for SDIO card speed measurements, maybe it helps you somehow.
Unfortunately this works the same way, sometimes it mounts card immediately, sometimes doesn't at all.
alexblack wrote:I configured all pins D0-D3, SCK, CMD as "Alternate OUT", not floating.
My config is: MODER: alternate function, OTYPER: push-pull, OSPEEDR: 100M, PUPDR: floating (no pull-up, no pull-down, I have them on board), AFRH: 12.
I think there is no explicit way to set AF and output mode on the same pin.
Meh, I think I must have either faulty cards or some nasty problem with HW. Thank you for all help and let me think over it during a weekend. Thanks:)
P.S.
Giovanni, are you going to include alexblack's fix for V1.1 cards?
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [TODO] SDC read fails.
OSPEEDR: 100M,
I would not go with 100M, my setting was 25, I think. Such slew rate may cause extensive ringing with longer wires or with bad impedance matching..
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [TODO] SDC read fails.
Hi,
I haven't forget this, I decided we need a better test for this driver in order to evaluate functionality and performance. The new test application is able to generate scores:
It is located in the 3.0 branch, I am still working on it but I will backport the result to 2.6 when it is done. If you have cards to test checkout the 3.0 branch, it is good enough for development now.
Giovanni
I haven't forget this, I decided we need a better test for this driver in order to evaluate functionality and performance. The new test application is able to generate scores:
Code: Select all
ch> ChibiOS/RT Shell
ch> sdc all
Connecting... OK
Card Info
CSD : 00260032 5F5983C0 FEFA4FFF 924040B4
CID : 03534453 55313238 807FFFD7 000072E0
Mode : SDV20
Capacity : 120MB
Single block aligned read performance: 2871 blocks/S, 1469952 bytes/S
16 sequential blocks aligned read performance: 12752 blocks/S, 6529024 bytes/S
Single block unaligned read performance: 2711 blocks/S, 1388032 bytes/S
16 sequential blocks unaligned read performance: 2736 blocks/S, 1400832 bytes/S
ch>
It is located in the 3.0 branch, I am still working on it but I will backport the result to 2.6 when it is done. If you have cards to test checkout the 3.0 branch, it is good enough for development now.
Giovanni
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [TODO] SDC read fails.
The first result is that the card I am testing fails to connect the first time after a cold boot, it works fine afterward. It is possible this is related to the problem you guys are experiencing.
Giovanni
Giovanni
Who is online
Users browsing this forum: No registered users and 31 guests