Page 3 of 4
Re: [TODO] SDC read fails.
Posted: Wed Sep 18, 2013 7:20 pm
by Giovanni
I'll make some tests on this during the weekend however the cards I have never had problems with this.
Giovanni
Re: [TODO] SDC read fails.
Posted: Thu Sep 19, 2013 1:32 pm
by alexblack
Hi,
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.
Re: [TODO] SDC read fails.
Posted: Thu Sep 19, 2013 8:08 pm
by resset
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.
Posted: Fri Sep 20, 2013 8:22 am
by pito
Have a look here:
viewtopic.php?f=3&t=519&hilit=pito+sdio#p4807There is a working example attached within the posts somewhere for SDIO card speed measurements, maybe it helps you somehow.
Re: [TODO] SDC read fails.
Posted: Fri Sep 20, 2013 12:37 pm
by alexblack
Hi,
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.
Re: [TODO] SDC read fails.
Posted: Fri Sep 20, 2013 3:02 pm
by resset
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?
Re: [TODO] SDC read fails.
Posted: Fri Sep 20, 2013 3:17 pm
by Giovanni
Yes, over the weekend.
Giovanni
Re: [TODO] SDC read fails.
Posted: Fri Sep 20, 2013 8:45 pm
by pito
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..
Re: [TODO] SDC read fails.
Posted: Thu Sep 26, 2013 2:03 pm
by Giovanni
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:
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
Re: [TODO] SDC read fails.
Posted: Thu Sep 26, 2013 2:04 pm
by Giovanni
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