mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'fix/sdio_slave_recv_intr_unhandled_v4.3' into 'release/v4.3'
sdio_slave: fixed the issue that interrupt may be cleared with finished trans unhandled (v4.3) See merge request espressif/esp-idf!17149
This commit is contained in:
commit
d501fd4b96
@ -662,7 +662,8 @@ static esp_err_t recv_flush_data(void)
|
|||||||
static void sdio_intr_recv(void* arg)
|
static void sdio_intr_recv(void* arg)
|
||||||
{
|
{
|
||||||
portBASE_TYPE yield = 0;
|
portBASE_TYPE yield = 0;
|
||||||
while (sdio_slave_hal_recv_done(context.hal)) {
|
bool triggered = sdio_slave_hal_recv_done(context.hal);
|
||||||
|
while (triggered) {
|
||||||
portENTER_CRITICAL_ISR(&context.recv_spinlock);
|
portENTER_CRITICAL_ISR(&context.recv_spinlock);
|
||||||
bool has_next_item = sdio_slave_hal_recv_has_next_item(context.hal);
|
bool has_next_item = sdio_slave_hal_recv_has_next_item(context.hal);
|
||||||
portEXIT_CRITICAL_ISR(&context.recv_spinlock);
|
portEXIT_CRITICAL_ISR(&context.recv_spinlock);
|
||||||
@ -671,8 +672,9 @@ static void sdio_intr_recv(void* arg)
|
|||||||
xSemaphoreGiveFromISR(context.recv_event, &yield);
|
xSemaphoreGiveFromISR(context.recv_event, &yield);
|
||||||
continue; //check the linked list again skip the interrupt checking
|
continue; //check the linked list again skip the interrupt checking
|
||||||
}
|
}
|
||||||
// if no more items on the list, go back and check again the interrupt,
|
// if no more items on the list, check the interrupt again,
|
||||||
// will loop until the interrupt bit is kept cleared.
|
// will loop until the interrupt bit is kept cleared.
|
||||||
|
triggered = sdio_slave_hal_recv_done(context.hal);
|
||||||
}
|
}
|
||||||
if (yield) portYIELD_FROM_ISR();
|
if (yield) portYIELD_FROM_ISR();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user