SD存储卡接口定义了两种通信模式,SD模式和SPI模式.分析了SD传输协议后,给出了一种SD模式设备接口的设计方案.该设计能够自动解析主机发送的命令并响应,与Flash控制器相连后可以对Flash进行读写操作.为了解决数据存取的时序问题,使用了数据缓存技术.FPGA验证表明,该接口能够被电脑识别为SD卡,达到了设计目标.
The SD (Secure Digital) Memory Card interface defines two alternative communication protocols: SD and SPI. Based on analyzing SD card transport protocols, a design scheme of SD mode slave interface is proposed in this paper. The design can decode and response to host commands automatically, Flash can be read and written when connected with Flash controller. FIFO (First-In First-Out) is used in order to solve timing problem. FPGA (Field Programmable Gate Array)-based prototyping testified it can be recognized by computer as a SD card and satisfied the design goal completely.