CN114691222A - High-reliability CAN dormancy awakening method for microprocessor - Google Patents

High-reliability CAN dormancy awakening method for microprocessor Download PDF

Info

Publication number
CN114691222A
CN114691222A CN202210189568.7A CN202210189568A CN114691222A CN 114691222 A CN114691222 A CN 114691222A CN 202210189568 A CN202210189568 A CN 202210189568A CN 114691222 A CN114691222 A CN 114691222A
Authority
CN
China
Prior art keywords
microprocessor
awakened
wake
interrupted
awakening
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210189568.7A
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.)
Shenzhen Di Di Electronic Technology Co ltd
Original Assignee
Shenzhen Di Di Electronic Technology 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 Shenzhen Di Di Electronic Technology Co ltd filed Critical Shenzhen Di Di Electronic Technology Co ltd
Priority to CN202210189568.7A priority Critical patent/CN114691222A/en
Publication of CN114691222A publication Critical patent/CN114691222A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Microcomputers (AREA)
  • Power Sources (AREA)

Abstract

The invention provides a microprocessor high-reliability CAN dormancy awakening method, which comprises the following steps: step one, before dormancy, a timer in the microprocessor is configured to wake up as a newly-added wake-up source, so that when the CAN module is interrupted and awakened to be invalid, the timer wakes up the microprocessor periodically, and the periodicity is 1 millisecond-24 hours. According to the high-reliability CAN dormancy awakening method for the microprocessor, another awakening source is added to hardware, corresponding time delay is carried out on signals through a delay circuit, so that the two awakening sources have a certain time difference, the microprocessor CAN be awakened in two aspects, and thus, one awakening source is additionally added besides the CAN awakening source of the microprocessor and is used as a backup, the function is achieved when the CAN awakening source fails, and the microprocessor is ensured to be awakened.

Description

High-reliability CAN dormancy awakening method for microprocessor
Technical Field
The invention relates to the technical field of CAN dormancy awakening methods, in particular to a high-reliability CAN dormancy awakening method for a microprocessor.
Background
In a plurality of industrial departments such as automobiles and the like, the CAN bus is more and more widely applied due to the excellent anti-interference performance. Sleep wake-up is a common energy saving technique in many applications, especially those requiring power savings, such as automotive applications. The main idea is that when the microprocessor does not work, the microprocessor is forced to enter a dormant state, and the power consumption is greatly saved. When the microprocessor needs to work, the microprocessor is awakened by various methods, exits from the sleep state and enters a normal working state. The sleep wake-up method is a key technology of the microprocessor.
The existing CAN sleep wake-up method generally uses only one wake-up source, for example, CAN message wake-up. That is, when the microprocessor is in a sleep state and any message appears on the CAN bus, the CAN transceiver wakes up the microprocessor through the level jump of the RXD pin signal, which is the most common method, but the CAN sleep wake-up method has a problem that due to a special reason, at a specific moment, due to the difference between the time sequence of instruction execution and the internal mark position bit time, the microprocessor is deadlocked with a certain probability and cannot be woken up as required, which is unacceptable in some key application fields.
Disclosure of Invention
The present invention is directed to overcome the drawbacks of the prior art, and to provide a method for waking up a microprocessor from a high-reliability CAN sleep, so as to solve the problems mentioned in the background art.
A microprocessor high-reliability CAN dormancy awakening method comprises the following steps:
step one, before dormancy, configuring a timer in a microprocessor to wake up as a newly-added wake-up source, and when a CAN module is interrupted and wakened up to be invalid, periodically waking up the microprocessor by the timer, wherein the periodicity is 1 millisecond-24 hours;
and step two, when the CAN module is interrupted and awakened to be invalid or the internal timer of the microprocessor is not configured to be awakened as a newly-added awakening source, the external IRQ is interrupted to awaken.
Preferably, the periodicity in the first step may be 1 millisecond apart.
Preferably, the periodicity in the first step may be 1 second apart.
Preferably, the periodicity in step one may be 1 minute intervals.
Preferably, the periodicity in step one may be 1 hour apart.
Preferably, the periodicity in the first step may be 24 hours apart.
Preferably, a triode inverter circuit is arranged in the microprocessor.
According to the high-reliability CAN dormancy awakening method for the microprocessor, another awakening source is added to hardware, corresponding time delay is carried out on signals through a delay circuit, so that the two awakening sources have a certain time difference, the microprocessor CAN be awakened in two aspects, and thus, one awakening source is additionally added besides the CAN awakening source of the microprocessor and is used as a backup, the function is achieved when the CAN awakening source fails, and the microprocessor is ensured to be awakened.
Drawings
FIG. 1 is a circuit diagram of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
Embodiment 1, as shown in fig. 1, a method for waking up a microprocessor from a CAN sleep with high reliability includes the following steps:
step one, before dormancy, a timer in a microprocessor is configured to wake up as a newly-added wake-up source, so that when a CAN module is interrupted and awakened to be invalid, the timer periodically wakes up the microprocessor, the periodicity is 1 millisecond, so that when the microprocessor is dormant, an internal timer automatically generates interruption every 1 millisecond, wakes up the microprocessor, and then the microprocessor checks whether CAN interruption occurs outside, so that when the CAN module is interrupted and awakened to be invalid, the timer CAN ensure that the microprocessor CAN be periodically awakened and cannot be stuck in a sleep state;
step two, when the CAN module is interrupted and awakened to be invalid or a timer in the microprocessor is not configured to be awakened as a newly added awakening source, the external IRQ is interrupted, the external IRQ is awakened, if the software enters a certain state incapable of exiting or the software cannot process CAN messages, the software is difficult to recover, the software is awakened by the interruption and the awakening of the CAN module is realized by the interruption of the external IRQ, if the CAN module is interrupted and awakened to be invalid, the software CAN be awakened by the interruption of the external IRQ, for example, the microprocessor CAN not shield the interrupted IRQ, particularly, a triode inverter circuit is arranged in the microprocessor, and a triode inverter circuit is additionally arranged, and the working principle of the triode inverter circuit is as follows: when CAN _ RXD is low, that is, the CAN has message data reception, the Int _ Port signal is high, 59 and 60 pins connected to the microprocessor, the software adds interrupt signal detection (high level is effective) of IRQ (60 pin) or adds signal query of KWP2 (59 pin), then the Int _ Port signal CAN be judged to have a wake-up signal, and the Int _ Port signal enters the wake-up microprocessor, so that another wake-up source is added through hardware, and the two wake-up sources have a certain time difference by corresponding delay of the signal through a delay circuit, thereby ensuring that the microprocessor CAN be woken up in two aspects, referring to the circuit diagram in FIG. 1, when the microprocessor sleeps, an external CAN transceiver CAN automatically detect the state of the CAN bus, the CAN bus starts to wake up from the sleep, the bus level changes, at this time, the CAN transceiver CAN output a signal, CAN _ RX goes low, transistor Q1 is conducted, and the Int _ Port Port goes high, the microprocessor is interrupted by an external pin, and the microprocessor is awakened completely.
Embodiment 2, as shown in fig. 1, a method for waking up a microprocessor from a CAN sleep with high reliability includes the following steps:
step one, before dormancy, a timer in a microprocessor is configured to wake up as a newly-added wake-up source, so that when a CAN module is interrupted and awakened to be invalid, the timer periodically wakes up the microprocessor, the periodicity is 1 second, so that when the microprocessor is dormant, an internal timer automatically generates interruption every 1 second to wake up the microprocessor, and the microprocessor is checked whether CAN interruption occurs outside, so that when the CAN module is interrupted and awakened to be invalid, the timer CAN ensure that the microprocessor CAN be periodically awakened and cannot be stuck in a sleep state;
step two, when the CAN module is interrupted and awakened to be invalid or a timer in the microprocessor is not configured to be awakened as a newly added awakening source, the external IRQ is interrupted, the external IRQ is awakened, if the software enters a certain state incapable of exiting or the software cannot process CAN messages, the software is difficult to recover, the software is awakened by the interruption and the awakening of the CAN module is realized by the interruption of the external IRQ, if the CAN module is interrupted and awakened to be invalid, the software CAN be awakened by the interruption of the external IRQ, for example, the microprocessor CAN not shield the interrupted IRQ, particularly, a triode inverter circuit is arranged in the microprocessor, and a triode inverter circuit is additionally arranged, and the working principle of the triode inverter circuit is as follows: when CAN _ RXD is low, that is, the CAN has message data reception, the Int _ Port signal is high, 59 and 60 pins connected to the microprocessor, the software adds interrupt signal detection (high level is effective) of IRQ (60 pin) or adds signal query of KWP2 (59 pin), then the Int _ Port signal CAN be judged to have a wake-up signal, and the Int _ Port signal enters the wake-up microprocessor, so that another wake-up source is added through hardware, and the two wake-up sources have a certain time difference by corresponding delay of the signal through a delay circuit, thereby ensuring that the microprocessor CAN be woken up in two aspects, referring to the circuit diagram in FIG. 1, when the microprocessor sleeps, an external CAN transceiver CAN automatically detect the state of the CAN bus, the CAN bus starts to wake up from the sleep, the bus level changes, at this time, the CAN transceiver CAN output a signal, CAN _ RX goes low, transistor Q1 is conducted, and the Int _ Port Port goes high, the microprocessor is interrupted by an external pin, and the microprocessor is awakened completely.
Embodiment 3, as shown in fig. 1, a method for waking up a microprocessor from a CAN sleep with high reliability includes the following steps:
step one, before dormancy, a timer in a microprocessor is configured to wake up as a newly-added wake-up source, so that when a CAN module is interrupted and awakened to be invalid, the timer periodically wakes up the microprocessor, the periodicity is 1 minute, so that when the microprocessor is dormant, an internal timer automatically generates interruption every 1 minute to wake up the microprocessor, and the microprocessor is checked whether CAN interruption occurs outside, so that when the CAN module is interrupted and awakened to be invalid, the timer CAN ensure that the microprocessor CAN be periodically awakened and cannot be stuck in a sleep state;
step two, when the CAN module is interrupted and awakened to be invalid or a timer in the microprocessor is not configured to be awakened as a newly added awakening source, the external IRQ is interrupted, the external IRQ is awakened, if the software enters a certain state incapable of exiting or the software cannot process CAN messages, the software is difficult to recover, the software is awakened by the interruption and the awakening of the CAN module is realized by the interruption of the external IRQ, if the CAN module is interrupted and awakened to be invalid, the software CAN be awakened by the interruption of the external IRQ, for example, the microprocessor CAN not shield the interrupted IRQ, particularly, a triode inverter circuit is arranged in the microprocessor, and a triode inverter circuit is additionally arranged, and the working principle of the triode inverter circuit is as follows: when CAN _ RXD is low, that is, the CAN has message data reception, the Int _ Port signal is high, 59 and 60 pins connected to the microprocessor, the software adds interrupt signal detection (high level is effective) of IRQ (60 pin) or adds signal query of KWP2 (59 pin), then the Int _ Port signal CAN be judged to have a wake-up signal, and the Int _ Port signal enters the wake-up microprocessor, so that another wake-up source is added through hardware, and the two wake-up sources have a certain time difference by corresponding delay of the signal through a delay circuit, thereby ensuring that the microprocessor CAN be woken up in two aspects, referring to the circuit diagram in FIG. 1, when the microprocessor sleeps, an external CAN transceiver CAN automatically detect the state of the CAN bus, the CAN bus starts to wake up from the sleep, the bus level changes, at this time, the CAN transceiver CAN output a signal, CAN _ RX goes low, transistor Q1 is conducted, and the Int _ Port Port goes high, the microprocessor is interrupted by an external pin, so that the microprocessor is awakened completely.
Embodiment 4, as shown in fig. 1, a method for waking up a microprocessor from a CAN sleep with high reliability includes the following steps:
step one, before dormancy, a timer in a microprocessor is configured to wake up as a newly-added wake-up source, so that when a CAN module is interrupted and awakened to be invalid, the timer periodically wakes up the microprocessor, the periodicity is 1 hour, so that when the microprocessor is dormant, an internal timer automatically generates interruption every 1 hour to wake up the microprocessor, and the microprocessor is checked whether CAN interruption occurs outside, so that when the CAN module is interrupted and awakened to be invalid, the timer CAN ensure that the microprocessor CAN be periodically awakened and cannot be stuck in a sleep state;
step two, when the CAN module is interrupted and awakened to be invalid or a timer in the microprocessor is not configured to be awakened as a newly added awakening source, the external IRQ is interrupted, the external IRQ is awakened, if the software enters a certain state incapable of exiting or the software cannot process CAN messages, the software is difficult to recover, the software is awakened by the interruption and the awakening of the CAN module is realized by the interruption of the external IRQ, if the CAN module is interrupted and awakened to be invalid, the software CAN be awakened by the interruption of the external IRQ, for example, the microprocessor CAN not shield the interrupted IRQ, particularly, a triode inverter circuit is arranged in the microprocessor, and a triode inverter circuit is additionally arranged, and the working principle of the triode inverter circuit is as follows: when CAN _ RXD is low, that is, the CAN has message data reception, the Int _ Port signal is high, 59 and 60 pins connected to the microprocessor, the software adds interrupt signal detection (high level is effective) of IRQ (60 pin) or adds signal query of KWP2 (59 pin), then the Int _ Port signal CAN be judged to have a wake-up signal, and the Int _ Port signal enters the wake-up microprocessor, so that another wake-up source is added through hardware, and the two wake-up sources have a certain time difference by corresponding delay of the signal through a delay circuit, thereby ensuring that the microprocessor CAN be woken up in two aspects, referring to the circuit diagram in FIG. 1, when the microprocessor sleeps, an external CAN transceiver CAN automatically detect the state of the CAN bus, the CAN bus starts to wake up from the sleep, the bus level changes, at this time, the CAN transceiver CAN output a signal, CAN _ RX goes low, transistor Q1 is conducted, and the Int _ Port Port goes high, the microprocessor is interrupted by an external pin, and the microprocessor is awakened completely.
Embodiment 5, as shown in fig. 1, a method for waking up a microprocessor from a CAN sleep with high reliability includes the following steps:
step one, before dormancy, a timer in a microprocessor is configured to wake up as a newly-added wake-up source, so that when a CAN module is interrupted and awakened to be invalid, the timer periodically wakes up the microprocessor, the periodicity is 24 hours, so that when the microprocessor is dormant, an internal timer automatically generates interruption every 24 hours to wake up the microprocessor, and the microprocessor is checked whether CAN interruption occurs outside, so that when the CAN module is interrupted and awakened to be invalid, the timer CAN ensure that the microprocessor CAN be periodically awakened and cannot be stuck in a sleep state;
step two, when the CAN module is interrupted and wakened up to be invalid or a timer in the microprocessor is not configured to wake up as a newly added wake-up source, the external IRQ is interrupted, the external IRQ is wakened up, if the software enters a certain state which cannot be exited or the software cannot process CAN messages, the software is difficult to recover, the software is wakened up by the interruption of the CAN module, if the CAN module is interrupted and wakened up to be invalid, the software CAN be wakened up by the interruption of the external IRQ, for example, the microprocessor CAN not shield the interrupted IRQ, specifically, a triode inverter circuit is arranged in the microprocessor, one triode inverter circuit is additionally arranged, and the working principle of the triode inverter circuit is as follows: when CAN _ RXD is low, that is, the CAN has message data reception, the Int _ Port signal is high, 59 and 60 pins connected to the microprocessor, the software adds interrupt signal detection (high level is effective) of IRQ (60 pin) or adds signal query of KWP2 (59 pin), then the Int _ Port signal CAN be judged to have a wake-up signal, and the Int _ Port signal enters the wake-up microprocessor, so that another wake-up source is added through hardware, and the two wake-up sources have a certain time difference by corresponding delay of the signal through a delay circuit, thereby ensuring that the microprocessor CAN be woken up in two aspects, referring to the circuit diagram in FIG. 1, when the microprocessor sleeps, an external CAN transceiver CAN automatically detect the state of the CAN bus, the CAN bus starts to wake up from the sleep, the bus level changes, at this time, the CAN transceiver CAN output a signal, CAN _ RX goes low, transistor Q1 is conducted, and the Int _ Port Port goes high, the microprocessor is interrupted by an external pin, and the microprocessor is awakened completely.

Claims (7)

1. A microprocessor high-reliability CAN dormancy awakening method is characterized by comprising the following steps:
step one, before dormancy, configuring a timer in a microprocessor to wake up as a newly-added wake-up source, and when a CAN module is interrupted and wakened up to be invalid, periodically waking up the microprocessor by the timer, wherein the periodicity is 1 millisecond-24 hours;
and step two, when the CAN module is interrupted and awakened to be invalid or the internal timer of the microprocessor is not configured to be awakened as a newly-added awakening source, the external IRQ is interrupted to awaken.
2. The method of claim 1, wherein the method comprises: the periodicity in step one may be 1 millisecond apart.
3. The method of claim 1, wherein the method comprises: the periodicity in the first step may be 1 second apart.
4. The method according to claim 1, wherein the method comprises: the periodicity in step one may be 1 minute intervals.
5. The method according to claim 1, wherein the method comprises: the periodicity in step one may be at 1 hour intervals.
6. The method according to claim 1, wherein the method comprises: the periodicity in step one may be at intervals of 24 hours.
7. The method according to claim 1, wherein the method comprises: and a triode inverter circuit is arranged in the microprocessor.
CN202210189568.7A 2022-03-01 2022-03-01 High-reliability CAN dormancy awakening method for microprocessor Pending CN114691222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210189568.7A CN114691222A (en) 2022-03-01 2022-03-01 High-reliability CAN dormancy awakening method for microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210189568.7A CN114691222A (en) 2022-03-01 2022-03-01 High-reliability CAN dormancy awakening method for microprocessor

Publications (1)

Publication Number Publication Date
CN114691222A true CN114691222A (en) 2022-07-01

Family

ID=82136995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210189568.7A Pending CN114691222A (en) 2022-03-01 2022-03-01 High-reliability CAN dormancy awakening method for microprocessor

Country Status (1)

Country Link
CN (1) CN114691222A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104950775A (en) * 2015-06-29 2015-09-30 小米科技有限责任公司 Circuit, method and device for waking up main MCU (micro control unit)
CN205417465U (en) * 2015-11-11 2016-08-03 北汽福田汽车股份有限公司 Vehicle control unit and system that awakens up and car thereof
CN106494321A (en) * 2016-10-27 2017-03-15 武汉奥泽电子有限公司 A kind of automobile ECU sleep management strategy process and system
CN107295025A (en) * 2016-03-30 2017-10-24 比亚迪股份有限公司 Wake-up system, method, car-mounted terminal, vehicle and the server of car-mounted terminal
CN212447399U (en) * 2020-05-18 2021-02-02 英博超算(南京)科技有限公司 Low-power-consumption energy-saving vehicle-mounted controller
CN112537265A (en) * 2019-09-23 2021-03-23 北京轻享科技有限公司 Control method and device of vehicle-mounted terminal and automobile

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104950775A (en) * 2015-06-29 2015-09-30 小米科技有限责任公司 Circuit, method and device for waking up main MCU (micro control unit)
CN205417465U (en) * 2015-11-11 2016-08-03 北汽福田汽车股份有限公司 Vehicle control unit and system that awakens up and car thereof
CN107295025A (en) * 2016-03-30 2017-10-24 比亚迪股份有限公司 Wake-up system, method, car-mounted terminal, vehicle and the server of car-mounted terminal
CN106494321A (en) * 2016-10-27 2017-03-15 武汉奥泽电子有限公司 A kind of automobile ECU sleep management strategy process and system
CN112537265A (en) * 2019-09-23 2021-03-23 北京轻享科技有限公司 Control method and device of vehicle-mounted terminal and automobile
CN212447399U (en) * 2020-05-18 2021-02-02 英博超算(南京)科技有限公司 Low-power-consumption energy-saving vehicle-mounted controller

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王亮 等: "乘用车车身控制系统的低功耗设计", 《汽车电器》, pages 4 - 8 *

Similar Documents

Publication Publication Date Title
EP1099167B1 (en) Method and apparatus for power mode transition in a multi-thread processor
US6467042B1 (en) Method and/or apparatus for lowering power consumption in a peripheral device
US7330926B2 (en) Interruption control system
US8060771B2 (en) Glitch-free clock suspend and resume circuit
CN103412634A (en) Device and method for awakening MCU (micro control unit) of SOC (system on chip) chip
US20080215908A1 (en) Sleep Watchdog Circuit For Asynchronous Digital Circuits
CN105225316A (en) A kind of dormancy of electron key low-power consumption power supply plan and awakening method
US7886177B2 (en) Method and apparatus of collecting timer ticks
TW200528970A (en) Wake-up reset circuit
US20120054513A1 (en) Apparatus for performing timer management regarding a system timer scheduler service, and associated method
CN104143969A (en) Sleep mode circuit and method for making circuit be in sleep mode
KR20090039658A (en) Power conservation
US6477655B1 (en) System and method to set PME—status bit and wake up the system, and selectively load device driver by searching who set the bit without requiring clock
CN101436095A (en) Low voltage resetting method for microcontroller
CN110865959B (en) Method and circuit for waking up I2C equipment
CN109062624B (en) Processing method for interrupt wakeup of automobile electronic control unit
CN114691222A (en) High-reliability CAN dormancy awakening method for microprocessor
JP2006290162A (en) Control unit for automobile
CN115002881A (en) Upper computer awakening method, device and system, electronic equipment and storage medium
CN111897763A (en) Control method, control device and electronic equipment
CN115729124A (en) Power management method, device, medium, domain controller, vehicle-mounted system and vehicle
CN114020138A (en) Micro-control unit chip and method for reducing electric quantity consumption
CN111459555B (en) Dormancy method and dormancy device
CN219831808U (en) Wake-up device
CN113656084B (en) Interface wake-up synchronization method, interface device and computer readable medium

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