2017-08-06 05:48 AM
Posted on August 06, 2017 at 14:48
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
Ripa.Radek.001
<LINK NO LONGER ACTIVE>
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 corruptedDMA 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?
Solved! Go to Solution.
2017-08-06 06:14 AM
MSC_MEDIA_PACKET?
https://community.st.com/0D50X00009XkeLmSAJ
2017-08-06 06:14 AM
MSC_MEDIA_PACKET?
https://community.st.com/0D50X00009XkeLmSAJ
2017-08-06 01:10 PM
Thank you for the tip.
It works
perfectly for
FW_F4 V1.14.0.