CN211427090U - Micro control unit device - Google Patents

Micro control unit device Download PDF

Info

Publication number
CN211427090U
CN211427090U CN201921399017.3U CN201921399017U CN211427090U CN 211427090 U CN211427090 U CN 211427090U CN 201921399017 U CN201921399017 U CN 201921399017U CN 211427090 U CN211427090 U CN 211427090U
Authority
CN
China
Prior art keywords
interface
control unit
module
protocol
micro control
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.)
Active
Application number
CN201921399017.3U
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.)
Zhuhai Geehy Semiconductor Co Ltd
Original Assignee
Zhuhai Geehy Semiconductor Co Ltd
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 Zhuhai Geehy Semiconductor Co Ltd filed Critical Zhuhai Geehy Semiconductor Co Ltd
Priority to CN201921399017.3U priority Critical patent/CN211427090U/en
Application granted granted Critical
Publication of CN211427090U publication Critical patent/CN211427090U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The utility model discloses a little the control unit equipment. The micro control unit device includes: the device comprises a control module, an external interface module and a storage module; the control module is connected with the storage module and the external interface module; the external interface module is used for communicating with the computer equipment and sending and receiving data, wherein the external interface module comprises an interface unit and a target protocol processing unit, the interface unit is used for being connected with the computer equipment, and the protocol processing unit is used for carrying out data processing based on a target protocol on the data transmitted between the computer equipment and the micro control unit equipment which are connected through the external interface module; the storage module comprises a user storage unit and a system storage unit. By adopting the structure, the configuration program of the external interface and the firmware upgrading program acquired from the computer equipment can be separated, so that the condition that the firmware program upgrading fails is effectively prevented, and the normal progress of the firmware upgrading is realized.

Description

Micro control unit device
[ technical field ] A method for producing a semiconductor device
The utility model belongs to little the control unit equipment field especially relates to a little the control unit equipment.
[ background of the invention ]
The existing mode for upgrading the firmware of a Micro Control Unit (MCU) device divides a main storage area of the MCU device into a Bootloader (Bootloader) area and an application program (APP) area, wherein the Bootloader area is used for storing a code of the Bootloader, and the Bootloader code has the following main functions: after the micro control unit equipment is powered on, firstly, operating a Bootloader program, detecting whether computer equipment is connected with the micro control unit equipment or not, if so, judging whether a firmware upgrading program file for updating the micro control unit equipment is contained in the computer equipment connected with the micro control unit equipment or not by the micro control unit equipment, and if so, updating and jumping to an APP area; if not, directly jumping to the APP area to execute the main program code.
The micro-control unit device stores the Bootloader codes in the main storage area, the firmware upgrading of the micro-control unit device is realized by operating the Bootloader codes, when a user upgrades the firmware program of the micro-control unit through computer equipment, the main storage area is read, written and erased, the misoperation is easy, the Bootloader codes are damaged and even erased, the Bootloader codes cannot be executed, and the firmware program upgrading fails.
[ Utility model ] content
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The embodiment of the utility model provides a little the control unit equipment for solve at present and read and write and erase the main memory area to little the control unit equipment, easy maloperation destroys and erases Bootloader program code even, leads to the firmware procedure problem that the upgrading fails to appear.
To the above problem, the utility model provides a little the control unit equipment, include: the device comprises a control module, an external interface module and a storage module;
the control module is connected with the storage module and the external interface module, and is used for controlling the functions of the storage module and the external interface module;
the external interface module is used for communicating with a computer device and sending and receiving data, wherein the external interface module comprises an interface unit and a target protocol processing unit, the interface unit is used for being connected with the computer device, and the protocol processing unit is used for carrying out data processing based on a target protocol on the data transmitted between the computer device and the micro control unit device which are connected through the external interface module, wherein the target protocol comprises at least one of an HID protocol, an SPI protocol and an I2C protocol;
the storage module comprises a user storage unit and a system storage unit, wherein the user storage unit is used for storing a firmware upgrading program acquired from the computer equipment, and the system storage unit is used for storing an external interface configuration program, wherein the external interface configuration program is used for configuring and starting the external interface module, so that the external interface can communicate with the computer equipment through the target protocol.
Illustratively, the external interface module includes: at least one of a USB interface, a SPI interface, and an I2C interface.
Exemplarily, when the external interface module includes the USB interface, the interface unit includes a USB interface subunit, the target protocol processing unit includes an HID protocol processing subunit, and the external interface configuration program includes an HID interface configuration program;
the USB interface subunit is used for being connected with the computer device, the HID protocol processing subunit is used for carrying out HID protocol-based data processing on data transmitted between the computer device and the micro control unit device which are connected through the USB interface, and the HID configuration program is used for configuring and starting the USB interface, so that the micro control unit device can communicate with the computer device through the HID protocol.
Exemplarily, when the external interface module includes the USB interface, the external interface module further includes a UART interface, and the target protocol further includes a UART protocol;
the UART interface is connected with the control module and is used for connecting the micro control unit and the computer equipment, the external interface configuration program also comprises a UART interface configuration program, and the UART interface configuration program is used for configuring and starting the UART interface so that the micro control unit equipment can communicate with the computer equipment through the UART protocol;
when the external interface module is the USB interface, the computer equipment sends a firmware upgrading request to the micro control unit equipment through the USB interface according to the HID protocol; when the external interface module is the UART interface, the computer equipment sends a firmware upgrading request to the micro control unit equipment through the UART interface according to the UART protocol; after the computer equipment receives the response of the micro control unit equipment, the computer equipment sends the firmware upgrading program to the micro control unit equipment through the USB interface and/or the UART interface.
Exemplarily, when the external interface module includes the SPI interface, the interface unit includes an SPI interface subunit, the target protocol processing unit includes an SPI protocol processing subunit, and the external interface configuration program includes an SPI interface configuration program;
the SPI interface is connected with the control module;
the SPI interface subunit is used for connecting with the computer equipment, and the SPI protocol processing subunit is used for carrying out data processing based on an SPI protocol on data transmitted between the computer equipment and the micro control unit equipment which are connected through the SPI interface;
and the SPI interface configuration program is used for configuring and starting the SPI interface, when the micro control unit equipment is powered on, the micro control unit equipment is started from the system storage unit, runs the SPI interface configuration program in the system storage unit, configures and starts the SPI interface, and configures the SPI interface into the SPI interface type, so that the micro control unit equipment can communicate with the computer equipment through the SPI protocol.
Illustratively, when the external interface module includes the I2C interface, the interface unit includes an I2C interface subunit, the target protocol processing unit includes an I2C protocol processing subunit, and the external interface configurator includes an I2C interface configurator;
the I2C interface subunit is used for connecting with the computer equipment, the I2C protocol processing subunit is used for carrying out data processing based on an I2C protocol on data transmitted between the computer equipment and the micro control unit equipment which are connected through the I2C interface;
the I2C interface configuration program is used for configuring and starting the I2C interface, when the mcu device is powered on, the mcu device will start from the system memory unit, run the I2C interface configuration program in the system memory unit, configure and start the I2C interface, configure the I2C interface as the I2C interface type, so that the mcu device can communicate with the computer device via the I2C protocol.
Illustratively, the micro control unit device further comprises: and the starting mode selection module is used for selecting and determining a starting area after the micro control unit equipment is reset.
Illustratively, the micro control unit device further comprises: the starting mode selection device comprises a starting mode selection key and/or a jumper and/or a touch display screen, wherein when the starting mode is selected, any one of the key, the jumper and the touch display screen is used for selecting the starting mode.
The utility model provides a micro control unit device, which adopts the structure of a control module, an external interface module and a storage module, wherein, the control module is connected with the storage module, and the control module is connected with the external interface module, and the control module is used for controlling the functions of the storage module and the external interface module; the external interface module is used for communicating with computer equipment and sending and receiving data, wherein the external interface module comprises an interface unit and a target protocol processing unit, the interface unit is used for being connected with the computer equipment, and the protocol processing unit is used for carrying out data processing based on a target protocol on data transmitted between the computer equipment and the micro control unit equipment which are connected through the external interface module, wherein the target protocol comprises at least one of an HID protocol, an SPI protocol and an I2C protocol; the storage module comprises a user storage unit and a system storage unit, wherein the user storage unit is used for storing a firmware upgrading program acquired from the computer equipment, and the system storage unit is used for storing an external interface configuration program, wherein the external interface configuration program is used for configuring and starting the external interface module, so that the external interface can communicate with the computer equipment through a target protocol. By adopting the structure, the configuration program of the external interface and the firmware upgrading program acquired from the computer equipment can be separated, so that the condition that the firmware program upgrading fails is effectively prevented, and the normal progress of the firmware upgrading is realized. In addition, when the structure adopts the HID protocol to realize data transmission between the computer equipment and the micro control unit equipment, the computer equipment can realize the upgrading of the firmware program of the micro control unit equipment without the help of an adapter or a driver program which is installed in advance.
[ description of the drawings ]
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, together with the description of embodiments of the invention, serve to explain the invention and not to limit the invention.
In the drawings:
fig. 1 is a schematic structural diagram of a micro control unit device 1 provided by the present invention;
fig. 2 is a schematic structural diagram of a USB interface provided by the present invention;
fig. 3 is a schematic structural diagram of another micro control unit device 2 provided by the present invention;
fig. 4 is a flowchart of another method for upgrading firmware of the mcu device 2 according to the present invention.
[ detailed description ] embodiments
So that the manner in which the features and elements of the disclosed embodiments can be understood in detail, a more particular description of the disclosed embodiments, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other cases, well-known structures and devices may be shown for simplicity in illustrating the technical problems mentioned above.
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
As shown in fig. 1, the mcu device 1 includes a control module, a USB interface, and a memory module.
And the control module is respectively connected with the storage module and the USB interface and controls the functions of the USB interface and the storage module of the micro control unit equipment 1.
The USB interface, as shown in fig. 2, includes a USB interface subunit and an HID protocol processing subunit. The HID protocol sub-processing unit is adapted to communicate with a computer device having the following operating system: windows10, Windows8, Windows7, Windows XP, Linux, etc. The Windows version is internally provided with drivers of the HID device, the computer device can directly run the drivers to directly communicate with the micro control unit device 1 with the HID protocol processing subunit, and the driver does not need to be downloaded, so that the operation is convenient, and the firmware program of the micro control unit device 1 can be upgraded.
And the storage module comprises a user storage unit and a system storage unit. The user storage unit is used for storing a firmware upgrading program acquired from the computer equipment; the system storage unit is used for storing an HID interface configuration program, the HID interface configuration program can configure and start the USB interface, and the USB interface is configured into an HID type communication interface, so that the micro control unit device 1 can communicate with the computer device through the USB interface subunit according to an HID protocol. The data of the user storage unit can be read, written and erased by a user, while the data of the system storage unit is read, written and erased by a micro-control unit device manufacturer by using a special tool in the production process of the micro-control unit device, and the user cannot access the data of the system storage unit.
It can be understood that, in this embodiment, the HID interface configuration program is separately stored in the independent system storage unit, and the operation such as reading, writing, and erasing performed after the mcu device obtains the firmware upgrade program from the computer device does not damage the HID interface configuration program (whose function includes the function realized by the Bootloader program), thereby ensuring that the firmware program can be successfully upgraded. In addition, the computer equipment can directly communicate with the micro control unit equipment 1 through the HID protocol without downloading any driving program, the operation is convenient, and the upgrading of the firmware program of the micro control unit equipment 1 can be realized.
The method for upgrading the firmware of the micro control unit device 1 comprises the following steps:
301: the micro control unit device 1 is physically connected with the computer device, the micro control unit device 1 is powered on, and the computer device is powered on.
302: the mcu device 1 starts up from the system memory unit, then executes the HID interface configuration program, configures the USB interface, and configures the USB interface as the HID type communication interface, so that the mcu device 1 can communicate with the computer device according to the HID protocol.
In an embodiment, the mcu device 1 further comprises a start mode selection module for selecting a start area after the mcu device 1 is reset.
In one embodiment, there are three start-up modes for mcu device 1, and the value of the BOOT pin will be latched on the 4 th rising edge of the system clock after system reset. The user may select the start-up mode after reset by setting the state of the BOOT1 and BOOT0 pins.
In an embodiment, the three start modes of the mcu device 1 are specifically: when the BOOT mode pins BOOT0 and BOOT1 are set to 0X, the user memory cell is selected as the BOOT sector; when the BOOT mode pins BOOT0 and BOOT1 are set to 10, the system memory cells are selected as the BOOT area; when the BOOT mode pins BOOT0 and BOOT1 are set to 11, a Static Random-Access Memory (SRAM) built in the mcu device 1 is selected as a BOOT area.
In one embodiment, BOOT1 and BOOT0 are selected to be 10, such that MCU device 1 BOOTs up from the system's memory unit after reset.
In one embodiment, the micro control unit device further comprises an activation mode selection button, and/or a jumper, and/or a touch screen display.
Alternatively, the user may make a selection by means of a start mode selection key provided on the micro control unit device 1.
Alternatively, the user may make a selection by means of setting a jumper on the micro control unit device 1.
Alternatively, the user may also make a selection by providing a touch screen display on the micro control unit device 1.
Further, after the micro control unit device 1 is powered on, a user selects a start mode on the micro control unit device 1, the control module identifies a start mode selection signal, and controls the micro control unit device 1 to run a program corresponding to the storage unit according to a start mode selection result to start the micro control unit device 1.
It can be understood that, the HID interface configuration program is stored in the system memory unit, after the mcu device is powered on, the control module of the mcu device 1 starts up according to the start mode, and if the start mode selection pin signal is 10, the control module controls the start of the system memory unit of the memory module, executes the HID interface configuration program stored in the system memory unit, configures the USB interface, and configures the USB interface as the HID type communication interface, so that the mcu device 1 can communicate with the computer device by means of the HID protocol.
303: the computer device performs a handshake interaction with the micro control unit device 1.
When the mcu device 1 is physically connected to the computer device through the USB interface and is started in the system memory unit, the HID interface configuration program is executed, and the HID interface configuration is performed on the USB interface, the computer device may identify the USB interface of the mcu device 1, enumerate the USB interface as the HID interface device type, and send the firmware upgrade request to the mcu device 1 through the USB interface according to the HID protocol. The mcu device 1 responds to a firmware upgrade request from the computer device.
304: the computer device transmits the firmware upgrade program file to the micro control unit device 1 through the USB interface.
After receiving the response from the mcu device 1, the computer device sends the firmware upgrade program file to the mcu device 1 through the USB interface, and the control module of the mcu device 1 monitors the USB interface and receives the firmware upgrade program file.
305: the control module of the micro control unit device 1 writes the firmware upgrading program into the user storage unit to realize firmware program upgrading.
In one embodiment, the mcu device 1 writes the received firmware upgrade program in a file form to the user memory unit.
It can be understood that, in steps S301-S305, the mcu device 1 only erases the original firmware upgrade program file of the user storage unit during the firmware upgrade process, and does not change the HID interface configuration program stored in the system storage unit, thereby ensuring that the firmware program can be upgraded successfully and safely during the update process of the mcu device. Furthermore, the mcu device 1 realizes data transfer between the computer device and the mcu device 1 by using the HID protocol. The computer device can realize the upgrade of the firmware program of the micro control unit device 1 without the help of an adapter or the installation of a driving program in advance.
In another embodiment of the present invention, as shown in fig. 3, the mcu device 2 includes a control module, a storage module, a USB interface, and a UART interface.
And the control module is respectively connected with the storage module, the USB interface and the UART interface and is used for controlling the functions of the storage module, the USB interface and the UART interface.
The USB interface, as shown in fig. 2, includes a USB interface subunit and an HID protocol processing subunit. The HID protocol processing subunit is adapted to communicate with a computer device having at least one of the following operating systems: windows10, Windows8, Windows7, Windows XP, Linux, etc. The Windows version contains drivers for the HID device, and the computer device can directly communicate with the mcu 2 having the HID protocol processing subunit by using the drivers. By communicating with the micro control unit device 2 with the HID protocol processing subunit, the computer device does not need to download any driving program, and the operation is convenient.
And the UART interface is used for the micro control unit device 2 to communicate with computer equipment, and the computer equipment needs to be provided with a UART driver.
The storage module comprises a main storage unit and a system storage unit. The main storage unit is used for acquiring a firmware upgrading program from a computer; and the system storage unit is used for storing an HID interface configuration program and a UART interface configuration program, respectively configuring and starting the USB interface and the UART interface, and respectively enabling the micro control unit device 2 to communicate with the computer device through the USB interface and/or the UART interface.
It is understood that the mcu device 2 may include both a USB interface and a UART interface, and the mcu device 2 may communicate with a computer device via an HID protocol and/or a UART protocol, wherein when the HID protocol is used for communication, the computer device does not need to follow a driver in advance, and thus the firmware program of the mcu device 2 can be upgraded.
Fig. 4 is a flowchart of a method for upgrading firmware of the mcu device 2, where the operating subject is the mcu device 2.
501: the micro control unit device 2 is physically connected with the computer device, the micro control unit device 2 is powered on, and the computer device is powered on.
502: the mcu device 2 starts up from the system memory unit, then executes the HID interface configuration program and the UART interface configuration program to configure the USB interface and the UART interface, so that the mcu device 2 can communicate with the computer device through the HID interface or the UART interface.
In one embodiment, there are three start-up modes for mcu device 2, and the value of the BOOT pin will be latched on the 4 th rising edge of the system clock after system reset. The user may select the start-up mode after reset by setting the state of the BOOT1 and BOOT0 pins.
In an embodiment, the three start modes of the mcu device 2 are specifically: when the BOOT mode pins BOOT0 and BOOT1 are set to 0X, the user memory cell is selected as the BOOT sector; when the BOOT mode pins BOOT0 and BOOT1 are set to 10, the system memory cells are selected as the BOOT area; when the BOOT mode pins BOOT0 and BOOT1 are set to 11, a Static Random-Access Memory (SRAM) built in the mcu device 2 is selected as a BOOT area.
In one embodiment, the micro control unit device 2 further comprises an activation mode selection button, and/or a jumper, and/or a touch screen display.
Alternatively, the user may make a selection by means of a start mode selection key provided on the micro control unit device 2.
Alternatively, the user may make a selection by setting a jumper on the micro control unit device 2.
Alternatively, the user may also make a selection by providing a touch screen display on the micro control unit device 2.
Further, after the micro control unit device 2 is powered on, the control module identifies the start mode selection signal, and controls the micro control unit device 2 to run the program of the corresponding storage unit according to the start mode selection result to start.
In one embodiment, BOOT1 and BOOT0 are selected to be 10, such that MCU device 2 BOOTs up from the system's memory unit after reset.
The HID and UART interface configuration programs are stored in the system storage unit, when the micro control unit device 2 is powered on, the control module of the micro control unit device 2 reads a signal of the start mode selection pin, if the signal of the start mode selection pin is 10, the control module controls the system storage unit of the slave storage module to start, executes the HID and UART interface configuration programs stored in the system storage unit, and configures the USB interface and the UART interface.
503: the computer device performs a handshake interaction with the micro control unit device 2.
After the micro control unit device 2 is physically connected with the computer device and started in the system storage unit, executing the HID interface configuration program and the UART interface configuration program, configuring the USB interface and the UART interface, identifying the interface of the micro control unit device 2 physically connected with the computer device according to the device identifier by the computer device, and if the USB interface is identified to be connected, sending a firmware upgrading request to the micro control unit device 2 through the USB interface according to the HID protocol; if the UART interface connection is recognized, a firmware upgrade request is transmitted to the micro control unit device 2 through the UART interface. The mcu device 2 responds to a firmware upgrade request from the computer device.
504: the computer device transmits the firmware upgrade program file to the micro control unit device 2 through the USB interface and/or the UART interface.
After receiving the response from the micro control unit device 2, the computer device sends the firmware upgrade program file to the micro control unit device 2 through the USB interface and/or the UART interface, and the control module of the micro control unit device 2 monitors the USB interface and the UART interface and receives the firmware upgrade program file.
505: the control module of the micro control unit device 2 writes the firmware upgrading program into the user memory unit area to realize firmware program upgrading.
In one embodiment the mcu device 2 writes the firmware upgrade program in a file to the user memory location.
It can be understood that, in steps S501-S505, the mcu device 1 only erases the original firmware upgrade program files in the user memory unit during the firmware upgrade process, and does not change the HID interface configuration program and the UART interface configuration program stored in the system memory unit, thereby ensuring that the firmware program can be successfully upgraded during the update process of the mcu device. Furthermore, the mcu device 2 enables data transfer between the computer device and the mcu device 2 by using the HID protocol and/or the UART protocol. When the computer includes the HID interface configuration program, the USB interface may be configured to the HID interface type, and when the UART interface cannot communicate with the computer device, the mcu device 2 may upgrade the firmware program of the mcu device 2 without using a USB to UART adapter or installing a UART driver.
Optionally, the computer device may further communicate with the mcu device through an SPI (serial Peripheral interface), and specifically, a 4-wire SPI bus mode may be adopted. When the computer device communicates with the micro control unit device through the SPI interface, the micro control unit device includes the SPI interface. The SPI interface comprises an SPI interface subunit and an SPI protocol processing subunit, and an SPI interface configuration program is stored in a system storage unit of the micro control unit device.
Furthermore, after the micro control unit device is powered on, the slave system storage unit is started, an SPI interface configuration program in the system storage unit is operated, the SPI interface is configured and started, and the SPI interface is configured into an SPI interface type, so that the micro control unit device can communicate with the computer device through an SPI protocol. It can be understood that, in the process of implementing firmware upgrade, the mcu device only erases the original firmware upgrade program file of the user memory unit, and does not change the SPI interface configuration program stored in the system memory unit, thereby ensuring that the firmware program can be successfully upgraded in the update process of the mcu device.
Optionally, the computer device may also communicate with the mcu device through an I2C (Inter-Integrated Circuit) interface. When the computer device communicates with the mcu device via the I2C interface, the mcu device includes an I2C interface. The I2C interface comprises an I2C interface subunit and an I2C protocol processing subunit, and a system storage unit of the program micro control unit device stores an I2C interface configuration program.
Further, after the mcu device is powered on, the mcu device is started up from the system memory unit, runs the I2C interface configuration program in the system memory unit, configures and starts the I2C interface, and configures the I2C interface into the I2C interface type, so that the mcu device can communicate with the computer device via the I2C protocol. It can be understood that the mcu device only erases the original firmware upgrade program file of the user storage unit during the firmware upgrade process, and does not modify the I2C interface configuration program stored in the system storage unit, thereby ensuring that the firmware program can be successfully upgraded during the update process of the mcu device.
The utility model provides a micro control unit device, which adopts the structure of a control module, an external interface module and a storage module, wherein, the control module is connected with the storage module, and the control module is connected with the external interface module, and the control module is used for controlling the functions of the storage module and the external interface module; the external interface module is used for communicating with computer equipment and sending and receiving data, wherein the external interface module comprises an interface unit and a target protocol processing unit, the interface unit is used for being connected with the computer equipment, and the protocol processing unit is used for carrying out data processing based on a target protocol on data transmitted between the computer equipment and the micro control unit equipment which are connected through the external interface module, wherein the target protocol comprises at least one of an HID protocol, an SPI protocol and an I2C protocol; the storage module comprises a user storage unit and a system storage unit, wherein the user storage unit is used for storing a firmware upgrading program acquired from the computer equipment, and the system storage unit is used for storing an external interface configuration program, wherein the external interface configuration program is used for configuring and starting the external interface module, so that the external interface can communicate with the computer equipment through a target protocol. By adopting the structure, the configuration program of the external interface and the firmware upgrading program acquired from the computer equipment can be separated, so that the condition that the firmware program upgrading fails is effectively prevented, and the normal progress of the firmware upgrading is realized. In addition, when the structure adopts the HID protocol to realize data transmission between the computer equipment and the micro control unit equipment, the computer equipment can realize the upgrading of the firmware program of the micro control unit equipment without the help of an adapter or a driver program which is installed in advance.
Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The invention is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A microcontrol unit device, comprising: the device comprises a control module, an external interface module and a storage module;
the control module is connected with the storage module and the external interface module, and is used for controlling the functions of the storage module and the external interface module;
the external interface module is used for communicating with a computer device and sending and receiving data, wherein the external interface module comprises an interface unit and a target protocol processing unit, the interface unit is used for being connected with the computer device, and the protocol processing unit is used for carrying out data processing based on a target protocol on the data transmitted between the computer device and the micro control unit device which are connected through the external interface module, wherein the target protocol comprises at least one of an HID protocol, an SPI protocol and an I2C protocol;
the storage module comprises a user storage unit and a system storage unit, wherein the user storage unit is used for storing a firmware upgrading program acquired from the computer equipment, and the system storage unit is used for storing an external interface configuration program, wherein the external interface configuration program is used for configuring and starting the external interface module, so that the external interface can communicate with the computer equipment through the target protocol.
2. The mcu device of claim 1, wherein the external interface module comprises: at least one of a USB interface, a SPI interface, and an I2C interface.
3. The mcu device of claim 2, wherein when the external interface module comprises the USB interface, the interface unit comprises a USB interface subunit, the target protocol processing unit comprises an HID protocol processing subunit, and the external interface configuration program comprises an HID interface configuration program;
the USB interface subunit is used for being connected with the computer device, the HID protocol processing subunit is used for carrying out HID protocol-based data processing on data transmitted between the computer device and the micro control unit device which are connected through the USB interface, and the HID interface configuration program is used for configuring and starting the USB interface, so that the micro control unit device can communicate with the computer device through the HID protocol.
4. The mcu device of claim 2, wherein when the external interface module comprises the USB interface, the external interface module further comprises a UART interface, the target protocol further comprises a UART protocol;
the UART interface is connected with the control module and is used for connecting the micro control unit and the computer equipment, the external interface configuration program also comprises a UART interface configuration program, and the UART interface configuration program is used for configuring and starting the UART interface so that the micro control unit equipment can communicate with the computer equipment through the UART protocol;
when the external interface module is the USB interface, the computer equipment sends a firmware upgrading request to the micro control unit equipment through the USB interface according to the HID protocol; when the external interface module is the UART interface, the computer equipment sends a firmware upgrading request to the micro control unit equipment through the UART interface according to the UART protocol; after the computer equipment receives the response of the micro control unit equipment, the computer equipment sends the firmware upgrading program to the micro control unit equipment through the USB interface and/or the UART interface.
5. The mcu device of claim 2, wherein when the external interface module comprises the SPI interface, the interface unit comprises an SPI interface subunit, the target protocol processing unit comprises an SPI protocol processing subunit, and the external interface configuration program comprises an SPI interface configuration program;
the SPI interface is connected with the control module;
the SPI interface subunit is used for connecting with the computer equipment, and the SPI protocol processing subunit is used for carrying out data processing based on an SPI protocol on data transmitted between the computer equipment and the micro control unit equipment which are connected through the SPI interface;
and the SPI interface configuration program is used for configuring and starting the SPI interface, when the micro control unit equipment is powered on, the micro control unit equipment is started from the system storage unit, runs the SPI interface configuration program in the system storage unit, configures and starts the SPI interface, and configures the SPI interface into the SPI interface type, so that the micro control unit equipment can communicate with the computer equipment through the SPI protocol.
6. The mcu device of claim 2, wherein when said external interface module comprises said I2C interface, said interface unit comprises an I2C interface subunit, said target protocol processing unit comprises an I2C protocol processing subunit, said external interface configuration program comprises an I2C interface configuration program;
the I2C interface subunit is used for connecting with the computer equipment, the I2C protocol processing subunit is used for carrying out data processing based on an I2C protocol on data transmitted between the computer equipment and the micro control unit equipment which are connected through the I2C interface;
the I2C interface configuration program is used for configuring and starting the I2C interface, when the mcu device is powered on, the mcu device will start from the system memory unit, run the I2C interface configuration program in the system memory unit, configure and start the I2C interface, configure the I2C interface as the I2C interface type, so that the mcu device can communicate with the computer device via the I2C protocol.
7. The mcu device of claim 1, further comprising: and the starting mode selection module is used for selecting and determining a starting area after the micro control unit equipment is reset.
8. The mcu device of claim 7, further comprising: the starting mode selection device comprises a starting mode selection key and/or a jumper and/or a touch display screen, wherein when the starting mode is selected, any one of the key, the jumper and the touch display screen is used for selecting the starting mode.
CN201921399017.3U 2019-08-26 2019-08-26 Micro control unit device Active CN211427090U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201921399017.3U CN211427090U (en) 2019-08-26 2019-08-26 Micro control unit device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201921399017.3U CN211427090U (en) 2019-08-26 2019-08-26 Micro control unit device

Publications (1)

Publication Number Publication Date
CN211427090U true CN211427090U (en) 2020-09-04

Family

ID=72246390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201921399017.3U Active CN211427090U (en) 2019-08-26 2019-08-26 Micro control unit device

Country Status (1)

Country Link
CN (1) CN211427090U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722120A (en) * 2021-07-30 2021-11-30 龙芯中科(太原)技术有限公司 Integrated circuit and method for realizing program development

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722120A (en) * 2021-07-30 2021-11-30 龙芯中科(太原)技术有限公司 Integrated circuit and method for realizing program development
CN113722120B (en) * 2021-07-30 2024-04-05 龙芯中科(太原)技术有限公司 Integrated circuit and method for realizing program development thereof

Similar Documents

Publication Publication Date Title
US6892216B2 (en) Common platform for use in automotive services
JP5065297B2 (en) Method of booting host device from MMC / SD device, host device bootable from MMC / SD device, and MMC / SD device capable of booting host device
CN101329632B (en) Method and apparatus for starting CPU by BOOT
CN108008914B (en) The method, apparatus and ARM equipment of disk management in a kind of ARM equipment
US20090006831A1 (en) Methods and apparatuses for configuring add-on hardware to a computing platform
CN101689116A (en) System and method for updating device drivers
CN108128035B (en) A kind of control method and consumable chip upgrading consumable chip
JP2007514217A (en) Data exchange method between data processing apparatus and computer
JP4527348B2 (en) Interface device, method of updating firmware in interface device, and program thereof
WO2021136200A1 (en) Bootloader loading method, storage medium, and embedded terminal
WO2012071852A1 (en) Method and apparatus for upgrading bootstrap program
CN112947978A (en) Method for upgrading firmware based on chip usbhid, terminal device and computer readable storage medium
KR101075676B1 (en) Software download apparatus and method for mobile terminal equipment
CN115718610A (en) Reliable method for updating application program of single chip microcomputer
CN115113905A (en) Firmware upgrading method and firmware upgrading device
CN211427090U (en) Micro control unit device
WO2015196479A1 (en) Program data updating method and device
CN114816491A (en) System upgrading method and device for multi-system mobile terminal and terminal
CN113360161B (en) Resource upgrading method and related products
CN110908733B (en) Working mode determining method and device, and control method and device
US6795915B2 (en) Computer system and method for setting up information on an operating system thereof
CN101944072A (en) Method and equipment for configuring starting mode of terminal equipment
CN110377303A (en) Method and its equipment based on spare memory area mode upgrade procedure
CN210466365U (en) Micro control unit device
CN111610995B (en) Device firmware upgrading method and device, electronic device and storage medium

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant