SD card write speed with MPC5748G

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SD card write speed with MPC5748G

882 次查看
jeromeli
Contributor II

I tested the SD card write speed with the following setup: 

HW: MPC574XG-MB + MPC574XG-176DS

SW: based on demo "sdhc_fatfs_mpc5748g"

I wrote a data buffer of 512 bytes into a new file, using f_write(), for 2000 times. And this took almost 3.5s. So roughly the write speed was 1MB / 3.5s = 290 KB/s. Is this a normal speed? Very slow, isn't it?

0 项奖励
回复
1 回复

717 次查看
liam_battershel
Contributor I

Hi Jerome,

 

Did you ever manage to speed up your writing? I am in the process of testing writes to the SD card using the same example that you did and it seems I am getting speeds varying between 4 and 80 KB/s(goodput) depending on how much data I give to the FAT file write function. I have had a look and it seems to me that the SD card is only ever getting to 20MHZ clock speed and is not correctly switching to 4 bit mode. This seems to be because out of the box there is some confusion about endianness and the processing of the SCR data. This leads to the card being read as not supporting 4-bit mode. In testing I have tried changing the SD_SendScr(sd_card_t *card) to make it swap the byte sequence and after that it does correctly identify the sd card as supporting 4bit transfers and I can see the data on the scope on dat0-3 but it gets stuck on the second time it calls SD_SendScr(sd_card_t *card) and just waits for a transfer that never completes. The elmChan firmware, the framework middleware and the configuration all contain references (and comments) about endianness and to me it is unclear where the issue should be addressed so that the "truth" is passed on to all the relevant layers of the implementation without needing to have things like this in uSDHC_CopyHostConfig confusing things...

 

    /*
     * Endianness is already handled by uSDHC_PROT_CTRL_EMODE in uSDHC,
     * no need to swap byte sequence since and so
     * we are setting big-endian in SD layer.
     */
    card_config->endianMode = uSDHC_ENDIAN_MODE_BIG;

 

Anyway if anyone has managed to get the #SD card demo working at a reasonable speed on the devkit-mpc5748g and wouldn’t mind sharing the code/configuration details with me, or if anyone could provide any assistance I would greatly appreciate it.

 

Many thanks

 

Liam B

SDCH MPC5748G MPC5xxx Sdcard FATFS speed write speed

0 项奖励
回复