I need an example:S32k344 reads and writes SD card through SPI

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

I need an example:S32k344 reads and writes SD card through SPI

Jump to solution
505 Views
SCoder41
Contributor I

Do NXP official have examples of reading and writing SD cards?


笔记

SD.png

0 Kudos
1 Solution
405 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @SCoder41 

To make sure the FlexIO as SPI works properly, please try testing the SPI example with the settings you require.

View solution in original post

0 Kudos
7 Replies
478 Views
SCoder41
Contributor I

Can I use Flexio_SPI to read and write SD cards on s32k344?

0 Kudos
453 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @SCoder41,

It is possible if the FlexIO module supports the SD card's operating requirements. Unfortunately, we do not provide any examples for this application. The functionality is on your implementation.

0 Kudos
443 Views
SCoder41
Contributor I

I can not receive data from sd card,but The oscilloscope shows that the SD card has responded.My array has no data,that’s why?

1.jpg2.jpg3.png4.png5.png6.png7.png8.png

9.png

0 Kudos
406 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @SCoder41 

To make sure the FlexIO as SPI works properly, please try testing the SPI example with the settings you require.

0 Kudos
343 Views
SCoder41
Contributor I

Thanks,my DMA configuration is incorrect.

0 Kudos
488 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @SCoder41 

I am afraid, that we do not provide any examples for SD Cards through SPI.

It is important to mention that certain commands are not available for the SPI mode of interfacing and also, the speed will be lower than the SD mode. But this kind of interfacing is simpler especially since most microcontrollers have built-in SPI hardware modules. For S32K3 devices the module that provides the interface between the host system and the SD card is the Ultra Secured Digital Host Controller (uSDHC), which is only present in S32K328, S32K338, S32K348, and S32K358 devices.

 

B.R.

VaneB

0 Kudos
477 Views
SCoder41
Contributor I

Can I use Flexio_SPI to read and write SD cards on s32k344?

0 Kudos