2012-06-07 09:46 AM
Hello,
i connected sdcard to my stm32f4discovery board, used SDIO example for low level init, and fixed fatfs so i can write data and read that later with computer But fatfs code is to complex for me to understand, does any one know hot to create txt, write a value (like from adc) and then close it so it could be seen by computer ? thanks2012-06-09 12:15 PM
you can find it on stm32f4 examples ,
anyway:http://
need to call low level sd init and sd init2012-06-09 12:33 PM
you can find it on stm32f4 examples ,
anyway: need to call low level sd init and sd init2012-06-10 01:51 PM
does any one know what code should be writhed to connect sdio library with fatfs library, since i assume that is standard definitions for sdcard, and all manufactures use same function names for same jobs (or at least that is how it looks like ) so i need just get sdio working, and fatfs will do the rest
2012-06-10 06:36 PM
the maple_sdfat, for STM32F1 does not use the SDIO
it uses the SPI directly. you need to update the pin numbers. However if you want to use the SDIO then you need to go through the code and recode it so it use the SDIO class.2012-06-10 10:37 PM
Well, i use SDIO on STM32F4
in disco.h when i add sdio.h file i get zero errors, and if i remove it, i get tone, so it looks like sdio and fatfs are correctly implemented, unless i miss something2012-06-22 06:47 AM
any one did this ?
2012-06-22 09:39 AM
any one did this ?
Not exactly, but I do have a lot of mass storage and file system experience. One area to consider is how you're interfacing the two code libraries. The FAT side is almost certainly dealing with sectors and clusters (ie blocks of 512 bytes, or 2KB..64KB, etc), where as the SDIO code is thinking about BYTE offsets in a 32-bit variable*. In order to interface you'll have to ensure you're using the same units, or translating them correctly. Like navigating a space probe around Mars and having different systems working in metric and imperial units. * This is a pretty fatal flaw in the MSC/SDIO demo as cards >4GB will fail and the file system will trash itself. This is clearly a NAND memory model, and not coded by someone with a mass storage background. Assume none of the code is thoroughly tested, or production ready.