cancel
Showing results for 
Search instead for 
Did you mean: 

How Can I handle FATFS on STM32L0xx using KEIL MDK?

Vahid Mahboubi
Associate
Posted on April 24, 2017 at 15:37

Hello every body

I'm new in ST. but i have some experiences on other ARM Controllers like NXP. 

Also I'm familiar with KEIL MDK series.

I have to start a new product using STM32l072CZ, I Purchased the desired device to utilizing FATFS via microSD.

the problem is that the legacy device data base does not support this device, on the other STM32CubeMX generated code dose not complete the FATFS solution. it is proper using STDIO and RTL on keil without RTOS.

2 REPLIES 2
Posted on April 24, 2017 at 17:57

Perhaps instead of relying on automated tools you could combine the FatFs library code with a DISKIO layer using the SPI to access the MicroSD card? Look at the HAL examples underneath the Cube installation, for this and other STM32 parts.

The L0 is not magically different than the parts that came before it, most of the 'unique' stuff Keil is handling is the vector table, start up code, and size of FLASH/RAM. So start with something that is close, and adapt it.

For the most part MicroSD code using SPI is similar from one platform to the next, the differences being the hardware initialization/configuration, pins and SPI Read/Write macros or functions. The protocol for SD and FATFS abstraction doesn't change between ST and NXP.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Imen.D
ST Employee
Posted on April 24, 2017 at 19:22

Hi

mahboubi.vahid

,

Check the ready example within STM32CubeL0, it may help you:

STM32Cube_FW_L0_V1.9.0\Projects\STM32L073Z_EVAL\Applications\FatFs\FatFs_uSD

This example provides a description on how to use the features offered by FatFs to configure a microSD drive.

You can get help from the following resources :

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen