cancel
Showing results for 
Search instead for 
Did you mean: 

FATFS API

Ark1
Associate II

hi, i have the HAL driver for sd card and fatfs software module but i can't understand the mechanisms that both hal and fatfs api's, it's all confused me. stuck here unable to move forward.

@Community member​ 

@Community member​ 

9 REPLIES 9

Hi,

Take a look at the Fatfs application note: http://www.elm-chan.org/fsw/ff/doc/appnote.html

The Fatfs api provides you with the hight level functionality of the fat system- it doesnt care to what it is writing or reading. HAL API provides you with the low level api, allowing you to write/read data from the SD card controller.

0690X000006C8kXQAS.png

Fatfs has an interface that has to be "married" with the HAL interface. The mechanism you are talking about connects the SD card access functions with the Fatfs module (by providing function pointers to disk_read, disk_write etc).

Ark1
Associate II

thank you:smiling_face_with_smiling_eyes: @Community member​ 

Where is your confusion

Block Storage Devices

File Systems (FAT, ISO9660, UDF, ..)

File Access (stdio)

File Data (data representation, byte data, structures, etc)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AvaTar
Lead

To add to Lukasz's comment:

The HAL code is used by the higher-level FAT-FS code to physically access the device.

As user, you only need the FAT-FS API functions, and don't need the respective HAL code directly.

Cross-post: http://www.keil.com/forum/63932/

As noted, FatFs is an independent 3rd-party product - nothing to do with ST.

As @Community member​  said, have you looked at the FatFs documentation?

Ark1
Associate II

@Andrew Neil​  which is right forum to ask my doubts about FATFS?

yeah, i did the cross-post because i do want to clear all my doubts.

You still haven't told us what your doubts actually are!

Clearly, nobody can help you with those doubts when they don't know what they are!

Have you actually visited the FatFs site? Did you not notice that there is a forum there? Have you studied the FatFs documentation?

Fatfs must be the most widely-used free Filesystem on small microcontrollers - there are lods of tutorials an examples available on the interwebs.

How much research have you done?

I think "doubts" in this context is a lack of foundational knowledge about computer architecture, interfacing, and the ability to find, study and experiment independently. I'm not from a subservient teacher-student background, often teachers have a limited or tenuous grasp of the topic areas they are covering. Pull supporting documentation, examples and sources, and review in detail, independently. Review end-to-end, some detail will make more sense if you understand the whole, other issues may flag a need to study other topic areas so you have a foundation to make decisions yourself.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Ark1
Associate II

thanks you:smiling_face_with_smiling_eyes:

@Community member​