CN113553289A - MCU pin function configuration method based on SOC chip and SOC chip - Google Patents
MCU pin function configuration method based on SOC chip and SOC chip Download PDFInfo
- Publication number
- CN113553289A CN113553289A CN202111103159.2A CN202111103159A CN113553289A CN 113553289 A CN113553289 A CN 113553289A CN 202111103159 A CN202111103159 A CN 202111103159A CN 113553289 A CN113553289 A CN 113553289A
- Authority
- CN
- China
- Prior art keywords
- mcu
- soc chip
- configuration
- configuration information
- chip
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/16—Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
- G06F15/177—Initialisation or configuration control
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/78—Architectures of general purpose stored program computers comprising a single central processing unit
- G06F15/7807—System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Software Systems (AREA)
- Stored Programmes (AREA)
Abstract
The invention relates to the technical field of chip design, which comprises the following steps: starting the SOC chip and driving the MCU to be powered on; unifying communication interfaces and communication protocols of the SOC chip and the MCU; the SOC chip loads customized configuration information and sends the customized configuration information to the MCU; the MCU completes the initial configuration. By agreeing with the communication interface and the communication protocol between the SOC chip and the MCU, customized configuration information is loaded from the SOC chip and then sent to the MCU, so that the MCU completes initialization configuration, different configuration information can be dynamically loaded from the SOC chip in the use process, the MCU reads different setting states, the configuration of the MCU pin function can be realized only by modifying partial functions of the SOC in the whole process, the configuration process of the MCU pin function is more convenient and faster, and the research and development cost and the maintenance cost are greatly saved.
Description
Technical Field
The invention relates to the technical field of chip design, in particular to an MCU pin function configuration method based on an SOC chip and the SOC chip.
Background
In the System circuit design of an all-in-one machine, the insufficient number of pins of GPIO, UART, USB, and the like of an SOC (System on Chip, also called System on Chip) is often made up by adding an MCU (micro controller Unit, also called a single Chip microcomputer or a single Chip microcomputer). In use, because the peripheral equipment accessed by the system is not fixed, the control modes are different, and the software of the SOC and the MCU needs to be adjusted simultaneously to adapt to the peripheral equipment. Meanwhile, in different board card circuit designs, different pin combinations are often needed, in the prior art, when the MCU pin function is configured each time, the matching can be realized only by respectively adjusting the SOC software and the MCU software, the workload is large, and the MCU software of a plurality of versions needs to be maintained, so that the work is easy to make mistakes.
Disclosure of Invention
In view of the prior art, the problem of insufficient pin numbers of GPIO, UART, USB, and the like of the SOC chip is usually solved by adding the MCU, and in the use process, different pin combinations are often used in the circuit design of different boards, and the MCU pin configuration each time needs to be adjusted for the software of the SOC chip and the MCU to realize matching, which results in a huge workload and a large maintenance cost.
In view of the above technical problems, the technical solution of the present invention provides the following contents:
the MCU pin function configuration method based on the SOC chip comprises the following steps:
starting the SOC chip and driving the MCU to be powered on;
unifying communication interfaces and communication protocols of the SOC chip and the MCU;
the SOC chip loads customized configuration information and sends the customized configuration information to the MCU;
the MCU completes the initial configuration.
Further, after the MCU completes the initial configuration, the method further includes the following steps:
the MCU dynamically reads configuration state information sent by the SOC chip;
the MCU main program executes corresponding setting.
Further, the MCU main program executing the corresponding setting specifically includes:
and setting the pin function configuration of the MCU.
Further, the functional configuration includes: inquiring version number, setting and/or inquiring IO level, serial port conversion and MCU firmware upgrade.
Further, the functional configuration further includes: the USB descriptor is dynamically configured.
Further, the format of the communication protocol is as follows:
function + length of parameter + 1 + 2 + 3 +. + n.
Further, the SOC chip loads customized configuration information, and after the customized configuration information is sent to the MCU, the MCU stores the customized configuration information to the local.
The SOC chip comprises a CPU and an MCU, wherein the CPU sends the content of the communication protocol to the MCU through a communication interface.
Furthermore, the CPU and the MCU are integrated into a communication interface.
The invention discloses an MCU pin function configuration method based on an SOC chip and the SOC chip, which loads customized configuration information from the SOC chip by agreeing with a communication interface and a communication protocol of the SOC chip and the MCU, and then sends the customized configuration information to the MCU, so that the MCU completes initialization configuration.
Drawings
Fig. 1 is a flowchart of the steps of the MCU pin function configuration method based on the SOC chip in this embodiment;
fig. 2 is a flowchart of steps after step S4 in the present embodiment is completed;
FIG. 3 is a schematic block diagram illustrating the interaction between the SOC chip and the MCU in this embodiment;
fig. 4 is a functional block diagram of the MCU pin dynamic management in this embodiment.
Detailed Description
The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
Example one
The MCU pin function configuration method based on the SOC chip, as shown in FIG. 1, includes the following steps:
step S1, starting the SOC chip and driving the MCU to be powered on;
in the embodiment of the present application, the SOC (System on Chip, referred to as System on Chip, also referred to as System on Chip) is a product, and is an integrated circuit with a special purpose, which includes a complete System and has all contents of embedded software; an mcu (micro controller Unit), also called a Single Chip Microcomputer (CPU), or a Single Chip Microcomputer (mcu), is to properly reduce the frequency and specification of a CPU (Central processing Unit), and integrate peripheral interfaces such as memory, counter (Timer), USB, a/D conversion, UART, PLC, DMA, etc., and even an LCD driving circuit on a Single Chip to form a Chip-level computer, which is used for different combined control in different applications.
As shown in fig. 3, in the embodiment of the present application, in order to make up for the problem of insufficient pins of the SOC chip, in the embodiment of the present application, the MCU is disposed on the SOC chip, and the SOC chip is powered on to drive the MCU to be powered on, and then the MCU can also be powered on.
Step S2, unifying communication interfaces and communication protocols of the SOC chip and the MCU;
in order to enable the SOC chip and the MCU to be communicated, the communication interfaces of the SOC chip and the MCU must be unified, different usages can be applied to the interfaces of the mainboard in different machine types, and the communication interfaces on the SOC chip and the MCU are unified, so that the SOC chip can conveniently send different configuration information to the MCU.
Step S3, the SOC chip loads the customized configuration information and sends the customized configuration information to the MCU;
MCU pins to be used and related functions are defined in a program of the SOC chip, and a control command of a custom protocol is sent to the MCU through an I2C interface, so that the MCU executes the related functions, such as the functions of setting IO output level, opening ADC, opening a virtual serial port or reading ADC value.
Further, in a preferred embodiment of the present application, the functional configuration includes: inquiring version number, setting and/or inquiring IO level, serial port conversion and MCU firmware upgrade.
Further, in a preferred embodiment of the present application, the functional configuration further includes: the USB descriptor is dynamically configured.
And step S4, finishing the initial configuration by the MCU.
When the system is started for the first time, basic configuration can be set according to the functional requirements of the mainboard, and at the moment, the SOC chip sends related configuration information to the MCU for the first time to complete initialization configuration.
Further, as shown in fig. 2, in a preferred embodiment of the present application, after the MCU completes the initial configuration, the method further includes the following steps:
step S410, the MCU dynamically reads configuration state information sent by the SOC chip;
and step S420, executing corresponding setting by the MCU main program.
As shown in fig. 4, in the working process of the chip, the SOC chip may trigger different applications or different web pages according to a user, so as to dynamically send different configuration state information to the MCU, and the MCU main program receives the configuration state information sent by the SOC chip, so as to execute IO setting or read a related command.
Further, in a preferred embodiment of the present application, the executing of the corresponding setting by the main program of the MCU specifically includes:
and setting the pin function configuration of the MCU.
The IO control module configures the connection state of the signal interaction end of the chip pin processing module connected to the IO control module and the signal interaction end of the functional module connected to the IO control module according to the configuration information of the configuration register, that is, the IO control module determines which functional module the chip pin processing module is to be electrically connected with according to the configuration information of the configuration register.
In summary, by configuring the working mode of the chip pin processing module of the MCU chip and the connection state of the chip pin processing module and the functional module inside the MCU, a functional pin can input or output a signal, where the input or output signal can be an analog signal or a digital signal, and the same functional pin can be accessed to different functional modules inside the MCU chip.
Further, in a preferred embodiment of the present application, the format of the communication protocol is:
function + length of parameter + 1 + 2 + 3 +. + n.
Further, in a preferred embodiment of the present application, the SOC chip loads customized configuration information, and after sending the customized configuration information to the MCU, the MCU stores the customized configuration information locally.
After the SOC is started for the second time, if the customized configuration information does not change, the last configuration history record can be used, the MCU does not need to be repeatedly sent and sent configuration information, and the speed of the whole process can be increased.
The SOC chip comprises a CPU and an MCU, wherein the CPU sends the content of the communication protocol to the MCU through a communication interface.
Further, in a preferred embodiment of the present application, the CPU and the MCU have a unified communication interface.
The communication interface (I2C/UART) of the SOC chip and the MCU and a set of fixed communication protocol are unified, so that the software for fixing the MCU can be realized, and the SOC chip is used for completing the function configuration of the MCU.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.
Claims (9)
1. The MCU pin function configuration method based on the SOC chip is characterized by comprising the following steps:
starting the SOC chip and driving the MCU to be powered on;
unifying communication interfaces and communication protocols of the SOC chip and the MCU;
the SOC chip loads customized configuration information and sends the customized configuration information to the MCU;
the MCU completes the initial configuration.
2. The method of claim 1, wherein the MCU further comprises the following steps after completing the initial configuration:
the MCU dynamically reads configuration state information sent by the SOC chip;
the MCU main program executes corresponding setting.
3. The SOC chip-based MCU pin function configuration method of claim 2, wherein the MCU main program executing corresponding settings specifically comprises:
and setting the pin function configuration of the MCU.
4. The method of claim 3, wherein the functional configuration comprises: inquiring version number, setting and/or inquiring IO level, serial port conversion and MCU firmware upgrade.
5. The method of claim 3, wherein the functional configuration further comprises: the USB descriptor is dynamically configured.
6. The method of claim 1, wherein the communication protocol is in the format of:
function + length of parameter + 1 + 2 + 3 +. + n.
7. The method of claim 1, wherein the SOC chip loads customized configuration information, and after sending the customized configuration information to the MCU, the MCU stores the customized configuration information locally.
8. An SOC chip, characterized in that, the method for configuring the pin function of MCU based on SOC chip as claimed in any of claims 1 to 7 is executed, comprising a CPU and an MCU, the CPU sends the content of the communication protocol to the MCU through a communication interface.
9. The SOC chip according to claim 8, wherein the CPU is unified with the MCU.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111103159.2A CN113553289A (en) | 2021-09-22 | 2021-09-22 | MCU pin function configuration method based on SOC chip and SOC chip |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111103159.2A CN113553289A (en) | 2021-09-22 | 2021-09-22 | MCU pin function configuration method based on SOC chip and SOC chip |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113553289A true CN113553289A (en) | 2021-10-26 |
Family
ID=78106398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111103159.2A Pending CN113553289A (en) | 2021-09-22 | 2021-09-22 | MCU pin function configuration method based on SOC chip and SOC chip |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113553289A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114296808A (en) * | 2021-12-23 | 2022-04-08 | 科东(广州)软件科技有限公司 | Pin configuration method and device, electronic equipment and storage medium |
CN115002070A (en) * | 2022-06-10 | 2022-09-02 | 北京东土科技股份有限公司 | Chip cluster, address allocation method, electronic device and storage medium |
CN116187227A (en) * | 2023-02-21 | 2023-05-30 | 广东高云半导体科技股份有限公司 | SoC generation method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102087606A (en) * | 2011-02-16 | 2011-06-08 | 电子科技大学 | FPGA configuration file update device |
CN102662645A (en) * | 2012-03-01 | 2012-09-12 | 福建星网锐捷网络有限公司 | System-on-a-chip and configuration method of hardware programmable devices of system-on-a-chip |
CN108595362A (en) * | 2018-04-20 | 2018-09-28 | 青岛海信电器股份有限公司 | A kind of electronic equipment and the method for operating electronic equipment |
CN209248529U (en) * | 2019-01-24 | 2019-08-13 | 京微齐力(北京)科技有限公司 | A kind of SoC system |
CN110674069A (en) * | 2019-09-26 | 2020-01-10 | 北京智芯微电子科技有限公司 | Digital pin conversion circuit and method of chip and chip |
-
2021
- 2021-09-22 CN CN202111103159.2A patent/CN113553289A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102087606A (en) * | 2011-02-16 | 2011-06-08 | 电子科技大学 | FPGA configuration file update device |
CN102662645A (en) * | 2012-03-01 | 2012-09-12 | 福建星网锐捷网络有限公司 | System-on-a-chip and configuration method of hardware programmable devices of system-on-a-chip |
CN108595362A (en) * | 2018-04-20 | 2018-09-28 | 青岛海信电器股份有限公司 | A kind of electronic equipment and the method for operating electronic equipment |
CN209248529U (en) * | 2019-01-24 | 2019-08-13 | 京微齐力(北京)科技有限公司 | A kind of SoC system |
CN110674069A (en) * | 2019-09-26 | 2020-01-10 | 北京智芯微电子科技有限公司 | Digital pin conversion circuit and method of chip and chip |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114296808A (en) * | 2021-12-23 | 2022-04-08 | 科东(广州)软件科技有限公司 | Pin configuration method and device, electronic equipment and storage medium |
CN115002070A (en) * | 2022-06-10 | 2022-09-02 | 北京东土科技股份有限公司 | Chip cluster, address allocation method, electronic device and storage medium |
CN116187227A (en) * | 2023-02-21 | 2023-05-30 | 广东高云半导体科技股份有限公司 | SoC generation method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113553289A (en) | MCU pin function configuration method based on SOC chip and SOC chip | |
US10990415B2 (en) | Disk management method and apparatus in ARM device and ARM device | |
CN106557340B (en) | Configuration method and device | |
CN101989244A (en) | Signal conversion device and method as well as communication equipment | |
US7822964B2 (en) | Booting apparatus for booting a computer and method therefor and computer with a booting apparatus | |
CN103412769A (en) | External card parameter configuration method, equipment and system | |
CN109471660B (en) | Docking station device, electronic device and MAC address copying method | |
US9880858B2 (en) | Systems and methods for reducing BIOS reboots | |
WO2022148072A1 (en) | Pcie switch working mode updating method and related assembly | |
CN103098039A (en) | High-speed peripheral-device interconnected-bus port configuration method and apparatus | |
US6996705B2 (en) | Method and system for configuring the language of the BIOS in a computer system | |
CN104115138B (en) | The configurable apolegamy plate interface of electricity | |
CN110795369B (en) | Method and terminal for realizing MDIO slave function based on GPIO pin | |
JPH117751A (en) | Drive integrated disk | |
CN114185720B (en) | Method, device, equipment and storage medium for dynamic hot backup of server | |
WO2023016379A1 (en) | Computer system, control method based on pcie device, and related device | |
CN107329863B (en) | General hardware platform of measuring instrument based on COMe | |
CN211375594U (en) | Interface extension mechanism based on SW421 treater | |
US7155547B2 (en) | Integrally embedded backplane data device and method | |
EP3182295A1 (en) | Communication system with serial ports for automatically identifying device types and communication protocols and method thereof | |
CN101685430A (en) | Computer mainboard, printed circuit board (PCB) card and portable electronic equipment | |
US11803493B2 (en) | Systems and methods for management controller co-processor host to variable subsystem proxy | |
WO2019117863A1 (en) | Configuration profile updates | |
CN115422110B (en) | Port configuration method of electronic equipment and PCIE Switch chip | |
CN110347624B (en) | Method, device and equipment for adjusting basic input and output system setting |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211026 |