Page 1 of 1

Broken SDCard and watchdog triggering

Posted: Tue Feb 11, 2020 2:33 pm
by Aeronautic
I got one sd card that seems to be broken: cant write anything using computer.
Using esp32, card is correctly detected, I am able to read every sector but when writing with sdmmc_write_sectors to some sectors eg. 0x23d, 0x23e, 0x2bd, 0x2be watchdog is triggered:

Code: Select all

[0;31mE (22102) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:[0m
[0;31mE (22102) task_wdt:  - IDLE1 (CPU 1)[0m
[0;31mE (22102) task_wdt: Tasks currently running:[0m
[0;31mE (22102) task_wdt: CPU 0: IDLE0[0m
[0;31mE (22102) task_wdt: CPU 1: self_test_task[0m
[0;31mE (22102) task_wdt: Aborting.[0m
abort() was called at PC 0x400d1b3b on core 0
Backtrace:

Code: Select all

0x40085105: task_ms_to_tick_wrapper at /Users/mtm/Development/esp32/esp-idf/components/esp32/esp_adapter.c:362
0x40085489: timer_overflow_happened at /Users/mtm/Development/esp32/esp-idf/components/esp32/esp_timer_esp32.c:160
 (inlined by) esp_timer_impl_get_time at /Users/mtm/Development/esp32/esp-idf/components/esp32/esp_timer_esp32.c:210
0x400d1b3b: _stext at ??:?
0x40081f45: esp_timer_start_once at ??:?
0x40089f92: ppResortTxAMPDU at ??:?
0x400d22ab: is_vect_desc_usable at /Users/mtm/Development/esp32/esp-idf/components/esp32/intr_alloc.c:335 (discriminator 1)
0x40089132: ppMapTxQueue at ??:?
0x40087809: prvReturnItemDefault at /Users/mtm/Development/esp32/esp-idf/components/esp_ringbuf/ringbuf.c:600 (discriminator 2)

Re: Broken SDCard and watchdog triggering

Posted: Tue Feb 11, 2020 2:57 pm
by nicolasmm
That may be because the SD card is at its end of life, when it happens you can read but not write to the card, that is part of why they are called secure disk card, because you don't lose the data. Perhaps the IDF don't handle correctly that state, and stays wanting for a response from the SD card until the watchdog gets triggered.

Re: Broken SDCard and watchdog triggering

Posted: Wed Feb 12, 2020 9:55 pm
by Aeronautic
Exactly it was the thing that happened, nevertheless I create application that saves lots of data shouldn't trigger watchdog and block everything for broken sector. I am looking for a way to protect such exception