Hi,
I have successfully implemented an SD Card driver over SPI on the S32K312 EVB using RTD 6.0.0 (Non-AUTOSAR Lpspi_Ip driver).
The following functionality is already working:
The driver has been verified by successfully writing data to the SD card and reading it back.
Now I would like to add FAT filesystem support so that files can be created, written, and read on a PC.
I have a few questions:
I am a bit confused about which approach is recommended for production development. Any guidance or references would be greatly appreciated.
Thank you.
Hi @parvathitp
There is currently no specific FatFS support for the S32K312. Within the S32K3 family, FatFS integration is available only for devices that include the uSDHC peripheral, which provides the hardware interface between the microcontroller and an SD card.
For these devices, an SDHC software stack is provided to simplify access to the SD bus through the uSDHC driver and to enable integration with FatFS.
The approach and concepts described in the community thread "Porting FatFs file system to KL26 SPI SD card code" may be a useful reference for your implementation. Although the example is based on the KL26 device, as the title suggests, it describes how to port the FatFS file system to a device that does not include an SDHC/uSDHC peripheral, which is similar to your use case.
BR, VaneB