mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-13 14:00:22 +01:00
SDMMC databook specifies that when an error interrupt is generated (such as RTO, DCRC, RCRC), CMD_DONE interrupt is also generated. The code used to break out of the event handling loop to wait for another interrupt event to happen, reporting CMD_DONE. However if interrupt processing was delayed, it is possible that a single event contains both RTO and CMD_DONE. Previously, CMD_DONE would not be handled, and the state machine would be stuck in SDMMC_SENDING_CMD state, until a timeout. This didn't change the outcome (err=0x107), but delayed the handling of response timeout event. Fix by not breaking out of the event handler, optionally processing the CMD_DONE interrupt if it has been reported in the same message.
16 KiB
16 KiB