fopen sdcard problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

fopen sdcard problem

Jump to solution
511 Views
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

Labels (1)
Tags (2)
1 Solution
312 Views
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.

View solution in original post

1 Reply
313 Views
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.