Commit 95d1e92
committed
mimxrt/sdcard: Add polling mode with scheduler yields.
Add MICROPY_HW_SDCARD_POLLING mode that uses DMA transfers with
register polling instead of interrupts. This avoids cache coherency
issues seen with interrupt-based transfers when SDRAM is disabled.
The polling loops call mp_event_handle_nowait() to allow the MicroPython
scheduler to run background tasks during SD card operations.
Three transfer modes are now available:
- Default: SDK's USDHC_TransferBlocking with Data0 ready polling
- MICROPY_HW_SDCARD_NONBLOCKING=1: Interrupt-based (has cache issues)
- MICROPY_HW_SDCARD_POLLING=1: DMA with polled status flags1 parent 6234090 commit 95d1e92
3 files changed
+468
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
214 | 217 | | |
215 | 218 | | |
216 | 219 | | |
| |||
0 commit comments