SD Card / SPI Assistance Needed

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

SD Card / SPI Assistance Needed

跳至解决方案
1,321 次查看
Thunder
Contributor III

Hi, I'm using an  HCS08LG32, running at 3.3V to interface with an SD card via SPI.  CLK frequency is at 4M, which is divided by 12 for the SPI SD card init sequence.  Most of the code is borrowed from that provided with the JM60 USB/SDcard demo.  I get thru the init() sequence most (by not all times) and get an error most of the time in writing the SD card.  I seem to be able to read the SD "most" of the time.  In the rare occasions that a write is successful, I can read back the numbers written.   I have the SW code as an attachment here.

Any suggestions welcome.

标签 (1)
0 项奖励
回复
1 解答
486 次查看
Thunder
Contributor III

I finally located my problem, that being a typo in one of the SPI commands (writing SPIS instead of SPID in a line of code).  Everything working fine now.

在原帖中查看解决方案

0 项奖励
回复
1 回复
487 次查看
Thunder
Contributor III

I finally located my problem, that being a typo in one of the SPI commands (writing SPIS instead of SPID in a line of code).  Everything working fine now.

0 项奖励
回复