An upgrade system and upgrade method based on IAP

By designing an IAP-based upgrade system and using two MCU modules to upgrade the smart teller machine, the problems of understable and poor portability in the existing technology are solved, and efficient, safe and reliable system upgrades are achieved.

CN109117165BActive Publication Date: 2025-02-25SHANGHAI GOOAO ELECTRONIC TECHNOLOGY CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201811112552.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-09-25
Publication Date
2025-02-25
Estimated Expiration
2038-09-25

AI Technical Summary

Technical Problem

In the prior art, the upgrade method of smart teller machines is not stable and has poor transplantability. The customized upgrade implementation methods of various manufacturers are not open, making it difficult to develop a general IAP-based upgrade system.

Method used

An IAP-based upgrade system was designed, including a PC unit, an image unit, an upper main control board unit and a lower main control board unit. The instructions and data transmission during the upgrade process are realized through two MCU modules, simplifying the upgrade process and speeding up the Upgrade speed, improve stability and portability.

Benefits of technology

It realizes a stable, fast and efficient system upgrade of smart teller machines, improves the security and reliability of the system, and has strong portability, and is suitable for products from different manufacturers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109117165B_ABST
    Figure CN109117165B_ABST
Patent Text Reader

Abstract

The present application provides an IAP-based upgrade system and an upgrade method thereof, the upgrade system comprising a PC unit, an image unit, an upper main control board unit and a lower main control board unit; the image unit comprises a DSP module, the upper main control board unit comprises a first MCU module and a first FLASH module, the lower main control board unit comprises a second MCU module and a second FLASH module; the PC unit is communicatively connected to the DSP module, the DSP module is communicatively connected to the first MCU module, and the first MCU module is communicatively connected to the second MCU module. The first MCU module controls the upgrade of the first FLASH module according to the upgrade instruction sent by the DSP module, and / or the first MCU module forwards the upgrade instruction to the second MCU module, and the second MCU module controls the upgrade of the second FLASH module according to the upgrade instruction. The present application adopts two MCU modules to implement the instructions and data transmission of the upgrade process, which speeds up the upgrade speed and has good stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of embedded technology, and in particular to an IAP-based upgrade system and an upgrade method thereof applied to an intelligent teller machine. Background Art

[0002] In the existing technology, with the rapid development of electronic technology, communication technology and computer technology, embedded systems have been widely used in various fields. Various industries have increasing requirements for the system functions, performance and scale of embedded devices. Developers must be able to maintain and upgrade the system in a timely manner according to customer needs in order to extend the system's service life and improve system performance.

[0003] The existing upgrade methods are divided into two types: In-Circuit Programming (ICP) and In-Application Programming (IAP). In-Circuit Programming is to download the user application to the microcontroller through the JTAG / SWD protocol or the system loader (Bootloader); In-Application Programming is to download the program or application data to the memory through any communication interface, such as the network port, USB, UART, etc., to achieve the upgrade without operating the hardware platform. With the IAP function, the program firmware in the product can be easily updated through the reserved communication port even after the product is released.

[0004] In the prior art, the upgrade method of intelligent teller machines uses online system programming tools to download applications to the control chip, which requires the help of an operating platform. The system upgrade is not stable and has poor portability. At present, each manufacturer has a customized upgrade implementation method for their own products, and the code is not open source and free to share. Therefore, how to develop an IAP-based upgrade system and upgrade method for intelligent teller machines is an urgent problem to be solved by those skilled in the art. Summary of the invention

[0005] The purpose of the present invention is to provide an IAP-based upgrade system and an upgrade method thereof, which are applied to intelligent teller machines to solve the problems raised in the above technical background.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A first aspect of the present invention provides an IAP-based upgrade system, comprising a PC unit, an image unit, an upper main control board unit and a lower main control board unit; the image unit comprises a DSP module, the upper main control board unit comprises a first MCU module and a first FLASH module, and the lower main control board unit comprises a second MCU module and a second FLASH module;

[0008] The PC unit is connected to the DSP module for communication, the DSP module is connected to the first MCU module for communication, and the first MCU module is connected to the second MCU module for communication;

[0009] The DSP module sends an upgrade instruction to the first MCU module and reads the upgrade data compressed file sent by the PC unit. The first MCU module controls the first FLASH module to upgrade according to the upgrade instruction, and / or the first MCU module forwards the upgrade instruction to the second MCU module, and the second MCU module controls the second FLASH module to upgrade according to the upgrade instruction.

[0010] Preferably, the upper main control board unit presets a first communication protocol, and after the instructions sent by the PC unit to the first MCU module through the image unit comply with the first communication protocol, the upper main control board unit executes the instructions sent by the PC unit, or sends them to the lower main control board unit.

[0011] Preferably, the lower main control board unit presets a second communication protocol, and after the instruction sent by the first MCU module to the second MCU module complies with the second communication protocol, the lower main control board unit executes the instruction sent by the upper main control board unit.

[0012] More preferably, the first communication protocol and the second communication protocol are the same or different.

[0013] Furthermore, the image unit and the upper main control board unit use RS232 communication protocol.

[0014] Furthermore, the RS485 communication protocol is adopted between the upper main control board unit and the lower main control board unit.

[0015] Preferably, the PC unit communicates with the imaging unit via a USB connection.

[0016] Preferably, the IAP-based upgrade system further comprises a storage unit, which is communicatively connected with the DSP module and stores the upgrade data compressed file forwarded by the DSP module and sent by the PC unit.

[0017] More preferably, the storage unit includes, but is not limited to, one of a USB flash drive, a hard disk, a CD, and a floppy disk.

[0018] Preferably, the IAP-based upgrade system further comprises a liquid crystal display unit, and the liquid crystal display unit is respectively connected to the DSP module and the first MCU module via RS232 communication protocol.

[0019] Specifically, the LCD display unit is used to display the upgrade information of each module, update the corresponding progress bar and upgrade percentage, and / or display the encoding of the error information sent by the first MCU module in the upper main control board unit, and / or for development engineers to debug the program.

[0020] More preferably, the liquid crystal display unit uses a touch display screen.

[0021] Preferably, the upper main control board unit also includes a first FPGA module, which is connected to the first FLASH module via an SPI transmission method and executes the first MCU module to forward the first control command sent by the PC unit via the DSP module.

[0022] Preferably, the lower main control board unit further includes a second FPGA module, and the second FPGA module is connected to the second FLASH module via an SPI transmission mode to execute the second MCU module to receive the second control command sent by the first MCU module.

[0023] More preferably, the first control command includes, but is not limited to, one or more of a power-on self-test command, a money deposit and withdrawal command, a dust cover switch command, a data packet transmission command, and a shutdown command.

[0024] More preferably, the second control command includes, but is not limited to, one or more of a power-on self-test command, a money deposit and withdrawal command, a dust cover switch command, a data packet transmission command, and a shutdown command.

[0025] More preferably, the first control command and the second control command are the same or different.

[0026] Preferably, the image unit further comprises a third FPGA module, a thickness measurement module and / or a magnetic module, the third FPGA module is communicatively connected to the DSP module, and the thickness measurement module and / or the magnetic module is communicatively connected to the third FPGA module;

[0027] The third FPGA module sends the banknote thickness data sent by the thickness measuring module and / or the banknote magnetic data sent by the magnetic module to the DSP module, or

[0028] The third FPGA module sends the verification information sent by the thickness measurement module and / or the verification information sent by the magnetic module to the DSP module;

[0029] The DSP module sends the upgraded data compressed file sent by the PC unit to the thickness measurement module and / or the magnetic module through the third FPGA module.

[0030] More preferably, the third FPGA module includes a RAM core, and the banknote thickness data sent by the thickness measuring module and / or the banknote magnetic data sent by the magnetic module are written into the RAM core and wait for the DSP module to read, or

[0031] The verification information sent by the thickness measurement module and / or the verification information sent by the magnetic module is written into the RAM core, waiting to be read by the DSP module;

[0032] The DSP module writes the upgrade data compressed file sent by the PC unit into the RAM core.

[0033] A second aspect of the present invention provides an IAP-based upgrade method, the method comprising:

[0034] Step A1: The PC unit sends the upgrade data compressed file to the DSP module, and executes step A2;

[0035] Step A2: the DSP module writes the received compressed upgrade data file into the storage unit, and the process is cyclically repeated until the compressed upgrade data file is completely transmitted, and then step A3 is executed;

[0036] Step A3: the DSP module performs data integrity analysis on the upgrade data compressed file. If the upgrade data compressed file is incomplete, the user function program is executed and the task is exited; if the upgrade data compressed file is complete, the system enters the upgrade task and executes step A4;

[0037] Step A4: Determine whether the DSP module has been upgraded. If it has been upgraded, execute the DSP module upgrade program and exit the upgrade task. If it has not been upgraded, execute step A5.

[0038] Step A5: Determine whether the lower main control board unit is upgraded. If it is upgraded, execute the lower main control board unit upgrade program and exit the upgrade task; if it is not upgraded, execute step A6;

[0039] Step A6: Determine whether the upper main control board unit is upgraded. If it is upgraded, execute the upper main control board unit upgrade program and exit the upgrade task; if it is not upgraded, execute step A7;

[0040] Step A7: Determine whether the magnetic module is upgraded. If it is upgraded, execute the magnetic module upgrade program and exit the upgrade task; if it is not upgraded, execute step A8;

[0041] Step A8: Determine whether the thickness measurement module is upgraded. If upgraded, execute the thickness measurement module upgrade program and exit the upgrade task; if not upgraded, execute step A9;

[0042] Step A9: Determine whether the liquid crystal display unit is upgraded. If it is upgraded, execute the liquid crystal display unit upgrade program and exit the upgrade task; if it is not upgraded, exit the upgrade task.

[0043] Preferably, in step A3, the DSP module performs data integrity analysis on the upgrade data compression file, specifically including:

[0044] Step A31: the DSP module is connected to the storage unit, and step A32 is executed;

[0045] Step A32: Determine whether the upgrade data compressed file exists in the storage unit. If not, execute the user function program and exit the task; if yes, execute step A33;

[0046] Step A33: the DSP module copies the upgraded data compressed file and executes step A34;

[0047] Step A34: The DSP module verifies whether the copied upgrade data compressed file is complete. If not, execute step A33; if complete, the system enters the upgrade task.

[0048] Preferably, the upgrade data compressed file includes upgrade data compressed files required for upgrading multiple modules to be upgraded, and the modules to be upgraded include one or more of the DSP module, the lower main control board unit, the upper main control board unit, the magnetic module, the thickness measurement module and the liquid crystal display unit.

[0049] More preferably, the IAP-based upgrade method further includes an upgrade verification step, wherein the module to be upgraded performs an upgrade verification on the corresponding upgraded data compressed file it receives before executing the corresponding upgrade program, and after the upgrade verification, feedback is given of upgrade success or upgrade failure.

[0050] Furthermore, the upgrade verification step includes:

[0051] Step B1: The module to be upgraded reads the data information of the file header of the corresponding upgraded data compressed file, and performs data verification according to the relevant protocol. If the data is incorrect, feedback is given of upgrade failure, and the DSP module resends the corresponding upgraded data compressed file or abandons the upgrade; if the data is correct, step B2 is executed;

[0052] Step B2: the module to be upgraded reads the first frame data information of the corresponding upgraded data compressed file, and performs data verification according to the relevant protocol. If the data is incorrect, feedback is given of upgrade failure, and the DSP module resends the corresponding upgraded data compressed file or abandons the upgrade; if the data is correct, step B3 is executed;

[0053] Step B3: the module to be upgraded reads the second frame data information of the corresponding upgraded data compressed file, and performs data verification according to the relevant protocol, and repeats the process until the module to be upgraded receives the corresponding upgraded data compressed file and feeds back upgraded success information.

[0054] In the context of the present invention, unless otherwise stated, the term DSP module is the abbreviation of Digital Signal Processing, i.e., digital signal processor; the term MCU module is the abbreviation of Microcontroller Unit, i.e., microcontroller, also known as single chip microcomputer (Single Chip Microcomputer) or single chip microcomputer.

[0055] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0056] 1) An IAP-based upgrade system is provided, which is applied to intelligent teller machines and adopts two MCU modules to implement instructions and data transmission during the upgrade process. During the upgrade process, the first MCU module can forward instructions and upgrade data sent by the DSP module to the second MCU module, so that the DSP module only needs to connect to the first MCU module to upgrade the second MCU module, which simplifies the upgrade process, speeds up the upgrade speed, and has good stability and strong portability, greatly improving the security and reliability of system upgrades.

[0057] 2) Provide an IAP-based upgrade method that can support the normal operation of the above upgrade system. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The drawings that constitute part of this application are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation on this application. In the drawings:

[0059] Figure 1 is a principle block diagram of an upgrade system according to a preferred embodiment of the present invention;

[0060] Figure 2 is a flow chart of an upgrade method according to a preferred embodiment of the present invention;

[0061] Figure 3 It is a flow chart of the DSP module reading the upgrade data compressed file according to the preferred embodiment of the present invention;

[0062] Figure 4 It is a flow chart of the upgrade verification steps of the preferred embodiment of the present invention.

[0063] Legend:

[0064] 1. PC unit; 2. Image unit; 21. DSP module; 22. Third FPGA module; 23. Thickness measurement module; 24. Magnetic module; 3. Upper main control board unit; 31. First MCU module; 32. First FLASH module; 33. First FPGA module; 4. Lower main control board unit; 41. Second MCU module; 42. Second FLASH module; 43. Second FPGA module; 5. Storage unit; 6. LCD display unit. DETAILED DESCRIPTION

[0065] The present invention provides an IAP-based upgrade system and an upgrade method thereof. To make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0066] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0067] Embodiment 1:

[0068] Figure 1 It is a functional block diagram of an upgrading system according to a preferred embodiment of the present invention.

[0069] like Figure 1 As shown, an IAP-based upgrade system is applied to an intelligent teller machine, including a PC unit 1, an image unit 2, a storage unit 5, a liquid crystal display unit 6, an upper main control board unit 3 and a lower main control board unit 4; the image unit 2 includes a DSP module 21, a third FPGA module 22, a thickness measurement module 23 and / or a magnetic module 24; the upper main control board unit 3 includes a first MCU module 31, a first FLASH module 32 and a first FPGA module 33; the lower main control board unit 4 includes a second MCU module 41, a second FLASH module 42 and a second FPGA module 43.

[0070] The PC unit 1 is in communication connection with the DSP module 21. In a preferred embodiment, the PC unit 1 communicates with the image unit 2 via a USB connection.

[0071] The DSP module 21 is respectively connected to the storage unit 5, the third FPGA module 22 in the image unit 2, the liquid crystal display unit 6 and the first MCU module 31 in the upper main control board unit 3. The thickness measurement module 23 and / or the magnetic module 24 are communicatively connected to the third FPGA module 22. In a preferred embodiment, the thickness measurement module 23 and / or the magnetic module 24 are communicatively connected to the third FPGA module 22 via the RS232 communication protocol.

[0072] The storage unit 5 stores the upgrade data compressed file forwarded by the DSP module 21 and sent by the PC unit 1. The storage unit 5 includes, but is not limited to, one of a USB flash drive, a hard disk, an optical disk, and a floppy disk.

[0073] The liquid crystal display unit 6 is respectively connected to the DSP module 21 and the first MCU module 31 through the RS232 communication protocol. The liquid crystal display unit 6 is used to display the upgrade information of each module, update the corresponding progress bar and the upgrade percentage, and / or display the code of the error information sent by the first MCU module 31 in the upper main control board unit 3, and / or for the development engineer to debug the program. In a preferred embodiment, the liquid crystal display unit 6 uses a touch screen.

[0074] The third FPGA module 22 sends the banknote thickness data sent by the thickness measuring module 23 and / or the banknote magnetic data sent by the magnetic module 24 to the DSP module 21, or the third FPGA module 22 sends the verification information sent by the thickness measuring module 23 and / or the verification information sent by the magnetic module 24 to the DSP module 21; the DSP module 21 sends the upgraded data compressed file sent by the PC unit 1 to the thickness measuring module 23 and / or the magnetic module 24 through the third FPGA module 22.

[0075] In a preferred embodiment, the third FPGA module 22 includes a RAM core, and the banknote thickness data sent by the thickness measuring module 23 and / or the banknote magnetic data sent by the magnetic module 24 are written into the RAM core, waiting to be read by the DSP module 21, or the verification information sent by the thickness measuring module 23 and / or the verification information sent by the magnetic module 24 are written into the RAM core, waiting to be read by the DSP module 21; the DSP module 21 writes the upgraded data compressed file sent by the PC unit 1 into the RAM core.

[0076] The DSP module 21 is communicatively connected to the first MCU module 31 ; the first MCU module 31 is communicatively connected to the second MCU module 41 .

[0077] The upper main control board unit 3 presets a first communication protocol. After the instruction sent by the PC unit 1 to the first MCU module 31 through the image unit 2 complies with the first communication protocol, the upper main control board unit 3 executes the instruction sent by the PC unit 1, or sends it to the lower main control board unit 4.

[0078] The lower main control board unit 4 presets a second communication protocol, and after the instruction sent by the first MCU module 31 to the second MCU module 41 complies with the second communication protocol, the lower main control board unit 4 executes the instruction sent by the upper main control board unit 3 .

[0079] The first communication protocol and the second communication protocol are the same or different. In a preferred embodiment, the image unit 2 and the upper main control board unit 3 use the RS232 communication protocol, and the upper main control board unit 3 and the lower main control board unit 4 use the RS485 communication protocol.

[0080] Among them, in the upper main control board unit 3, the first MCU module 31 is connected to the first FLASH module 32 through SPI transmission mode, and controls the first FLASH module 32 to achieve upgrading according to the upgrading instruction sent by the DSP module 21; the first FPGA module 33 is connected to the first FLASH module 32 through SPI transmission mode, and executes the first MCU module 31 to forward the first control command sent by the PC unit 1 through the DSP module 21. The first control command includes, but is not limited to, one or more of a power-on self-test command, a money access command, a dust cover switch command, a data packet transmission command, and a shutdown command.

[0081] In the lower main control board unit 4, the second MCU module 41 is connected to the second FLASH module 42 via SPI transmission mode, and controls the second FLASH module 42 to achieve upgrading according to the upgrading instruction sent by the DSP module 21; the second FPGA module 43 is connected to the second FLASH module 42 via SPI transmission mode, and executes the second MCU module 41 to receive the second control command sent by the first MCU module 31. The second control command includes, but is not limited to, one or more of the power-on self-test command, money access command, dust cover switch command, data packet transmission command and shutdown command. The first control command and the second control command are the same or different.

[0082] The above IAP-based upgrade system works as follows:

[0083] In the non-upgrade state, the PC unit 1 sends a power-on self-test command, a money deposit and withdrawal command, a dust cover switch command, a data packet transmission command, and a shutdown command to the DSP module 21. The DSP module 21 analyzes and processes the image information sent by the magnetic module 24 and / or the thickness measurement module 23, and transmits the analysis result of the image information to the first MCU module 31 in the upper main control board unit 3, and / or analyzes and processes the power-on self-test command, money deposit and withdrawal command, dust cover switch command, data packet transmission command, and shutdown command sent by the PC unit 1 and sends them to the first MCU module 31 in the upper main control board unit 3. The first MCU module 31 executes the power-on self-test command, money deposit and withdrawal command, dust cover switch command, data packet transmission command, and shutdown command sent by the DSP module 21, or forwards the above commands to the second MCU module 41 in the lower main control board unit 4, and the second MCU module 41 cooperates with the upper main control board unit 3 to complete the power-on self-test command, money deposit and withdrawal command, data packet transmission command, and shutdown command.

[0084] In the upgrade state, the PC unit 1 sends an upgrade data compressed file to the DSP module 21, and the DSP module 21 transmits the upgrade data compressed file to the storage unit 5, and the DSP module 21 is upgraded first. The DSP module 21 sends an upgrade instruction to the first MCU module 31, and the first MCU module 31 controls the first FLASH module 32 to upgrade according to the upgrade instruction; if the lower main control board unit 4 needs to be upgraded, the first MCU module 31 transmits the upgrade command to the second MCU module 41 in the lower main control board unit 4, and the second MCU module 41 controls the second FLASH module 42 to upgrade according to the upgrade instruction; if both are upgraded, the lower main control board unit 4 is upgraded first. The DSP module 21 sends an upgrade instruction to the magnetic module 24, and the magnetic module 24 is upgraded according to the upgrade instruction; the DSP module 21 sends an upgrade instruction to the thickness measurement module 23, and the thickness measurement module 23 is upgraded according to the upgrade instruction; if both are upgraded, the magnetic module 24 is upgraded first. The DSP module 21 sends an upgrade instruction to the liquid crystal display unit 6, and the liquid crystal display unit 6 is upgraded according to the upgrade instruction.

[0085] Embodiment 2:

[0086] The upgraded data compressed file includes upgraded data compressed files required for upgrading multiple modules to be upgraded, and the modules to be upgraded include one or more of the DSP module 21, the lower main control board unit 4, the upper main control board unit 3, the magnetic module 24, the thickness measurement module 23 and the liquid crystal display unit 6.

[0087] Figure 2 It is a flow chart of the upgrading method of the preferred embodiment of the present invention.

[0088] Figure 3 It is a flow chart of the DSP module reading the upgrade data compressed file in the preferred embodiment of the present invention.

[0089] Figure 4 It is a flow chart of the upgrade verification steps of the preferred embodiment of the present invention.

[0090] like Figure 2 As shown, the IAP-based upgrade method includes:

[0091] Step A1: PC unit 1 sends the upgrade data compressed file to DSP module 21, and executes step A2;

[0092] Step A2: the DSP module 21 writes the received compressed upgrade data file into the storage unit 5, and the process is cyclically repeated until the compressed upgrade data file is completely transmitted, and then step A3 is executed;

[0093] Step A3: the DSP module 21 performs data integrity analysis on the upgrade data compressed file. If the upgrade data compressed file is incomplete, the user function program is executed and the task is exited; if the upgrade data compressed file is complete, the system enters the upgrade task and executes step A4;

[0094] Step A4: Determine whether the DSP module 21 has been upgraded. If it has been upgraded, execute the DSP module upgrade program and exit the upgrade task. If it has not been upgraded, execute step A5.

[0095] Step A5: Determine whether the lower main control board unit 4 is upgraded. If it is upgraded, execute the lower main control board unit upgrade program and exit the upgrade task; if it is not upgraded, execute step A6;

[0096] Step A6: Determine whether the upper main control board unit 3 is upgraded. If it is upgraded, execute the upper main control board unit upgrade program and exit the upgrade task; if it is not upgraded, execute step A7;

[0097] Step A7: Determine whether the magnetic module 24 is upgraded. If upgraded, execute the magnetic module upgrade program and exit the upgrade task; if not upgraded, execute step A8;

[0098] Step A8: Determine whether the thickness measurement module 23 is upgraded. If upgraded, execute the thickness measurement module upgrade program and exit the upgrade task; if not upgraded, execute step A9;

[0099] Step A9: Determine whether the liquid crystal display unit 6 is upgraded. If it is upgraded, execute the liquid crystal display unit upgrade program and exit the upgrade task; if it is not upgraded, exit the upgrade task.

[0100] Among them, in the step A3, the DSP module 21 performs data integrity analysis on the upgrade data compressed file, such as Figure 3 As shown, specifically including:

[0101] Step A31: the DSP module 21 is connected to the storage unit 5, and step A32 is executed;

[0102] Step A32: Determine whether the upgrade data compressed file exists in the storage unit 5. If not, execute the user function program and exit the task; if yes, execute step A33;

[0103] Step A33: the DSP module 21 copies the upgrade data compressed file and executes step A34;

[0104] Step A34: The DSP module 21 verifies whether the copied upgrade data compressed file is complete. If not, execute step A33; if complete, the system enters the upgrade task.

[0105] In a preferred embodiment, the IAP-based upgrade method also includes an upgrade verification step, and the module to be upgraded performs an upgrade verification on the corresponding upgraded data compressed file it receives before executing the corresponding upgrade program. After the upgrade verification, information on upgrade success or failure is fed back.

[0106] like Figure 4 As shown, the upgrade verification step includes:

[0107] Step B1: The module to be upgraded reads the data information of the file header of the corresponding upgraded data compressed file, and performs data verification according to the relevant protocol. If the data is incorrect, feedback is given of upgrade failure, and the DSP module 21 resends the corresponding upgraded data compressed file or abandons the upgrade; if the data is correct, step B2 is executed;

[0108] Step B2: the module to be upgraded reads the first frame data information of the corresponding upgraded data compressed file, and performs data verification according to the relevant protocol. If the data is incorrect, feedback is given of upgrade failure, and the DSP module 21 resends the corresponding upgraded data compressed file or abandons the upgrade; if the data is correct, step B3 is executed;

[0109] Step B3: the module to be upgraded reads the second frame data information of the corresponding upgraded data compressed file, and performs data verification according to the relevant protocol, and repeats the process until the module to be upgraded receives the corresponding upgraded data compressed file and feeds back upgraded success information.

[0110] The following is a specific description taking the magnetic module 24 in the image unit 2 as an example:

[0111] When the magnetic module 24 needs to be upgraded, first, the PC unit 1 sends the upgraded data compressed file of the magnetic module 24 to the DSP module 21, and then the DSP module 21 writes the received upgraded data compressed file to the storage unit 5, such as a USB flash drive, and repeats until the upgraded data compressed file is transmitted. After the upgraded data compressed files are written to the storage unit 5, the DSP module 21 performs data integrity analysis on the upgraded data compressed files. If the data is complete, the upgrade task is started. If the data is incomplete, the DSP module 21 re-copies the upgraded data compressed files.

[0112] After the magnetic module 24 enters the upgrade task, the DSP module 21 writes the file header of the upgraded data compressed file to the RAM core of the third FPGA module 22 in the image unit 2, and then the third FPGA module 22 reads the data information of the file header in the RAM core and sends it to the magnetic module 24 through the serial port. The magnetic module 24 performs data analysis according to the relevant protocol. If the data is incorrect, the incorrect data information is sent to the third FPGA module 22 through the serial port and written to the RAM core. The DSP module 21 reads the returned data information from the RAM core for analysis. If it is found that it does not match the protocol, the upgrade fails. At this time, the DSP module 21 can continue to send the file header or give up the upgrade; if it is correct, the correct data information is sent to the third FPGA module 22 through the serial port and written to the RAM core. The DSP module 21 reads the returned data information from the RAM core for analysis. If it matches the protocol, it starts to write the first frame of data information of the upgraded data compressed file to the RAM core. and sent to the magnetic module 24 through the serial port. The magnetic module 24 performs data analysis according to the relevant protocol. If it is incorrect, the incorrect data information is sent to the third FPGA module 22 through the serial port and written to the RAM core. The DSP module 21 reads the returned data information from the RAM core for analysis. If it is found that it does not match the protocol, the upgrade fails. At this time, the DSP module 21 can continue to send the first frame of data information or give up the upgrade; if it is correct, the correct data information is sent to the third FPGA module 22 through the serial port and written to the RAM core. The DSP module 21 reads the returned data information from the RAM core for analysis. If it matches the protocol, the second frame of data information of the upgraded data compressed file is written to the RAM core and sent to the magnetic module 24 through the serial port. The magnetic module 24 performs data analysis according to the relevant protocol, and the cycle is repeated until the magnetic module 24 completes receiving the upgraded data compressed file. The magnetic module 24 jumps to the user function program and the upgrade task is completed.

[0113] The specific embodiments of the present invention are described in detail above, but they are only examples, and the present invention is not limited to the specific embodiments described above. For those skilled in the art, any equivalent modifications and substitutions made to the present invention are also within the scope of the present invention. Therefore, the equalization changes and modifications made without departing from the spirit and scope of the present invention should be included in the scope of the present invention.

Claims

1. An IAP-based upgrade system, characterized by: It includes a PC unit, an image unit, an upper main control board unit and a lower main control board unit; the image unit includes a DSP module, the upper main control board unit includes a first MCU module and a first FLASH module, and the lower main control board unit includes a second MCU module and a second FLASH module; The PC unit is connected to the DSP module for communication, the DSP module is connected to the first MCU module for communication, and the first MCU module is connected to the second MCU module for communication; The DSP module sends an upgrade instruction to the first MCU module, and reads the upgrade data compressed file sent by the PC unit, the first MCU module controls the first FLASH module to upgrade according to the upgrade instruction, and / or the first MCU module forwards the upgrade instruction to the second MCU module, and the second MCU module controls the second FLASH module to upgrade according to the upgrade instruction; The image unit further includes a third FPGA module, a thickness measurement module and / or a magnetic module, the third FPGA module is communicatively connected to the DSP module, and the thickness measurement module and / or the magnetic module is communicatively connected to the third FPGA module; The third FPGA module sends the banknote thickness data sent by the thickness measuring module and / or the banknote magnetic data sent by the magnetic module to the DSP module, or The third FPGA module sends the verification information sent by the thickness measurement module and / or the verification information sent by the magnetic module to the DSP module; The DSP module sends the upgraded data compressed file sent by the PC unit to the thickness measurement module and / or the magnetic module through the third FPGA module; The third FPGA module includes a RAM core, and the banknote thickness data sent by the thickness measuring module and / or the banknote magnetic data sent by the magnetic module are written into the RAM core and wait for the DSP module to read, or The verification information sent by the thickness measurement module and / or the verification information sent by the magnetic module is written into the RAM core, waiting to be read by the DSP module; The DSP module writes the upgrade data compressed file sent by the PC unit into the RAM core.

2. The IAP-based upgrade system according to claim 1, characterized in that: The IAP-based upgrade system further includes a storage unit, which is communicatively connected with the DSP module and stores the upgrade data compressed file forwarded by the DSP module and sent by the PC unit.

3. The IAP-based upgrade system according to claim 1, characterized in that: The IAP-based upgrade system further comprises a liquid crystal display unit, and the liquid crystal display unit is respectively connected to the DSP module and the first MCU module through the RS232 communication protocol.

4. The IAP-based upgrade system according to claim 1, characterized in that: The upper main control board unit also includes a first FPGA module, which is connected to the first FLASH module via an SPI transmission mode and executes the first MCU module to forward the first control command sent by the PC unit via the DSP module.

5. The IAP-based upgrade system according to claim 1, characterized in that: The lower main control board unit also includes a second FPGA module, which is connected to the second FLASH module via an SPI transmission method to execute the second MCU module to receive a second control command sent by the first MCU module.

6. An IAP-based upgrade method, applied to the system as claimed in claim 1, characterized in that: The method includes: Step A1: The PC unit sends the upgrade data compressed file to the DSP module, and executes step A2; Step A2: the DSP module writes the received compressed upgrade data file into the storage unit, and the process is cyclically repeated until the compressed upgrade data file is completely transmitted, and then step A3 is executed; Step A3: the DSP module performs data integrity analysis on the upgrade data compressed file. If the upgrade data compressed file is incomplete, the user function program is executed and the task is exited; if the upgrade data compressed file is complete, the system enters the upgrade task and executes step A4; Step A4: Determine whether the DSP module has been upgraded. If it has been upgraded, execute the DSP module upgrade program and exit the upgrade task. If it has not been upgraded, execute step A5. Step A5: Determine whether the lower main control board unit is upgraded. If it is upgraded, execute the lower main control board unit upgrade program and exit the upgrade task; if it is not upgraded, execute step A6; Step A6: Determine whether the upper main control board unit is upgraded. If it is upgraded, execute the upper main control board unit upgrade program and exit the upgrade task; if it is not upgraded, execute step A7; Step A7: Determine whether the magnetic module is upgraded. If it is upgraded, execute the magnetic module upgrade program and exit the upgrade task; if it is not upgraded, execute step A8; Step A8: Determine whether the thickness measurement module is upgraded. If upgraded, execute the thickness measurement module upgrade program and exit the upgrade task; if not upgraded, execute step A9; Step A9: Determine whether the liquid crystal display unit is upgraded. If it is upgraded, execute the liquid crystal display unit upgrade program and exit the upgrade task; if it is not upgraded, exit the upgrade task.

7. The IAP-based upgrade method according to claim 6, characterized in that: In step A3, the DSP module performs data integrity analysis on the upgrade data compressed file, specifically including: Step A31: the DSP module is connected to the storage unit, and step A32 is executed; Step A32: Determine whether the upgrade data compressed file exists in the storage unit. If not, execute the user function program and exit the task; if yes, execute step A33; Step A33: the DSP module copies the upgraded data compressed file and executes step A34; Step A34: The DSP module verifies whether the copied upgrade data compressed file is complete. If not, execute step A33; if complete, the system enters the upgrade task.

8. The IAP-based upgrade method according to claim 6, characterized in that: The upgraded data compressed file includes upgraded data compressed files required for upgrading multiple modules to be upgraded, and the modules to be upgraded include one or more of the DSP module, the lower main control board unit, the upper main control board unit, the magnetic module, the thickness measurement module and the liquid crystal display unit; The module to be upgraded performs upgrade verification on the corresponding upgraded data compressed file received before executing the corresponding upgrade program, specifically including: Step B1: The module to be upgraded reads the data information of the file header of the corresponding upgraded data compressed file, and performs data verification according to the relevant protocol. If the data is incorrect, feedback is given of upgrade failure, and the DSP module resends the corresponding upgraded data compressed file or abandons the upgrade; if the data is correct, step B2 is executed; Step B2: the module to be upgraded reads the first frame data information of the corresponding upgraded data compressed file, and performs data verification according to the relevant protocol. If the data is incorrect, feedback is given of upgrade failure, and the DSP module resends the corresponding upgraded data compressed file or abandons the upgrade; if the data is correct, step B3 is executed; Step B3: the module to be upgraded reads the second frame data information of the corresponding upgraded data compressed file, and performs data verification according to the relevant protocol, and repeats the cycle until the module to be upgraded receives the corresponding upgraded data compressed file and feeds back upgraded success information.

Citation Information

Patent Citations

  • Detector, detecting system and detecting method

    CN104751558A

  • Method for performing program updating on embedded system comprising ARM chip, DSP chip and FPGA chip

    CN106843918A

  • Cash circulator control system and control method thereof

    CN108428284A

  • Upgrading system based on IAP

    CN209514597U