2019-06-17 10:53 PM
Hello Vaibhav here.
I am interfacing SD card by SPI protocol with STM32F103C8T6 microcontroller.
My aim is to write data with .txt file in SD card.
I have enable the option for FatFs middleware from CubeMX but do not have any idea about how to merge SD card initialized by SPI protocol with FatFs middleware.
Sample code for the same would be highly appreciated.
Just in need of some simple code for operations like 1) write to SD card with "Example.txt" file name.
2) Read from SD card with "Example.txt" file name. etc. etc.
Please resolve the above mention issue as soon as possible as i have dead line to submit my work .
Eagerly waiting for positive response.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------NOTE: Configuration tool --> CubeMX32
Coding IDE --> uVision Keil V5.25.2.0
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thank you.
2019-06-18 12:37 AM
Hello @Community member
Please see examples in links , it may help you :)
https://bitbucket.org/mkwats/stm32_sd_spi/src/master/
https://github.com/eziya/STM32_SPI_SDCARD
Best Regards,
Khouloud.
2019-06-18 01:21 AM
Thank you for giving your valuable time.
Ill take a look, hope it would be helpful.
2019-06-18 05:27 AM
The last link https://github.com/eziya/STM32_SPI_SDCARD is more of helpful but still couldn't get code work.
if its possible for you, please provide SD card code for STM32f103C8T6 micro controller , interfaced by SPI1 protocol and taking middle-ware FatFs into consideration.
also _Error_Handel(_file,_Line_); is undefined. I have changed it according to updated version of CubeMX which is Error_Handel(); function. As a matter of fact that function is empty.
so still the part "_File" and "_Line_" in error handel function is unknown .
any help would be really appreciated.
Thank you.