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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
672 次查看
SCoder41
Contributor I

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


笔记

SD.png

0 项奖励
回复
1 解答
572 次查看
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 项奖励
回复
7 回复数
645 次查看
SCoder41
Contributor I

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

0 项奖励
回复
620 次查看
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 项奖励
回复
610 次查看
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 项奖励
回复
573 次查看
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 项奖励
回复
510 次查看
SCoder41
Contributor I

Thanks,my DMA configuration is incorrect.

0 项奖励
回复
655 次查看
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 项奖励
回复
644 次查看
SCoder41
Contributor I

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

0 项奖励
回复