CN108227572A - A kind of serial data recording device based on FATFS32 file system - Google Patents

A kind of serial data recording device based on FATFS32 file system Download PDF

Info

Publication number
CN108227572A
CN108227572A CN201711395949.6A CN201711395949A CN108227572A CN 108227572 A CN108227572 A CN 108227572A CN 201711395949 A CN201711395949 A CN 201711395949A CN 108227572 A CN108227572 A CN 108227572A
Authority
CN
China
Prior art keywords
module
circuit board
electronic circuit
serial
file system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711395949.6A
Other languages
Chinese (zh)
Inventor
来琦
金翔
颜苗
屈建龙
钱红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
707th Research Institute of CSIC
Original Assignee
707th Research Institute of CSIC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 707th Research Institute of CSIC filed Critical 707th Research Institute of CSIC
Priority to CN201711395949.6A priority Critical patent/CN108227572A/en
Publication of CN108227572A publication Critical patent/CN108227572A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
    • G01C25/005Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass initial alignment, calibration or starting-up of inertial devices
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller

Abstract

The present invention relates to a kind of serial data recording device based on FATFS32 file system, technical characterstic is:Control circuit including special cabinet and its inside;The control circuit is made of AC/DC modules and electronic circuit board;The electronic circuit board for receiving external RS422 serial datas, and provide USB interface for copy the test data enrolled;The electronic circuit board includes serial ports transceiver, ARM chips and TF storage cards;The ARM chips include serial port module, dma module, bus matrix module, CPU, SPI module and internal flash module;The internal flash module includes two prepared buffering area BUF0 and BUF1.This invention simplifies experiment processes, can also obtain the navigation data of some particular applications, and the off-line simulation for navigation results provides reliable data source.

Description

A kind of serial data recording device based on FATFS32 file system
Technical field
The invention belongs to inertial navigation system serial data technical field of memory, are related to the serial data admission dress of inertial navigation system It puts, especially a kind of serial data recording device based on FATFS32 file system.
Background technology
Inertial navigation system needs to complete a series of experiments such as temperature compensation, calibration, test, the post analysis of result of the test before manufacture Processing needs a large amount of data.At present, host computer is usually write by peopleware, utilizes PC machine and serial server (such as MOXA Box) complete serial data admission.There are some defects for this realization method:1. inertial navigation system is defeated by serial ports with fixed frequency Go out data, the communications protocol of data often changes, and peopleware's modification is needed even to rewrite host computer, this gives peopleware Increase very big workload;2. carrying bulky serial server in some special occasions and PC machine being very inconvenient, experiment is existing Time is long during the record number of field;3. to the operation of PC machine it is possible that cause Windows system interim cards during data recording, into And lead to the loss of some data.
Therefore, it is necessary to develop a kind of light reliable serial data recording device, real-time reception inertial navigation system is sent out Serial data, and be stored in storage medium in a text form, the testing crew later stage is facilitated to analyze test data.
Invention content
The purpose of the present invention is to provide a kind of reasonable design, it is convenient and practical, easy to carry and can effective guarantee data pass The defeated safe serial data recording device based on FATFS32 file system.
The present invention solves its realistic problem and following technical scheme is taken to realize:
A kind of serial data recording device based on FATFS32 file system, the control including special cabinet and its inside Circuit;The control circuit is made of AC/DC modules and electronic circuit board;The external alternating current of input terminal of the AC/DC modules Source, the output terminal of the AC/DC modules connect with electronic circuit board and power for it;The electronic circuit board is used to receive outside RS422 serial datas, and provide USB interface for copy the test data enrolled;The electronic circuit board is received and dispatched including serial ports Device, ARM chips and TF storage cards;The ARM chips include serial port module, dma module, bus matrix module, CPU, SPI module With internal flash module;The internal flash module includes two prepared buffering area BUF0 and BUF1;The serial port module Dma module is triggered after receiving the serial data of serial ports transceiver output, which passes through bus matrix module and inside Flash module is connected, for after the bus matrix module application bus matrix right to use, by its by serial data from serial ports Module is exported to two prepared buffering area BUF0 and BUF1 of the internal flash module;One end of the bus matrix module It is connected with CPU, the other end is connected by SPI modules with TF storage cards, and CPU is by the buffering area after some buffering area is filled with In data pass through SPI interface be written TF storage cards in.
Moreover, the electronic circuit board further includes RTC clock chip and button cell, the RTC clock chip and the SPI Module is connected, and accurate clock is provided for FATFS32 file system;The button cell is connected with RTC clock chip and is It is powered.
Moreover, the electronic circuit board further includes card reader control chip, one end of card reader control chip is deposited with TF Card storage is connected, and the other end is connected by USB interface with outer PC, for copying the test data enrolled.
Moreover, the electronic circuit board further includes super capacitor charging circuit and power supply chip;The super capacitor charging The output terminal of circuit is connected with ARM chips by power supply chip and is ARM chips, serial ports transceiver, RTC clock chip, reads Card device controls chip and the power supply of TF storage cards.
The advantages of the present invention:
1st, the present invention provides a kind of serial data recording device based on FATFS32 file system, alternative PC machine, serial ports Server, host computer etc. enroll inertial navigation system test data in real time.After the test, using USB interface by the device and PC machine connects, and test data is copied to the analysis that test data is carried out in PC machine.
2nd, the present invention receives high-volume, high-frequency serial data using ARM, and serial data is written in the form of text In TF storage cards, after the test, it is connected using USB interface with PC machine, convenient for copying the test data enrolled.This apparatus body Product is small, light-weight, can the perfect combination for substituting PC machine, serial server, host computer, especially to the experiment number of some special occasions Convenience is provided according to admission work.
3rd, the present invention has successfulLY changed the traditional approach of inertial navigation system data recording, substitutes PC machine and host computer admission navigation Data, data are preserved in the form of text, are not only simplified experiment process, can also be obtained the navigation of some particular applications Data, the off-line simulation for navigation results provide reliable data source.
Description of the drawings
Fig. 1 is the serial data recording device schematic block circuit diagram of the present invention;
Fig. 2 is the electronic circuit board schematic block circuit diagram of the present invention;
Fig. 3 is the FATFS file system transplanting Typical Disposition figure of the present invention;
Fig. 4 is the super capacitor charging circuit diagram of the present invention;
Fig. 5 is the RTC clock circuit figure of the present invention.
Specific embodiment
The embodiment of the present invention is described in further detail below in conjunction with attached drawing:
A kind of serial data recording device based on FATFS32 file system, as shown in Figure 1, including special cabinet and its Internal control circuit;The control circuit is made of AC/DC modules and electronic circuit board;The input terminal of the AC/DC modules External alternating current 220V power supply, the output terminal of the AC/DC modules connect with electronic circuit board and provide direct current+5V power supplys for it;Institute Electronic circuit board is stated for receiving external RS422 serial datas, and provide USB interface for copy the test data enrolled; The electronic circuit board is as shown in Fig. 2, including serial ports transceiver, ARM chips, super capacitor charging circuit, power supply chip module, TF Storage card, card reader control chip, RTC clock chip and button cell;The ARM chips include serial port module, dma module, Bus matrix module, CPU, SPI module and internal flash module;The internal flash module includes two prepared buffering areas BUF0 and BUF1;The serial port module triggers dma module after receiving the serial data of serial ports transceiver output, which leads to It crosses bus matrix module with internal flash module to be connected, for after the bus matrix module application bus matrix right to use, borrowing It is helped to export serial data to two prepared buffering area BUF0 and BUF1 of the internal flash module from serial port module; One end of the bus matrix module is connected with CPU, and the other end is connected by SPI modules with TF storage cards, when some buffering Area is filled with rear CPU and the data in the buffering area is written by SPI interface in TF storage cards.
In the present embodiment, serial data enters the serial port module of ARM chip interiors by serial ports transceiver, triggers DMA Request.Serial data is carried to ARM chip interiors by the dma module application bus matrix right to use by it from serial port module Two buffering areas BUF0 and BUF1 of Flash preparations.After some buffering area is filled with, CPU passes through the data in the buffering area In SPI interface write-in TF storage cards.
The output terminal of the super capacitor charging circuit is connected with ARM chips by power supply chip and is ARM chips, string Mouth transceiver, RTC clock chip, card reader control chip and the power supply of TF storage cards;
In the present embodiment, super capacitor charging circuit is started to work when electronic circuit board powers on initial, makes super electricity The voltage for holding both ends progressively reaches design voltage.When electronic circuit board powers off, the electricity stored on super capacitor is protected available for CPU Remaining data and Safe withdrawing write operation are deposited, file system crash and deposit file during power-off is avoided to lose.Power supply chip will Super capacitor charging circuit output voltage (about+5V) is converted into+3.3V, be ARM chips, serial ports transceiver, RTC clock chip, The devices power supplies such as card reader control chip, TF storage cards.
The SPI modules are also connected with RTC clock chip, and accurate clock is provided for FATFS32 file system;The knob Button battery is connected with RTC clock chip and powers for it.
In the present embodiment, RTC clock chip provides accurate clock for FATFS32 file system, there is each file Creation time.Button cell continues power supply when electronic circuit board is powered off for RTC clock chip ensures its non-stop run.
The TF storage cards control chip and USB interface to be connected with outer PC by card reader, available for copying The test data of admission.
It in the present embodiment, will using card reader control chip in order to extract the test data being stored in TF storage cards TF storage cards invent a USB flash disk, and PC machine can be attached thereto by USB interface, freely copy data.Special case front panel is matched For a rectangular USB socket, it is attached between USB socket and electronic circuit board by private mask line.
The present invention operation principle be:During experiment, high-volume, high-frequency serial data are received using ARM, and Serial data is written in the form of text in TF storage cards, after the test, is connected using USB interface with PC machine, convenient for copy The test data enrolled.
Separately below to the present invention serial port data acquisition and copy, FATFS file system transplanting, file power down preserve and The course of work and operation principle of RTC clock circuit are described in detail:
(1) serial port data acquisition and copy
Serial data memory plane needs bear high-volume, the impact of high-frequency data, and can ARM chips bear to be a need The problem of paying close attention to.ARM chip interiors do not have FIFO, for each byte received must timely processing otherwise will overflow. On the other hand, for FATFS file system, file directory cannot be interrupted during refreshing.
In order to solve problem above, serial data, electronic circuit board principle frame are acquired using the scheme of DMA+ double bufferings Scheme as shown in Fig. 2, serial data is after the adjustment of serial ports transceiver level, into the serial port module of ARM chips, serial port module is every It receives a byte and notes that the byte is carried to buffering area by DMA, we construct two buffering areas in ARM chip interiors BUF0 and BUF1, causes DMA interruptions after DMA fills up BUF0, and CPU responds the interruption and the target of DMA is carried address direction BUF1, while data middle in BUF0 are stored in by SPI modules in TF card.Equally, cause in DMA after DMA fills up BUF1 Disconnected, CPU phases should be interrupted carries address direction BUF0, while in data deposit TF card middle in BUF1 by the target of DMA.
In addition, also controlling chip comprising a card reader in Fig. 2, arbitrarily copied in TF card by USB interface convenient for PC machine Data.
(2) FATFS file system is transplanted
FATFS is general FAT (File Allocation Table) text specially designed for small embedded systems Part system module.Writing for FatFs follows ANSI C, and separated completely with magnetic disc i/o layer.Therefore, its independent (not depending on) In hardware structure.It can be embedded in the microcontroller of low cost, such as AVR, 8051, PIC, ARM, Z80,68K, and It does not need to make any modification.
FATFS file system transplants Typical Disposition figure as shown in figure 3, application program directly invokes file system source program Ff.c realizes the operations such as establishment, write-in, reading, the closing of file.Ff.c calls bsp driver mmc.c and spi.c to realize The read-write operation of TF.
(3) file power down preserves
Unexpected power down when refreshing FATFS file system directories, it is possible to cause collapsing for serial data memory plane file system It bursts, the file preserved early period is caused to lose.For this reason, it may be necessary to increase energy-storage travelling wave tube (super capacitor) in plate level power supply inlet, And plate level power supply is monitored in real time, once it is powered-down, ARM chips are informed in time, utilize the remaining capacity pair on energy-storage travelling wave tube File is preserved and stops the every operation to TF card.
Super capacitor charging circuit is as shown in figure 4, C2 and C3 are the super capacitors as two in figure, capacitance about 10F Left and right, Q1, Q2 are P-channel metal-oxide-semiconductor.LTC3225 is charging current managing chip, by the voltage at C2, C3 both ends and can be charged to 4.8V, resistance R1 are used to limit the charging current of C2, C3.LTC4412 is a low-loss supplying channels controller, works as power supply VIN is closed, and after the voltage of SENSE points descends below 4.78V, LTC4412 closes Q2, opens Q1, makes the electric energy stored on C2, C3 Continue to power for backend load, maintain about 100ms.In this 100ms, the catalogue that ARM chips can complete file system refreshes simultaneously Stop every operation.
(4) RTC clock circuit
In order to which each file in TF card has creation time, RTC clock chip is needed to provide accurate clock letter for ARM Breath, at the same in order to make serial data memory plane without external power supply input under conditions of, RTC clock chip remain to continue timing, need It is (chargeable) for RTC clock chip continued power to increase button cell.
RTC clock circuit is shown in Fig. 5, and RTC clock chip employs the DS3234 of MAXIM companies of U.S. production, and ARM chips lead to It crosses SPI interface and to it be configured simultaneously read access time information, including year, month, day, hour, min, second etc..DS3234 is a high-precision The clock chip of degree, year error are less than ± 2 minutes.After inertial navigation equipment is powered-down, continued by onboard button cell for DS3234 Power supply, maintains its normal work.
It is emphasized that embodiment of the present invention is illustrative rather than limited, therefore the present invention includes Embodiment described in specific embodiment is not limited to, it is every to be obtained according to the technique and scheme of the present invention by those skilled in the art Other embodiment, also belong to the scope of protection of the invention.

Claims (4)

1. a kind of serial data recording device based on FATFS32 file system, it is characterised in that:Including special cabinet and its interior The control circuit in portion;The control circuit is made of AC/DC modules and electronic circuit board;Outside the input terminal of the AC/DC modules AC power is connect, the output terminal of the AC/DC modules connect with electronic circuit board and powers for it;The electronic circuit board is used to connect Receive external RS422 serial datas, and provide USB interface for copy the test data enrolled;The electronic circuit board includes string Mouth transceiver, ARM chips and TF storage cards;The ARM chips include serial port module, dma module, bus matrix module, CPU, SPI modules and internal flash module;The internal flash module includes two prepared buffering area BUF0 and BUF1;The string Mouth mold block triggers dma module after receiving the serial data of serial ports transceiver output, the dma module by bus matrix module with it is interior Portion's flash module is connected, for after the bus matrix module application bus matrix right to use, by its by serial data from string Mouth mold block is exported to two prepared buffering area BUF0 and BUF1 of the internal flash module;The one of the bus matrix module End is connected with CPU, and the other end is connected by SPI modules with TF storage cards, and CPU buffers this after some buffering area is filled with Data in area are written by SPI interface in TF storage cards.
2. a kind of serial data recording device based on FATFS32 file system according to claim 1, feature exist In:The electronic circuit board further includes RTC clock chip and button cell, which is connected with the SPI modules It connects, accurate clock is provided for FATFS32 file system;The button cell is connected with RTC clock chip and powers for it.
3. a kind of serial data recording device based on FATFS32 file system according to claim 1 or 2, feature It is:The electronic circuit board further includes card reader control chip, and one end of card reader control chip is connected with TF storage cards It connects, the other end is connected by USB interface with outer PC, for copying the test data enrolled.
4. a kind of serial data recording device based on FATFS32 file system according to claim 3, feature exist In:The electronic circuit board further includes super capacitor charging circuit and power supply chip;The output of the super capacitor charging circuit End is connected with ARM chips by power supply chip and is ARM chips, serial ports transceiver, RTC clock chip, card reader control core Piece and the power supply of TF storage cards.
CN201711395949.6A 2017-12-21 2017-12-21 A kind of serial data recording device based on FATFS32 file system Pending CN108227572A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711395949.6A CN108227572A (en) 2017-12-21 2017-12-21 A kind of serial data recording device based on FATFS32 file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711395949.6A CN108227572A (en) 2017-12-21 2017-12-21 A kind of serial data recording device based on FATFS32 file system

Publications (1)

Publication Number Publication Date
CN108227572A true CN108227572A (en) 2018-06-29

Family

ID=62647544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711395949.6A Pending CN108227572A (en) 2017-12-21 2017-12-21 A kind of serial data recording device based on FATFS32 file system

Country Status (1)

Country Link
CN (1) CN108227572A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542811A (en) * 2018-10-15 2019-03-29 广东宝莱特医用科技股份有限公司 A kind of data communication processing method
CN110083394A (en) * 2019-04-04 2019-08-02 龙芯中科技术有限公司 Serial port drive method, apparatus and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103217592A (en) * 2012-01-20 2013-07-24 哈尔滨建成集团有限公司 Electronic recording system
CN203935180U (en) * 2014-01-04 2014-11-12 深圳市中瑞奇电子科技有限公司 Electrocardial signal acquisition device
CN105138470A (en) * 2015-08-31 2015-12-09 浪潮集团有限公司 Multi-channel nand flash controller
CN206292769U (en) * 2016-12-29 2017-06-30 湖北三江航天红峰控制有限公司 A kind of embedded testing storage system
CN206557818U (en) * 2016-08-31 2017-10-13 航宇救生装备有限公司 Support the portable data store of transparent transmission

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103217592A (en) * 2012-01-20 2013-07-24 哈尔滨建成集团有限公司 Electronic recording system
CN203935180U (en) * 2014-01-04 2014-11-12 深圳市中瑞奇电子科技有限公司 Electrocardial signal acquisition device
CN105138470A (en) * 2015-08-31 2015-12-09 浪潮集团有限公司 Multi-channel nand flash controller
CN206557818U (en) * 2016-08-31 2017-10-13 航宇救生装备有限公司 Support the portable data store of transparent transmission
CN206292769U (en) * 2016-12-29 2017-06-30 湖北三江航天红峰控制有限公司 A kind of embedded testing storage system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542811A (en) * 2018-10-15 2019-03-29 广东宝莱特医用科技股份有限公司 A kind of data communication processing method
CN109542811B (en) * 2018-10-15 2021-12-07 广东宝莱特医用科技股份有限公司 Data communication processing method
CN110083394A (en) * 2019-04-04 2019-08-02 龙芯中科技术有限公司 Serial port drive method, apparatus and storage medium
CN110083394B (en) * 2019-04-04 2022-04-22 龙芯中科技术股份有限公司 Serial port driving method, device and storage medium

Similar Documents

Publication Publication Date Title
CN104052621B (en) Method and system for the platform management message across quick peripheral assembly interconnecting (PCIE) section
DE102018128601A1 (en) Background data refresh using a system time stamp in storage devices
CN107728712B (en) Autonomous controllable computer mainboard
CN107409056A (en) Use the communication path of repeater selective enabling first and the second communication path
DE102008015034A1 (en) Memory card, memory card system, method for controlling a host, and method for operating a memory card
CN107066068A (en) Low power consumption memories access method in storage device and storage device
EP2573715A2 (en) Microsd device loaded with a smart card
CN108227572A (en) A kind of serial data recording device based on FATFS32 file system
CN107807558A (en) Multibus communication card circuit and control method based on PCI9054
CN207318999U (en) Multibus communication card circuit based on PCI9054
CN100435124C (en) Hand held device
CN208705919U (en) A kind of RFID electronic label based on Internet of Things asset management
CN104361656B (en) A kind of data logger for aviation
CN203276294U (en) Multifunctional card reader
CN204204056U (en) A kind of data collector for aeronautical data recording instrument
CN107784218A (en) It is a kind of for the starting-up method of terminal device, device, equipment and storage medium
CN203800659U (en) Card type mobile power source with card (SD card) reading function
CN103093253B (en) A kind of Intelligent hairpin device and hair fastener method thereof
CN203276315U (en) Double-interface IC card reading/writing device
CN103035035B (en) Automatic fare collection system main control unit
CN207742248U (en) A kind of locomotive energy consumption table data storage device
CN109522984A (en) A kind of intelligent management system for library
Chen Design and implementation of FATFS data exchange with multiple storage media based on single-chip microcomputer
CN2859651Y (en) Hand-written mouse with USB concentrator
CN204101747U (en) A kind of electromagnetic data storage system based on PIC32

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180629