介绍一种在嵌入式系统中基于SPI协议实现在SDHC上进行数据存储的方法。该方案以STM32F407微处理器为主控制器,采用SPI总线通信方式,与SDHC卡之间进行数据通讯与存储。结合FATFS文件系统,可方便地实现数据的存储与导出,成功地解决了舰船天线日常使用数据量大、记录和保存困难的问题。
A method of data storage on SDHC based on SPI protocol in embedded system is introduced, which makes STM32F407 as the major controller, using SPI Bus communication mode, carries out the data communication and storage with SDHC card. Combining FATFS file system, it can easily realize the storage and export of the data, and successfully solve the problem of the large amount of data and the difficulties in the daily record and preservation of the ship antenna.
2018,40(7): 125-128 收稿日期:2018-03-08
DOI:10.3404/j.issn.1672-7649.2018.07.023
分类号:TH137.7
作者简介:郑寿庆(1982-),男,硕士,工程师,研究方向为舰船天线控制技术
参考文献:
[1] 徐建功, 赵捷, 李伟, 田杰. 基于STM32F103XX微处理器的Micro SD卡读写[J]. 现代电子技术, 2010(20):26-32.XU Jian-gong, ZHAO Jie, LI Wei,et al. Read and Write Operations of Micro SD Card Based on STM32F103XX Microcontroller[J]. Modern Electronics Technique, 2010(20):26-32.
[2] 潘琢金. C8051Fxxx高速SOC单片机原理及应用[M]. 北京:北京航空航天大学出版社, 2002:169-171.PAN Zhuo-jin. The principle and application of C8051Fxxx high speed SOC MCU[M]. BEI JING:Bei Hang University Press, 2002:169-171.
[3] 冯欣宇, 夏路易, 等. 基于STC89C52单片机的SDHC卡初始化操作[J]. 机械工程及自动化, 2012(1):65-69.FENG Xin-yu, XIA Lu-yi. Initialization of SDHC Card Based on STC89C52 Microcontoller[J]. Mechanical Engineering & Automation, 2012(1):65-69.
[4] 田茂, 鲜于李可, 潘永才. SPI模式下SD卡驱动的设计与实现[J]. 现代电子技术, 2009(14):195-199.TIAN Mao, XIANYU Li-ke, PAN Yong-cai. Design and Implementation of SD Card Driven Based on SPI Mode[J]. Modern Electronics Technique, 2009(14):195-199.
[5] 蔡红专, 刘强, 陈琎. 嵌入式系统中基于SPI协议的SD卡扩展实现[J]. 微型机与应用, 2014, 33(19):23-26.CAI Hong-zhuan, LIU Qiang, CHEN Jin. The agreement extension of embedded systems based on SD card and SPI[J]. Microcomputer & Its Applications, 2014, 33(19):23-26.
[6] 韩家炜, (美)坎伯. 数据挖掘:概念与技术[M]. 北京:机械工业出版社, 2012:11-21.Han Jia-wei, MICHELINE K. Data mining:concepts and techniques[M]. BEI JING:Machinery Industry Press, 2012:11-21.