Skip to main content
Vahid Mahboubi
Visitor II
April 24, 2017
Question

How Can I handle FATFS on STM32L0xx using KEIL MDK?

  • April 24, 2017
  • 2 replies
  • 1031 views
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.

    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    April 24, 2017
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    Technical Moderator
    April 24, 2017
    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

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks