2018-03-22 01:24 AM
hi to everyone
I'm trying to use the library 21 sd_card demo by
but I have a problem with the write/read file on sd card. f_mount is okay (set red led) but f_opens failed with code error 0x03 FR_NOT_READ. I tried to debug, but I didn't understand where is the problem. I increased HEAP and STACK from 0x200/0x400 to 0x2000/0x4000 but without any success.where is the problem?
thanks in advance
2018-03-22 01:43 AM
Check if there is any code using a GPIO as a card detect pin
2018-03-22 03:26 AM
it
seems to be the same...
I attach the code generated with cubemx (fatfs-> user definied) and edit by me.
the GPIO PB6 in debug is always 64 (value) u.u
the micro sd card module has only CS, MISO, MOSI, SCK, VCC and GND
2018-03-22 05:51 AM
Doesn't that suggest you shouldn't be using it then?
♯ define FATFS_USE_DETECT_PIN 0 /* If you don't have the pin wired and its always high - DON'T USE IT */
2018-03-22 07:07 AM
I'm sorry, it is a misprint.
I set it to 1 only for a test... it was always set to 0
2018-03-23 03:43 AM
this is the current project, made with cubemx v4.24.0
https://mega.nz/#!HR9UhK4T!pNHlQj_W0yfI4G7ggJVWmtyBUBgjb6ePaOJaYJ9HWFQ
2018-04-04 04:26 AM
hi clive,
after a few problems, I was able to work the sd card over sdio. unfortunatelly, I am obliget to use sd card over spi, but it can't work.
can you help me? I'm not very skilled
:(
Turvey.Clive.002