From readinto() to the SD sdcard_read_blocks() / slow read

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
User avatar
shazz
Posts: 46
Joined: Tue Apr 30, 2019 6:35 pm
Contact:

From readinto() to the SD sdcard_read_blocks() / slow read

Post by shazz » Wed May 08, 2019 6:04 pm

Hi,

On my Meowbit, it looks like reading a file (large file, sequential reading) from the SD card (SDIO) is pretty slow. I try to follow the implementation path between the std lib call readinto() (not sure where to find it...) to the low level calls (I guess ports/stm32/sdcard.c) to see if there is something that can be improved but I cannot understand where it goes.

Can somebody briefly points me to where is starts to where it ends ?

I'll post here my timings

Thanks
  • Board: Meowbit
  • MCU: STM32F401RET6
  • Bus: SD Card reader connected on SDIO on hi-speed bus APB2.
  • Specs: "The interface allows data transfer at up to 50 MHz/8bit mode" (a little bit more than half the max bus speed, 84Mhz)
  • DMA: DMA can be used to send data to SDIO
8bits should be enough...

Post Reply