Interfacing S32K144 with micro SD card reader (Sandisk Ultra 32GB) with LPSPI component API

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

Interfacing S32K144 with micro SD card reader (Sandisk Ultra 32GB) with LPSPI component API

2,063 Views

I have sent SD card initialization commands  [CMD0, CMD8, CMD58,CMD55,ACMD41] from s32k144 to SD card. For those commands, SD card responses are: After 8 cycles of received commands it sends 0x01; 0x01 with echoing the sent arguments; 0x05;0x05;0x01 respectively. In order to create file and store the receiving data, I preferred FAT32 file system. For that I need help. Thanks In Advance.

0 Kudos
Reply
2 Replies

2,044 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

I am not understand whether SD card reader is a device connected over SPI (as so you are using certain communication protocol to communicate with this SD card reader that is managing flash file system) or you are using SD card itself in SPI mode.

However, we still don't have a solution for either option.

In the first case you could create communication protocol according SD card reader manual.
In the second case you could possibly use some public source codes (possibly operating system like FreeRTOS) for flash file system use. Unfortunately we don't have any example or library for that.

Also I would apparently consider to use some device having SDHC controller as in SPI modem bandwidth is limited.

0 Kudos
Reply

2,007 Views

http://www.rjhcoding.com/avrc-sd-interface-2.php

The above site mentioned about how to set SPI mode of SD card with flow chart. I followed the same and modified according to the s32k144 code. And micro SD card reader I mentioned earlier was Micro SD Card Reader Module..

http://elm-chan.org/fsw/ff/00index_e.html

The above site provided the resources as well as detailed FatFs - Generic FAT file system module.

The below site interfaced PIC microcontroller and SD card with the same resource file FatFs

https://circuitdigest.com/microcontroller-projects/save-and-store-data-in-sd-card-using-pic-microcon...

If i tried with the same resource inorder to create file and store data in it, ELF file not get generated. Facing linker issues. The SD card which i am using is formatted with fat32 file system.

Looking for solution. Please find the attached file. Thanks..

 

 

0 Kudos
Reply