Microcontroller system with GPIO

By using the main microcontroller unit in a microcontroller system to dynamically control the state of general-purpose input/output pins, the interference and high cost problems caused by multiple microcontroller units sharing pins are solved and faster control is achieved. Speed ​​and greater security and flexibility.

CN114222983BActive Publication Date: 2024-09-24NORDIC SEMICONDUCTOR
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202080058021.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-06-27
Filing Date
2020-06-19
Publication Date
2024-09-24
Estimated Expiration
2040-06-19

AI Technical Summary

Technical Problem

In existing microcontroller systems, multiple microcontroller units sharing general-purpose input/output pins are susceptible to interference and malicious code, asynchronous bridges have time synchronization issues, and dedicated general-purpose input/output pin systems are expensive and complex .

Method used

Design a microcontroller system in which the main microcontroller unit is responsible for transmitting the status selection signal of general input/output, dynamically changing the GPIO status to avoid conflicts between modules, and placing the GPIO under the control of the main microcontroller unit when the system starts , reducing the use of asynchronous bridges, thereby improving control speed and security.

Benefits of technology

It effectively avoids control conflicts between modules, reduces system startup time and complexity, improves security and functional flexibility, reduces exposure to shared GPIO, and enhances system reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114222983B_ABST
    Figure CN114222983B_ABST
Patent Text Reader

Abstract

A microcontroller system (100) comprises a main microcontroller unit (102), further modules (104, 106) and a general purpose input / output (108). In a first state, the general purpose input / output is controlled by the main microcontroller unit, and in a second state, the general purpose input / output is controlled by the further module. The main microcontroller unit is arranged to transmit a selection signal that changes the state of the general purpose input / output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to microcontroller systems, and in particular to microcontroller systems with general purpose input / output. Background Art

[0002] In a microcontroller system, multiple microcontroller units may be required. In previously known microcontroller systems, these multiple microcontroller units may share multiple general purpose input / output pins through components such as multiplexers, asynchronous bridges, and / or synchronous bridges incorporated into the system. In other previously known microcontroller systems, multiple microcontroller units may each have dedicated general purpose input / output pins (i.e., general purpose input / output pins are not shared between multiple microcontroller units).

[0003] Both systems known from the prior art have a number of disadvantages. A microcontroller system in which multiple microcontroller units share multiple general purpose input / output pins is susceptible to errors caused by interference between the multiple microcontroller units at the shared general purpose input / outputs or malicious code introduced into one of the units. In addition, to use a synchronous bridge, all components in the system must operate at the same frequency, which is undesirable and generally impossible when the individual microcontroller units are in different power domains. Asynchronous bridges also have inherent disadvantages associated with the required time synchronization. Microcontroller systems whose microcontroller units have dedicated general purpose input / output pins can be relatively expensive and complex due to the large number of general purpose inputs / outputs that need to be hard-coded into a single microcontroller system. Summary of the invention

[0004] Accordingly, Applicants have appreciated that it would be advantageous to adapt microcontroller systems to help alleviate the above-mentioned disadvantages associated with the prior art.

[0005] When viewed from a first aspect, the present invention provides a microcontroller system comprising:

[0006] Main microcontroller unit;

[0007] Additional modules; and

[0008] a general purpose input / output, wherein in a first state, the general purpose input / output is controlled by the main microcontroller unit and in a second state, the general purpose input / output is controlled by the further module;

[0009] Wherein said main microcontroller unit is arranged to transmit a selection signal which changes said state of said general purpose input / output.

[0010] The skilled person will appreciate that because the main microcontroller unit is arranged to transmit a select signal for changing the state of a general purpose input / output, an erroneous situation can be avoided where two modules attempt to control the general purpose input / output.

[0011] According to the present invention, the main microcontroller unit can dynamically change the state of the general purpose input / output (hereinafter referred to as "GPIO") to avoid the situation where another module attempts to control the GPIO when the GPIO is already occupied by another module.

[0012] Embodiments of the present invention may be superior to previously known microcontroller systems because no asynchronous bridge is required. Since asynchronous systems require time synchronization, avoiding the use of an asynchronous bridge increases the speed of change processing in the module controlling the GPIO.

[0013] The main microcontroller unit may include multiple components, such as a universal asynchronous receiver / transmitter (UART) and / or a serial interface. Thus, the main microcontroller may be used for a variety of different applications.

[0014] In one set of embodiments the microcontroller system comprises a plurality of further modules. The plurality of further modules may be identical, or they may be different (eg different further modules have different applications and are therefore formed by different components).

[0015] In one set of embodiments, the further module is a slave microcontroller unit. Similar to the master microcontroller unit, the slave microcontroller unit may also be used for a variety of applications, for example, the slave microcontroller unit may be a WiFi microcontroller, a long term evolution (LTE) microcontroller and / or an audio synthesis / processing microcontroller. The slave microcontroller unit may include multiple components, such as a UART and / or a radio.

[0016] In one set of embodiments, the microcontroller system includes a plurality of slave microcontroller units. This may be advantageous in a microcontroller system that performs various functions, i.e., each of the plurality of slave microcontroller units may be used for or may be configured for a different application. In one set of embodiments, the microprocessor system includes a plurality of GPIOs. In this embodiment, it may be beneficial for different slave microcontroller units to have control of different GPIOs assigned by the master microcontroller device so that each unit in a subset of the plurality of slave microcontroller units can control a different GPIO simultaneously. This allows a plurality of different applications to be run simultaneously by the microcontroller system, which is typically required for systems on chip. Therefore, in one set of embodiments, the selection signal assigns control of one of the plurality of GPIOs to a slave microcontroller unit or the plurality of slave microcontroller units.

[0017] While multiple GPIOs may be required when a system includes multiple slave microprocessor units, the dynamic allocation of GPIOs by the master microprocessor unit allows a smaller number of GPIOs to be utilized in the microcontroller system as a whole and allocated to any given slave microprocessor unit at any given time. Having fewer GPIOs reduces the number of components exposed to inadvertent vulnerabilities or malicious code that may be introduced by the network or digital signal processor (DSP). Thus, when executing more dangerous applications, critical components of the system can be disconnected from the general purpose input / output to avoid potential damage to the microprocessor unit.

[0018] To further improve the security of the microcontroller system, in some embodiments it may be desirable to exclude a subset of the plurality of general purpose inputs / outputs from being controlled by a subset of the plurality of slave microcontroller units. This would mean that the subset of general purpose inputs / outputs could only be controlled by certain slave microcontroller units which could have, for example, additional security features.

[0019] In one set of embodiments, the microcontroller system is arranged so that the GPIO is in a first state when the microcontroller system is started. In embodiments where there are multiple GPIOs, all of these GPIOs may initially be in the first state when the microcontroller system is started. This can reduce the startup time of the microcontroller system, because initially it may be necessary to actively power only the master microcontroller unit. This can also simplify the process of allocating GPIOs to slave microcontrollers, which may need GPIOs at different times after startup. For example, certain applications involving certain slave microcontroller units may need to be started before other applications involving different slave microcontroller units. Therefore, in one set of embodiments, the master microcontroller unit is arranged to transmit a selection signal that changes the state of the GPIO from the first state to the second state.

[0020] In one set of embodiments, the select signal is written to a register field of the GPIO.

[0021] In one set of embodiments, the slave microcontroller unit is arranged to have sole control over the (assigned) GPIO when the GPIO is in the second state. Thus, the slave microcontroller unit will be able to configure the pull-up or pull-down, drive strength, wake-up sensing and input / output mode of the assigned GPIO. This prevents corruption of signals sent from the slave microcontroller unit to the assigned GPIO, as there is no interference with other microcontrollers attempting to control the assigned GPIO.

[0022] In order to provide greater functionality, in one set of embodiments, the slave microcontroller unit includes a peripheral device. For example, the peripheral device can be a timer (e.g., a watchdog timer), an event counter, or a pulse width modulation generator. The advantages of including a slave microcontroller with a peripheral device can vary depending on the type of peripheral device. For example, a watchdog timer peripheral device can enable the slave microcontroller unit to detect and recover from computer failures, which increases the reliability of the microcontroller system and the device implemented by the microcontroller system. In another example, using a pulse width modulation (PWM) generator as a peripheral device can allow a PWM signal to be output from the microcontroller. In general, peripheral devices tend to increase the functionality and application of a microcontroller system.

[0023] Since increasing the number of peripheral devices can increase the functionality and application of a microcontroller system, it may be advantageous for a slave microcontroller unit to include multiple peripheral devices. In view of the permissible arrangements disclosed herein, it is possible to have a microcontroller system including multiple slave microcontroller units, wherein at least one of the slave microcontroller units includes multiple peripheral devices.

[0024] For a peripheral device to perform certain functions, it must have control over a GPIO. Therefore, the slave microcontroller unit may be arranged to assign the GPIOs assigned to the slave microcontroller to its peripheral devices. Therefore, in one set of embodiments, the slave microcontroller unit is arranged to transmit an additional selection signal that assigns control of at least one GPIO to a peripheral device. The peripheral device can then control and access the GPIO in order to, for example, transmit a signal to another part of the microcontroller system.

[0025] There may also be embodiments in which the master microcontroller unit is arranged to transmit a selection signal directly allocating peripheral device control of the GPIO. In this configuration, there is no need to first allocate control of the GPIO to the slave microcontroller.

[0026] There may also be embodiments where the additional modules are peripheral devices that are not associated with a slave microcontroller unit. The skilled person will also understand that within the scope of the disclosed invention there are embodiments where the microcontroller system has a plurality of additional modules, a subset of which are slave microcontroller units, and a subset of which are peripheral devices.

[0027] The technician will understand that different slave microcontroller units may need to control GPIO at different points during the microcontroller system is in effect. For example, for some applications, a specific slave microcontroller unit may be required, but this specific slave microcontroller unit may not be required for different applications. Therefore, it may be beneficial to dynamically change the control of GPIO during the microcontroller system is in effect. Therefore, in some embodiments of the present invention, GPIO allocation is dynamic. In this context, dynamic should be taken to refer to the allocation of GPIO that actively occurs during the microcontroller system is in effect.

[0028] In one set of embodiments, the GPIO is used as a clock connection and / or a data connection.

[0029] Although in some embodiments described herein it is preferred for the GPIO to be controlled by only a single microcontroller unit or peripheral device at a given time, there may be embodiments where the GPIO can be allocated to multiple microcontroller units and / or peripheral devices. This can increase the functionality of the microcontroller system.

[0030] An example of how to provide access to more than one microcontroller unit or peripheral at any time is that the output path from each microcontroller unit / peripheral can be blocked by an AND gate array. The AND gate array will have one enable input and one data input. The output from each AND gate array can then be sent as an input into an OR tree. The final output is the output of the OR tree. If multiple AND gates are to be turned on, the gate that is driven with a value of "1" will always control the final output.

[0031] When viewed from a second aspect, the present invention provides a method of controlling a microcontroller system, the method comprising:

[0032] Use the main microcontroller unit to control general purpose input / output;

[0033] transmitting a select signal from the main microcontroller unit to a general purpose input / output; and

[0034] Further modules are then used to control the general purpose input / output.

[0035] It should be understood that, for the reasons previously described with respect to the first aspect of the present invention, this method of controlling a microcontroller system is superior to methods known in the prior art. It will also be understood by those skilled in the art that similar embodiments described with respect to the first aspect of the present invention may also be applicable to the second aspect of the present invention. The additional modules may be from a microcontroller unit or a peripheral device.

[0036] The skilled person will appreciate that an important factor in designing a microcontroller system is to minimize the time it takes to boot the system from a "sleep", "standby" or "disconnected" state. The boot time can be reduced by initially actively powering only the main microcontroller unit, which can control a plurality of general purpose input / output pins. Then, during initial configuration, a selection signal is transmitted to allocate GPIOs for one or more additional modules. Thus, the method may further include the step of transmitting a selection signal for allocating GPIOs, the allocation occurring during initial configuration.

[0037] In one set of embodiments, the method includes evaluating whether the additional module is safe. This step may occur before the step of controlling the GPIO using the additional module. If the additional module has been damaged by an error or malicious code, the additional module may be unsafe. If it is determined that the additional module is unsafe, the step of controlling the GPIO using the additional module may not be implemented. This can prevent other components on the microcontroller system from being damaged, and thereby reduce the risk of system damage and failure. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] A series of embodiments of the present invention will now be described, by way of example only, with reference to the accompanying drawings, in which:

[0039] Figure 1 A microcontroller system having a plurality of slave microcontroller units is shown;

[0040] Figure 2 A microcontroller system having multiple slave microcontrollers and peripheral devices is shown; and

[0041] Figure 3 A microcontroller system is shown in which an application microcontroller unit acts as a master microcontroller unit. DETAILED DESCRIPTION

[0042] like Figure 1 The exemplary microcontroller system 100 shown includes a master microcontroller unit 102 and a general purpose input / output (GPIO) 108. The microcontroller system 100 further includes a first slave microcontroller unit 104 and a second slave microcontroller unit 106. The slave microcontroller units 104, 106, the master microcontroller unit 102 and the GPIO 108 are connected by a bus 110. This allows signals to be transmitted between different components of the microcontroller system 102.

[0043] In an initial state, for example, when the microcontroller system 100 is started from a "standby" / "disconnected" state, the GPIO 108 is controlled by the master microcontroller unit 102 so that the first slave microcontroller unit 104 or the second slave microcontroller unit 106 has control of the GPIO 108. Therefore, these components are initially inactive. After startup, the microcontroller system 100 can then participate in an initial configuration. This initial configuration can be initiated by the master microcontroller unit 102. During the initial configuration, the master microcontroller unit 102 transmits a selection signal to a register field corresponding to the GPIO 108. This selection signal can indicate that the GPIO 108 will now be controlled by the first slave microcontroller unit 104. The first slave microcontroller unit 104 can then begin to communicate with and control the GPIO 108. As a general purpose microcontroller unit to microcontroller bus interface, such as Figure 1 As shown in the bus 110, as a result of reading the active configuration from the master microcontroller unit 102, the first slave microcontroller unit 104 begins to communicate with and control the GPIO 108. However, the first slave microcontroller 104 may only read the active configuration from the master microcontroller unit 102 at the discretion of the master microcontroller unit.

[0044] At a later point in time, such as when the second microcontroller unit needs to take active action, the master microcontroller unit 102 sends another different selection signal to the register field corresponding to the GPIO 108. This selection signal indicates that the GPIO is now controlled by the second slave microcontroller unit 106. As a result, the first slave microcontroller unit 104 stops communicating with the GPIO 108 and stops controlling the GPIO. Instead, the second slave microcontroller unit 106 starts communicating with the GPIO 108 and starts controlling the GPIO. Using the selection signal transmitted by the master microcontroller unit 102 helps avoid errors that occur due to two slave microcontrollers 104, 106 trying to control the GPIO at the same time.

[0045] At another later time, the main microcontroller unit 102 may transmit another different selection signal to the register field corresponding to the GPIO 108. This selection signal indicates that the GPIO 108 is now controlled by the main microcontroller unit again. The main microcontroller unit 102 can transmit the selection signal for changing the microcontroller unit under control of the GPIO at any point in time / as needed for the functionality of the microcontroller system 100.

[0046] Figure 2 A second exemplary microcontroller system 200 is shown in FIG. The microcontroller system 200 includes a master microcontroller unit 202, two slave microcontroller units 204, 206, a bus 210, and a first GPIO 208. All of these components are similar to Figure 1Components in the microcontroller system 100 shown. However, Figure 2 The microcontroller system 200 further includes a second GPIO 216 and two peripheral devices 212 , 214 .

[0047] The first peripheral device 212 is associated with the first slave microcontroller unit 204. The second peripheral device 214 is independent of the slave microcontroller units 204, 206 and may be controlled directly by the master microcontroller.

[0048] The master microcontroller unit 202 may transmit a selection signal to a register field corresponding to the first GPIO 208 indicating that the first GPIO 208 is now controlled by the first slave microcontroller unit 204. The first slave microcontroller unit may then transmit a selection signal to assign the first GPIO 208 to a first peripheral device 212 forming part of the first slave microcontroller unit 204. The first peripheral device 212 may then control the first GPIO 208. Figure 2 As a result of reading the active configuration from the master microcontroller unit 202, or as a result of reading the active configuration from the first slave microcontroller unit 204, the first peripheral device 212 can begin to communicate with and control the GPIO 208. However, the first slave microcontroller 204 can only read the active configuration at the discretion of the master microcontroller unit 202 and / or the first slave microcontroller unit 204. It is also possible for the master microcontroller (although in Figure 2 In the illustrated embodiment (not shown), control of the GPIO is directly assigned to a first peripheral device comprising part of the slave microcontroller unit 204 .

[0049] The master microcontroller unit 202 can also initially take control of the second GPIO 216. The master microcontroller unit 202 can transmit a selection signal to a register field corresponding to the second GPIO 216 indicating that the second GPIO 216 is now controlled by the second slave microcontroller unit 206.

[0050] At a later point in time, the master microcontroller unit may transmit a selection signal to the register field corresponding to the second GPIO 216 indicating that the first GPIO 216 is now controlled by the second peripheral unit 214. As a result, the second slave microcontroller unit 206 no longer communicates with the second GPIO 216, and the second peripheral unit 214 communicates with the second GPIO 216.

[0051] Figure 3An exemplary microcontroller system 300 is shown having three microcontroller systems 302, 304, 306. The application microcontroller unit 302 acts as a master microcontroller system. The network microcontroller unit 304 and the digital signal processor microcontroller unit 306 both act as slave microcontroller units.

[0052] During "boot" or when the microcontroller system 300 is reset, the application microcontroller unit 302 controls (and therefore has access to) the plurality of GPIOs 308. The network microcontroller unit 304 and the digital signal processor microcontroller unit 306 remain inactive / disconnected from the plurality of GPIOs 308 during "boot" or reset.

[0053] After "boot" or reset, the application microcontroller unit 302 allocates a subset 314 of the plurality of GPIOs 308 to the network microcontroller unit 304. The network microcontroller unit 304 can then manage the external low noise amplifiers, power amplifiers, and wireless coexistence interfaces connected to the subset of GPIOs 314.

[0054] After "boot" or reset, the application microcontroller unit 302 assigns the second subset 312 of the plurality of GPIOs 308 to the DSP microcontroller unit 306. The DSP microcontroller unit 306 can then communicate with the external digital-to-analog converter and pulse density modulation unit connected to the second subset 312 of GPIOs.

[0055] The application microcontroller unit 302 will communicate separately with an external power management integrated circuit (not shown) to control the power provided to the microcontroller system 300. By allocating smaller subsets 314, 312 of GPIOs to the network microcontroller unit 304 and the digital signal processor microcontroller unit 306, respectively, the number of GPIOs 308 through which unintentional vulnerabilities or malicious code in the slave microcontroller units 304, 306 can enter a reset of the microcontroller system is reduced (i.e., the "attack surface" of the microcontroller system is reduced). These unintentional vulnerabilities or malicious code also cannot tamper with critical components, such as the external power management integrated circuit in the above arrangement, because the external power management integrated circuit is kept separate from the plurality of GPIOs 308 and the slave microcontroller units 304, 306.

[0056] exist Figure 3 In the configuration seen in , it may not be possible for the network microcontroller unit 304 to read the active configuration of the GPIO from the application microcontroller unit 302 via a bus interface such as bus 310. However, in such a configuration, information about assigning control of the GPIOs may be shared via a software-based solution.

[0057] Therefore, those skilled in the art will appreciate that microcontroller systems according to embodiments of the present invention can help reduce unintentional or malicious GPIO usage and can help reduce the startup time associated with microcontroller systems. However, it will be further understood that many variations of the specific arrangements described herein are possible within the scope of the present invention as defined in the claims.

Claims

1. A microcontroller system comprising: Main microcontroller unit; multiple slave microcontroller units; as well as a plurality of general purpose input / outputs, wherein in a first state a first general purpose input / output of the plurality of general purpose input / outputs is controlled by the master microcontroller unit, and in a second state the first general purpose input / output is controlled by a first slave microcontroller unit of the plurality of slave microcontroller units; wherein said main microcontroller unit is arranged to transmit a selection signal which changes said state of said first general purpose input / output; as well as Wherein a subset of the plurality of general purpose input / outputs is excluded from control by a subset of the plurality of slave microcontroller units.

2. The microcontroller system of claim 1, wherein the microcontroller system is arranged such that the first general purpose input / output is in the first state when the microcontroller system is started up.

3. A microcontroller system according to claim 1 or 2, wherein the selection signal is written to a register field of the first general purpose input / output.

4. A microcontroller system according to claim 1 or 2, wherein when the first general purpose input / output is in the second state, the first slave microcontroller unit is arranged to have exclusive control over the first general purpose input / output.

5. The microcontroller system according to claim 1 or 2, wherein the first slave microcontroller unit comprises a peripheral device.

6. The microcontroller system according to claim 1 or 2, wherein the first slave microcontroller unit comprises a plurality of peripheral devices.

7. A microcontroller system according to claim 1 or 2, wherein the slave microcontroller unit is arranged to transmit an additional selection signal allocating control of at least one general purpose input / output to a peripheral device.

8. A microcontroller system according to claim 1 or 2, wherein the main microcontroller unit is arranged to transmit a selection signal directly assigning peripheral device control to a general purpose input / output.

9. The microcontroller system according to claim 1 or 2, wherein the general purpose input / output assignment is dynamic.

10. The microcontroller system according to claim 1 or 2, wherein the first general purpose input / output is used as a clock connection and / or a data connection.

11. A method of controlling a microcontroller system, the method comprising: Use the main microcontroller unit to control multiple general purpose inputs / outputs; transmitting a selection signal from the main microcontroller unit to a first general purpose input / output of the plurality of general purpose input / outputs; as well as then controlling the first general purpose input / output using a first slave microcontroller unit of a plurality of slave microcontroller units; Wherein a subset of the plurality of general purpose input / outputs is excluded from control by a subset of the plurality of slave microcontroller units.

12. The method of controlling a microcontroller system according to claim 11, wherein the method further comprises transmitting a selection signal for assigning the first general purpose input / output during initial configuration.

13. The method of controlling a microcontroller system according to claim 11 or 12, wherein the method further comprises evaluating whether the first slave microcontroller unit is safe.

14. A method of controlling a microcontroller system according to claim 11 or 12, comprising writing the selection signal to a register field of the first general purpose input / output.

15. The method of controlling a microcontroller system according to claim 11 or 12, wherein when the first slave microcontroller unit is subsequently used to control the first general purpose input / output, the first slave microcontroller unit has exclusive control over the first general purpose input / output.

Citation Information

Patent Citations

  • Terminal chip pin multiplexing device

    CN101136005A

  • Virtual general purpose input / output for a microcontroller

    CN104011697A

  • Microcontroller device with multiple independent microcontrollers

    CN107430564A

  • Input / output signal bridging and virtualization in a multi-node network

    CN108027791A

  • Configurable integrated circuit for use in a multi-function handheld device

    US20040107303A1