fopen sdcard problem

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

fopen sdcard problem

跳至解决方案
999 次查看
loicb
Contributor I

Hello,

i work on the example of the sdcard. i have a mcf52259 and MQX3.8.

 

i had build the librairies and after the project.

but i block on the fopen("sdcard:", 0) because i have the message "Unable to open SD card device."

 

I found that the ChipSelect of the spi never be at 0 but i see the clock signal.

 

i have insert the line

#define BSP_SDCARD_GPIO_CS                       (GPIO_PORT_QS | GPIO_PIN3)

in the twrmcf52259.h . Is it a good idea ?

 

In the user_config.h, i had enabled the spi0.

 

Somebody can help me please ?

 

Thanks very much.

 

Loic

标签 (1)
标记 (2)
1 解答
800 次查看
alexandrevincon
Contributor III

Hello,

I've had the same issue with my k60 and mqx4.0. I've struggled for an entire day, and then I tried to use a different SD card and the examle project worked like a charm.

I advise you to try a different SD card (from another manufacturer, for example) a check it works better.

Best regards,

AV.

在原帖中查看解决方案

1 回复
801 次查看
alexandrevincon
Contributor III

Hello,

I've had the same issue with my k60 and mqx4.0. I've struggled for an entire day, and then I tried to use a different SD card and the examle project worked like a charm.

I advise you to try a different SD card (from another manufacturer, for example) a check it works better.

Best regards,

AV.