AnsweredAssumed Answered

SDIO DMA FatFs USB HS slow data transfer

Question asked by Oleksandr Borysov on Aug 6, 2017
Latest reply on Aug 6, 2017 by Clive One

Hello, forum.

 

I created a simple USB Card Reader with CubeMX but the speed of data transmitting is about 355 kByte/s.

I want to improve it but I don't know how.

 

My setup.

Board STM32f446RE. CubeMX 4.22. Package STM32Cube FW_F4 V1.16.0.

 

I created the project in the next steps:

1) I used CubeMX to generate the project with following modules: internal USB HS, SDIO with DMA, FarFs. Also, I increased heap and stack memory.

2) I used sd_diskio's methods in usbd_storage_if to connect SDIO to USB HS. (I use FatFs's BSP driver to provide access to SD Card memory)

3) I applied DMA fix from Radek R  CubeMX SDIO DMA FatFS configuration

 

I tested my project in DMA and Polling mode and get next results:

Polling mode(without DMA): read/write speed 355 kByte/s, data not corrupted

DMA mode: read/write speed 355 kByte/s, data can be corrupted

 

Also, I tested the same project but generated with CubeMX 4.18. Package STM32Cube FW_F4 V1.14.0.

Results next:

Polling mode(without DMA): read/write speed 355 kByte/s, data not corrupted

DMA mode: read/write speed 355 kByte/s, data not corrupted

 

I attached my project, maybe someone more experienced will help me to solve this problem.

 

P.S. Also, I am interesting in next questions.

What maximal speed I can achieve with internal USB HS and SDIO (4 bits wide bus) with DMA?

What impact will have decryption/encryption(ST library for AES) of memory sectors during reading/writing?

Attachments

Outcomes