摘要SD卡(Secure Digital Memory Card)中文翻译为安全数码卡,是一种基于半导体快闪记忆器的新一代记忆设备,它被广泛地于便携式装置上使用,例如数码相机、个人数码助理(PDA)和多媒体播放器等。
SD卡由日本松下、东芝及美国SanDisk公司于1999年8月共同开发研制。
大小犹如一张邮票的SD记忆卡,重量只有2克,但却拥有高记忆容量、快速数据传输率、极大的移动灵活性以及很好的安全性。
由于互联网的飞速发展,各种移动设备的计算能力得到大幅提升,与外界数据通信交换量越来越大,通信的安全性以及数据的真实性尤为重要。
正是因为SD卡具有如此多的优点,才被人们广泛的应用。
根据SD卡的各种优点和特性,而在STM32平台上对其进行开发设计,着重于加强SD卡的数据通信的速度以及与嵌入式产品的通信更加方便,主要对SD卡通信时采集的电压、电流、功率及时间监测及补偿。
包含一些基本的通信及SD卡驱动实现和分析,本文基于STM32就SD卡的硬件和软件作研究设计。
最后,对SD卡课题研究进行阶段性总结和对后续工作进行展望。
关键词:SD卡;移动存储;STM32;SPI接口ABSTRACTSD card (Secure Digital Memory Card) Secure Digital card translated into Chinese, is a flash memory device based on a new generation of semiconductor memory devices, it is widely used in portable devices such as digital cameras, personal digital assistant (PDA) and multimedia players. SD card from Japan Panasonic, Toshiba and SanDisk Corporation in the United States in August 1999 jointly developed. Like a postage stamp size SD memory card, weight only 2 grams, but it has high memory capacity, fast data transfer rates, great flexibility and good mobile security. As the rapid development of Internet, computing power of mobile devices has increased substantially, with the outside world, increasing the amount of data traffic exchange, traffic safety and authenticity of data is particularly important.It is precisely because of the SD card has so many advantages, was only a wide range of applications. The various advantages and features of the SD card, while in the STM32 platform, its development and design, focus on strengthening the SD card data communication speed and more convenient communications and embedded products, mainly collected in the SD card to communicate voltage, current, power and time monitoring and compensation . Contains some basic communication and SD card driver implementation and analysis, SD card hardware and software design based on the STM32.Finally, the stage summary and outlook on the follow-up research of the SD card. Key Words: SD card; Removable Storage; STM32; SPI interface目录第一章绪论1.1 课题背景及意义 (1)1.2 SD卡简介 (1)1.3 SD卡的应用 (2)1.4 SD卡所研究的内容以及特色 (3)第二章 SD卡硬件设计2.1 硬件读写模块 (4)2.2 硬件设计模块 (4)第三章 SD卡软件设计3.1 SPI工作模式: (7)3.2 SD卡初始化: (9)3.3数据块的读写 (10)3.4 SD卡软件设计 (11)第四章调试与效果4.1 STM32连接原理图 (13)4.2 下载与调试 (13)第五章结论与展望参考文献(References) (16)致谢 (17)附录 (18)附录1 (18)附录2 (20)第一章绪论1.1 课题背景及意义21世纪是一信息传递及应用高速的时代,信息在人类社会活动中已经必不可缺,使用嵌入式系统的电子产品已经在人们的日常生活中广泛普及应用。