2398549_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2398549_en-US

2398549_en-US

Fat Filesystem Integration on S32K312 (RTD 6.0.0, Non-AUTOSAR, SPI SD Card Driver)

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:

  • SD card initialization (CMD0, CMD8, ACMD41, CMD58)
  • Single block read (CMD17)
  • Single block write (CMD24)
  • Multiple block read (CMD18)
  • Multiple block write (CMD25)

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:

  1. Does NXP provide or support FatFs integration for the S32K312 using RTD 6.0.0 (Non-AUTOSAR)? If not, are there any supported examples available for other S32K3 devices that can be used as a reference?
  2. Is there any middleware package from NXP for integrating FatFs with an SD card?
  3. If there is no official example, is the recommended approach to integrate the Elm-Chan FatFs library and implement the required diskio.c interface using my existing SD card driver?
  4. Are there any reference projects, application notes, or example repositories that demonstrate FAT filesystem integration on S32K3 devices?

I am a bit confused about which approach is recommended for production development. Any guidance or references would be greatly appreciated.

Thank you.

Re: Fat Filesystem Integration on S32K312 (RTD 6.0.0, Non-AUTOSAR, SPI SD Card Driver)

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

Tags (1)
No ratings
Version history
Last update:
Saturday
Updated by: