[possible BUG] Bug 458 might not be fixed completely Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
positron
Posts: 10
Joined: Mon Aug 19, 2013 4:23 pm

[possible BUG] Bug 458 might not be fixed completely

Postby positron » Tue Apr 08, 2014 1:12 pm

Hi,

I was looking over the changes in ChibiOS and found the following.

http://sourceforge.net/p/chibios/bugs/458/

This produces the diff:

https://github.com/ChibiOS/ChibiOS-RT/c ... eaf7823a4d

The same constellation of DCTL, sdc_lld_prepare.. and sdc_lld_wait_transaction_end is present in
sdc_lld_write_aligned() and sdc_lld_read_aligned() but the bugfix only changed one of them:

sdc_lld_write_aligned:

Code: Select all

sdc_lld_prepare_write()
SDIO->DCTRL = ...;
sdc_lld_wait_transaction_end()



sdc_lld_read_aligned:

Code: Select all

SDIO->DCTRL = ...;
sdc_lld_prepare_read()
sdc_lld_wait_transaction_end()


I wonder whether this is correct that way. Seems non-symmetric now.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: [possible BUG] Bug 458 might not be fixed completely

Postby Giovanni » Tue Apr 08, 2014 4:20 pm

Hi,

I asked the same thing to the person who found and fixed the problem: viewtopic.php?f=16&t=1567&p=14121&hilit=sdc#p14121

Apparently the sequence is correct for the write operation as-is.

Giovanni

positron
Posts: 10
Joined: Mon Aug 19, 2013 4:23 pm

Re: [possible BUG] Bug 458 might not be fixed completely

Postby positron » Tue Apr 08, 2014 4:26 pm

Thanks.

I hope he's right...

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: [possible BUG] Bug 458 might not be fixed completely

Postby Giovanni » Tue Apr 08, 2014 4:33 pm

Are you experiencing a specific problem?

Giovanni

positron
Posts: 10
Joined: Mon Aug 19, 2013 4:23 pm

Re: [possible BUG] Bug 458 might not be fixed completely

Postby positron » Mon Apr 14, 2014 3:49 pm

We're trying to track down occasional SD card read/write errors...

Latest evidence suggests a hardware problem. I'll update if a ChibiOS bug is found.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: [possible BUG] Bug 458 might not be fixed completely

Postby Giovanni » Mon Apr 14, 2014 6:22 pm

Thanks

dhampir
Posts: 3
Joined: Tue Jan 20, 2015 4:03 pm

Re: [possible BUG] Bug 458 might not be fixed completely

Postby dhampir » Tue Jan 20, 2015 4:12 pm

Any new information about this one? We seem to have similar problems here. Stressing the SD-Card by constant opening, seeking and writing results in about one error per hour.
The error gets raised in sdc_lld_wait_transaction_end(...) when if ((SDIO->STA & SDIO_STA_DATAEND) == 0) evaluates to true.

Any hints what could cause this would be appreciated.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: [possible BUG] Bug 458 might not be fixed completely

Postby Giovanni » Tue Jan 20, 2015 4:42 pm

Hi,

Could you try another card?

Such an intermittent problem is probably related to HW problems (card, power, connections length, ringing etc).

Giovanni

dhampir
Posts: 3
Joined: Tue Jan 20, 2015 4:03 pm

Re: [possible BUG] Bug 458 might not be fixed completely

Postby dhampir » Tue Jan 20, 2015 5:11 pm

Hi! Yes we tried different cards but we did not see any differences.
Updating to the latest stable version improved the behaviour significantly (before: Ver 2.4.x, one error in ~60 sec, after: Ver 2.6.6 ~60 min).
Reading other threads i've got some inspiration about retries and timeouts, but knowing the exact cause would of course be helpful.
There seems to be no significant noise on the sdio and power lines in general, but with about one error in 60 mins this is hard to track.
Maybe this Thread is not the perfect location for this question because it does not have to be related to Bug 458.

And to complete the info about our setup: Selfmade Board with an STM32F407VGT6
Last edited by dhampir on Tue Jan 20, 2015 5:48 pm, edited 1 time in total.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: [possible BUG] Bug 458 might not be fixed completely

Postby Giovanni » Tue Jan 20, 2015 5:47 pm

Hi,

Could you try to change this:

Code: Select all

  if ((SDIO->STA & SDIO_STA_DATAEND) == 0) {
    osalSysUnlock();
    return HAL_FAILED;
  }


In this:

Code: Select all

  while ((SDIO->STA & SDIO_STA_DATAEND) == 0)
    ;


And the see if the problem disappears or the system remains locked in the loop.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 15 guests