2015-11-30 12:18 AM
Hi,
I'm trying to write on a SD card using STM32L152RE Nucleo platform. It doesn't have a dedicated interface for SD communication. Though, I try to do it through SPI3.I must say that it is the first time I try to do that and examples (either are they for stm32l152rd or another platform using pipeline) I found doesn't help much. If someone could show me some useful codes or documentation.Thanks2015-12-01 02:22 AM
I've attached my drivers. I used CubeMX to get the file system. Then, I implemented user_diskio and microSD by looking at examples and documentation. My program hangs after f_mount in main.c
________________ Attachments : main.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzcG&d=%2Fa%2F0X0000000bOO%2FB3HIVhT8E3zIiR3iiWFPvO9Bd.YHt8C1GIwfltbRslI&asPdf=falsemicroSD.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzcB&d=%2Fa%2F0X0000000bOQ%2FGiRq0lS3ZYrtBXEgMmnXk266xtPtFjHHwj09Y07GTv8&asPdf=falsemicroSD.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzZw&d=%2Fa%2F0X0000000bOP%2FML_3GHCoMQx2enNUhAEP7KERZFs7G09Trq5G78rxBpU&asPdf=falseuser_diskio.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzc6&d=%2Fa%2F0X0000000bOR%2FHTYhBnuEZqx9YiuMxbOq7vI1x70oRp.bB..L6OWg380&asPdf=falseuser_diskio.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzc1&d=%2Fa%2F0X0000000bOM%2FNxFabLs3cvoJ7RlFgAjIko6xus5RI5MiHXktTOncwQE&asPdf=false2015-12-01 07:46 AM
Got it working but once I read my SD card on my laptop it didn't work anymore. Don't understand why :S.disk_initialize returns STA_NOINIT.
I attached my new drivers. ________________ Attachments : diskio.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzbw&d=%2Fa%2F0X0000000bOL%2FTTUxlTh5W97AmoJOgqTruCBG6tUrfvvjOJF.AXmlnUs&asPdf=falsediskio.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzbY&d=%2Fa%2F0X0000000bON%2FtaK9.afJVvlH57LYhxVoJAMmhUQ0oG4cfb.b111LX.g&asPdf=falseff.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzW4&d=%2Fa%2F0X0000000bOK%2FxF41ggCnACQhQzHdjZNYg4JyyKxnPgWrCU.4T0tF76M&asPdf=falseff.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzNH&d=%2Fa%2F0X0000000bOH%2FjmQBnxdiRb9BudXsx5dsT60HpyZsSeVPEyP43.qAs9Q&asPdf=falsemicroSD.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzYe&d=%2Fa%2F0X0000000bOG%2FuMKheXTcatcknkhR9DL3JR7hz9RkT.Xr_6S5OTXJ8Lk&asPdf=false