CN113759762A - Vehicle machine control method, MCU and storage medium - Google Patents

Vehicle machine control method, MCU and storage medium Download PDF

Info

Publication number
CN113759762A
CN113759762A CN202010496048.1A CN202010496048A CN113759762A CN 113759762 A CN113759762 A CN 113759762A CN 202010496048 A CN202010496048 A CN 202010496048A CN 113759762 A CN113759762 A CN 113759762A
Authority
CN
China
Prior art keywords
mcu
vehicle
power
soc
signal
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.)
Granted
Application number
CN202010496048.1A
Other languages
Chinese (zh)
Other versions
CN113759762B (en
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.)
Guangzhou Automobile Group Co Ltd
Original Assignee
Guangzhou Automobile Group 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 Guangzhou Automobile Group Co Ltd filed Critical Guangzhou Automobile Group Co Ltd
Priority to CN202010496048.1A priority Critical patent/CN113759762B/en
Publication of CN113759762A publication Critical patent/CN113759762A/en
Application granted granted Critical
Publication of CN113759762B publication Critical patent/CN113759762B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24215Scada supervisory control and data acquisition

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Electric Propulsion And Braking For Vehicles (AREA)

Abstract

The invention discloses a vehicle machine control method, an MCU and a storage medium, wherein the method comprises the following steps: after the MCU of the vehicle machine is started, the MCU determines whether a power-off flag bit exists, wherein the power-off flag bit is a flag bit recorded when the MCU sends a power-off instruction to the SOC of the vehicle machine; the possibility that the MCU restarting process is missed due to power-off after the SOC is started according to the power-off instruction can be reduced, and the risk that the vehicle machine is in black screen and crashed due to the fact that the vehicle machine cannot be normally powered on in the starting process is reduced.

Description

Vehicle machine control method, MCU and storage medium
Technical Field
The invention relates to the technical field of vehicle control of vehicles, in particular to a vehicle control method, an MCU and a storage medium.
Background
The vehicle-mounted system generally comprises an MCU chip and an SOC chip. The MCU is responsible for power supply logic management and CAN communication of the vehicle machine, and the SOC is responsible for audio and video image processing of the vehicle machine. After receiving the starting signal, the MCU powers on the SOC to start the SOC, so that the vehicle machine is started.
However, the SOC has a long starting time, so that the conditions of shutdown due to complete vehicle dormancy and startup due to vehicle ignition are inevitable in the starting process, and the vehicle machine is easy to be halted due to black screen. During the power-on and starting process of the SOC, the MCU may receive a whole vehicle sleep signal, and the MCU sends a power-off instruction to the SOC to enable the vehicle machine to sleep. However, at this time, the SOC start-up process is not completed, and the power-off instruction cannot be executed, so that the SOC cannot successfully pull down the pin state of the SOC, and the MCU may misjudge that the operation of the SOC is at a high level. If the vehicle is ignited to start the engine at the moment, the MCU detects that the work of the SOC is a high level after the reset and restart, and the SOC cannot be powered off and restarted. When the SOC finishes starting, a power-off instruction is found, the pin state of the SOC is pulled down to power off, but the restarting process of the MCU is missed, so that the starting processes of the SOC and the MCU are abnormal, and the vehicle machine enters a shutdown stuck state to cause the vehicle machine to be in a black screen dead halt.
In the prior art, the condition of vehicle machine black screen crash is generally reduced by optimizing system performance and shortening the starting time of the SOC, but the method has high difficulty, and the conditions of vehicle machine black screen crash when the vehicle machine is started can still occur due to the fact that the whole vehicle is in dormant shutdown and the vehicle is ignited to be started in the starting process of the SOC.
Disclosure of Invention
The embodiment of the invention provides a vehicle machine control method, an MCU and a storage medium, and aims to solve the problem that in the prior art, a vehicle machine is halted due to a black screen in a starting process.
A vehicle machine control method comprises the following steps:
after the MCU of the vehicle machine is started, the MCU determines whether a power-off zone bit exists, wherein the power-off zone bit is a zone bit recorded when the MCU sends a power-off instruction to the SOC of the vehicle machine;
if the power-off flag bit exists, the MCU ignores the current state of the SOC and controls the SOC to perform power-off restart so as to finish the start of the vehicle machine;
and after the SOC is controlled to be powered off and restarted, the MCU clears the power-off zone bit.
Further, before the MCU determines whether the power-down flag bit is present, the method further comprises:
the MCU determines whether an initial wake-up signal is received, wherein the initial wake-up signal is a wake-up signal sent by a vehicle bus when a vehicle door of a vehicle is opened;
if the initial wake-up signal is determined to be received, the MCU enters a normal working state;
the MCU controls the SOC to start;
the MCU determines whether a whole vehicle sleep signal is received;
if the whole vehicle sleep signal is received, the MCU sends a power-off instruction to the SOC;
and the MCU records and stores the power-off zone bit.
Further, after the recording and storing the power-off flag bit, the method further includes:
the MCU determines whether an engine ignition signal or a whole vehicle wake-up signal is received;
and if the engine ignition signal or the whole vehicle wake-up signal is received, resetting and restarting the MCU.
Further, after the SOC completes starting, the method further includes:
the MCU receives the working state fed back by the SOC in real time;
the MCU determines whether the working state is normal or not;
and if the working state is abnormal, the MCU controls the SOC to reset and restart.
Further, after the vehicle-mounted device is started, the method further includes:
the MCU determines whether the vehicle is flameout;
if the vehicle is flamed out, the MCU controls the SOC to close a display screen of the vehicle machine;
the MCU determines whether a whole vehicle sleep signal is received within a preset time length or not;
if the whole vehicle sleep signal is received within the preset time length, the MCU controls the vehicle machine to sleep;
if the whole vehicle sleep signal is not received within the preset time and the engine ignition signal is not received, the MCU determines that the vehicle is in an abnormal state and controls the vehicle machine to sleep.
Further, MCU control the car machine carries out the dormancy, include:
the MCU sends a power-off instruction to the SOC, so that the SOC stores vehicle related data according to the power-off instruction and returns a power-off instruction after the vehicle related data are stored;
the MCU receives the power-down instruction and cuts off the SOC power supply according to the power-down instruction;
and the MCU enters a sleep state so as to enable the vehicle machine to sleep.
An MCU, comprising:
the system comprises a determining module and a judging module, wherein the determining module is used for determining whether a power-off zone bit exists after an MCU of the vehicle machine is started, and the power-off zone bit is a zone bit recorded when the MCU sends a power-off instruction to the SOC of the vehicle machine;
the restarting module is used for ignoring the current state of the SOC and controlling the SOC to perform power-off restarting so as to finish the vehicle machine starting if the power-off flag bit exists;
and the clearing module is used for clearing the power-off zone bit after controlling the SOC to carry out power-off restart.
An MCU comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, and the steps of the vehicle machine control method are realized when the processor executes the computer program.
A vehicle machine of a vehicle, comprising: SOC and the MCU described above.
A readable storage medium stores a computer program, and the computer program realizes the steps of the vehicle machine control method when being executed by a processor.
In one scheme provided by the vehicle machine control method, the MCU and the storage medium, after the MCU of the vehicle machine is started, the MCU determines whether a power-down flag bit exists, wherein the power-down flag bit is a flag bit recorded when the MCU sends a power-down instruction to the SOC of the vehicle machine; according to the method and the device, after the MCU is started, different vehicle machine starting strategies are executed according to the existence condition of the power-off flag bit, if the power-off flag bit exists, the SOC is started before and is not started, the MCU once reaches the power-off instruction to the SOC and the SOC does not successfully execute the power-off instruction, at the moment, the SOC is powered off and restarted, the starting process of the SOC is ended, the power-off instruction is cleared, the possibility that the MCU restarting process is missed due to the fact that the power is turned off according to the power-off instruction after the SOC is started is reduced, and therefore the risk that the vehicle machine is in black screen crash due to the fact that the vehicle machine cannot be normally powered on in the starting process is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic flow chart of a vehicle control method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an implementation flow of recording and storing a power-down flag;
FIG. 3 is a flow chart illustrating the process after SOC starts according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a structure of an MCU according to an embodiment of the present invention;
FIG. 5 is another schematic structural diagram of an MCU according to an embodiment 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 some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The vehicle machine control method provided by the embodiment of the invention can be applied to a vehicle machine of a vehicle, wherein the vehicle machine comprises an MCU and an SOC, and the MCU is communicated with the SOC through a serial port. In order to reduce the situation that the vehicle cannot be normally powered on due to poor vehicle power supply logic processing control in the vehicle starting process, and accordingly the vehicle is blacked, after an MCU of the vehicle is started, the MCU determines whether a power-off flag bit exists, the power-off flag bit is a flag bit recorded when the MCU sends a power-off instruction to an SOC of the vehicle, if the power-off flag bit exists, the MCU ignores the current state of the SOC, controls the SOC to be powered off and restarted to enable the vehicle to be started, and after the power-off restart of the SOC is completed, the MCU clears the power-off flag bit. The MCU is an MCU chip which is responsible for power supply logic management of the vehicle machine and communication with a vehicle bus, and the SOC is an SOC chip which is responsible for audio and video image processing of the vehicle machine.
In this embodiment, the vehicle device includes the MCU and the SOC only for exemplary illustration, and in other embodiments, the vehicle device further includes other components, such as a display screen, which are not described herein again.
In an embodiment, as shown in fig. 1, a car machine control method is provided, which is described by taking an example of an MCU in a car machine to which the method is applied, and includes the following steps:
s10: after the MCU of the vehicle machine is started, the MCU determines whether a power-off zone bit exists, wherein the power-off zone bit is a zone bit recorded when the MCU sends a power-off instruction to the SOC of the vehicle machine.
After each start of the MCU of the vehicle machine, the MCU immediately determines whether a power-off zone bit exists, wherein the power-off zone bit is a zone bit recorded when the MCU sends a power-off command to the SOC of the vehicle machine, so that the power supply control logic of the SOC is determined according to the existence condition of the power-off zone bit.
In this embodiment, the MCU determines whether the power-off flag bit exists by reading the power-off flag bit in the memory of the vehicle, and determines that the power-off flag bit exists if the memory stores the power-off flag bit, and determines that the power-off flag bit does not exist if the memory does not store the power-off flag bit.
In this embodiment, the memory storing the power-off flag bit is a charged erasable programmable read only memory (EEPROM), and the charged erasable programmable read only memory and the MCU communicate with each other through an SPI bus.
In this embodiment, the memory for storing the power-off flag bit is a charged erasable programmable read only memory, which is only an exemplary illustration, and in other embodiments, the memory for storing the power-off flag bit may also be other readable and writable memories, which is not described herein again.
After the MCU is started, the MCU determines that the power-off zone bit does not exist, the MCU is started for the first time after the vehicle is awakened, the SOC is not started, and the MCU does not send a power-off instruction to the SOC of the vehicle machine, so that the MCU executes a normal starting process, namely, a power supply of the SOC is controlled to supply power to the SOC to start the SOC, and the starting process of the vehicle machine is completed.
S20: and if the power-off flag bit exists, the MCU ignores the current state of the SOC and controls the SOC to power off and restart so as to finish the start of the vehicle machine.
It should be understood that, in the normal boot process of the vehicle, after the MCU is started, the power supply of the SOC is controlled to power on the SOC to start the SOC, so that the vehicle is started. And because the SOC is started for a long time, in the process of power-on and starting of the SOC, the MCU may receive a whole vehicle sleep signal, and the MCU sends a power-off instruction to the SOC to enable the vehicle machine to sleep. However, at this time, the SOC start-up process is not completed, and the power-off instruction cannot be executed, so that the SOC cannot successfully pull down the pin state of the SOC, and the MCU may misjudge that the operation of the SOC is at a high level. If the vehicle is ignited to start the engine at the moment, the MCU detects that the work of the SOC is a high level after the reset and restart, and the SOC cannot be powered off and restarted. When the SOC finishes starting, a power-off instruction is found, the pin state of the SOC is pulled down to power off, but the restarting process of the MCU is missed, so that the starting processes of the SOC and the MCU are abnormal, and the vehicle is in a shutdown stuck state, so that the vehicle is in a black screen dead halt.
Therefore, after the MCU is started, the MCU determines that the power-off flag bit does not exist, and indicates that the starting of the MCU is the restarting of the MCU after the vehicle is awakened, the SOC is started before the starting process is completed, the MCU once reaches the power-off instruction to the SOC and the SOC does not successfully execute the power-off instruction, at the moment, the current state of the SOC needs to be ignored, the SOC is powered off and restarted to finish the starting process of the SOC, the condition that the power is turned off according to the power-off instruction after the SOC is started and the restarting process of the MCU is missed is avoided, and the risk that the vehicle machine is in the starting process and the vehicle machine is in black screen crash due to the fact that the vehicle machine cannot be normally powered on is reduced.
S30: and after the SOC is controlled to be powered off and restarted, the MCU clears the power-off flag bit.
After the SOC is controlled to be powered off and restarted, the MCU needs to clear a power-off flag bit stored in the electrified erasable programmable read-only memory so as to prevent the vehicle machine from being used normally due to the fact that the SOC is powered off and restarted again according to the power-off flag bit after the MCU is restarted next time.
In the embodiment, after the MCU of the vehicle machine is started, the MCU determines whether a power-off flag bit exists, wherein the power-off flag bit is a flag bit recorded when the MCU sends a power-off command to the SOC of the vehicle machine; after the MCU is started, different vehicle-mounted unit starting strategies are executed according to the existence condition of the power-off flag bit, if the power-off flag bit exists, the SOC is started before and is not started, and the MCU once reaches the power-off command to the SOC and the SOC does not successfully execute the power-off command, at the moment, the SOC is restarted in a power-off mode, the starting process of the SOC is ended, the power-off command is cleared, the possibility that the MCU restarting process is missed due to the fact that the power is turned off according to the power-off command after the SOC is started is reduced, and therefore the risk that the vehicle-mounted unit is shut down due to the fact that the vehicle-mounted unit cannot be normally powered on in the starting process is reduced.
In an embodiment, as shown in fig. 2, before step S10, that is, before the MCU determines whether the power-off flag exists, the method specifically includes the following steps:
s11: the MCU determines whether an initial wake-up signal is received, wherein the initial wake-up signal is a wake-up signal sent by a vehicle bus when a vehicle door of a vehicle is opened.
Before the MCU determines whether the power-off zone bit exists, the MCU determines whether an initial wake-up signal is received, wherein the initial wake-up signal is a wake-up signal sent by a vehicle bus when a vehicle door of a vehicle is opened.
S12: and if the initial wake-up signal is determined to be received, the MCU enters a normal working state.
And if the MCU determines to receive the initial wake-up signal sent by the vehicle bus, the MCU enters a normal working state.
For example, when a user opens a vehicle door through a key, the bus network on the vehicle sends a wakeup signal of the vehicle to the MCU of the vehicle through the CAN message, and the MCU is woken up after receiving the wakeup signal and starts to enter a normal operating state.
S13: and the MCU controls the SOC to start.
After the MCU enters a normal working state, the MCU controls the power supply of the SOC to supply power to the SOC so as to start the SOC.
S14: the MCU determines whether a complete vehicle sleep signal is received.
After the MCU controls the SOC to start, the MCU determines whether a whole vehicle sleep signal is received, wherein the whole vehicle sleep signal is used for enabling a whole vehicle including a vehicle machine to sleep.
And if the MCU does not receive the whole vehicle sleep signal, the MCU and the SOC execute a normal vehicle starting process so that the vehicle is started.
S15: and if the MCU receives the whole vehicle sleep signal, the MCU sends a power-off instruction to the SOC.
After the MCU controls the SOC to start, if the MCU receives a whole vehicle sleep signal, the MCU sends a power-off instruction to the SOC.
In addition, after the SOC is started, if the MCU receives a whole vehicle sleep signal, the MCU sends a screen closing instruction to the SOC through the serial port bus, and after the SOC receives the screen closing instruction, the power supply of the display screen is immediately cut off, so that the display screen of the vehicle machine is closed.
S16: and the MCU records and stores the power-off flag bit.
When the MCU sends a power-off instruction to the SOC, the MCU records the power-off zone bit to the electrified erasable programmable read-only memory so that the electrified erasable programmable read-only memory stores the power-off zone bit.
In the embodiment, before the MCU determines whether the power-off flag bit exists, the MCU determines whether an initial wake-up signal is received or not, wherein the initial wake-up signal is a wake-up signal sent by a vehicle bus when a vehicle door of a vehicle is opened; the method further refines the acquisition process of the power-off zone bit, and after the SOC is controlled to be started, if a whole vehicle sleep signal is received, the power-off instruction is sent to the SOC, and the power-off zone bit is recorded and stored, so that a basis is provided for the follow-up MCU restart and the control logic for judging the SOC according to the power-off zone bit, the possibility that the MCU restart process is missed due to the fact that the power-off is carried out according to the power-off instruction after the SOC is started is reduced, and the risk that the vehicle machine is halted and the screen is blacked due to the fact that the vehicle machine cannot be normally powered on is reduced.
In addition, an initial wake-up signal is sent to the MCU when the vehicle door is opened, so that the vehicle is awakened to enter a working state in advance, the SOC is controlled to be started, the vehicle machine completes a starting process in advance, a user can use the vehicle machine quickly after getting on the vehicle, and the vehicle using experience of the user is improved.
In an embodiment, as shown in fig. 2, after step S16, that is, after the MCU records and stores the power-off flag, the method specifically further includes the following steps:
s17: the MCU determines whether an engine ignition signal or a whole vehicle wake-up signal is received;
after the MCU records and stores the power-off zone bit, the MCU determines whether an engine ignition signal or a whole vehicle wake-up signal is received.
And if the MCU does not receive an engine ignition signal or a finished automobile awakening signal, the MCU normally works, and executes the vehicle machine sleep process according to the power-off instruction after the SOC is started.
S18: and if an engine ignition signal or a finished automobile wake-up signal is received, resetting and restarting the MCU.
After the MCU records and stores the power-off zone bit, if an engine ignition signal or a whole vehicle awakening signal is received, the MCU resets and restarts to power off and restart the SOC according to the power-off zone bit after the MCU restarts, so that the vehicle machine can be normally powered on, and the risk of the vehicle machine being halted and a black screen due to the fact that the vehicle machine cannot be normally powered on is reduced.
In the embodiment, after the MCU records and stores the power-off flag bit, the MCU determines whether an engine ignition signal or a whole vehicle awakening signal is received, if the engine ignition signal or the whole vehicle awakening signal is received, the MCU resets and restarts, the implementation steps of the MCU after the power-off flag bit is stored are further refined, a basis is provided for the subsequent MCU to control the SOC power-off restart according to the existence of the power-off flag bit, the vehicle machine can be normally powered on, the possibility that the MCU restart process is missed due to the power-off according to the power-off instruction after the SOC is started is reduced, and the risk that the vehicle machine is shut down and has a black screen due to the fact that the vehicle machine cannot be normally powered on is further reduced.
In an embodiment, as shown in fig. 3, after the SOC is started, the method specifically further includes the following steps:
s201: and the SOC feeds back a real-time working state to the MCU.
After the SOC finishes starting, the SOC entering the normal working state feeds back the real-time working state of the SOC to the MCU through the GPIO port, so that the MCU can know the working state of the SOC at any time to determine whether the SOC is in the normal working state.
S202: and the MCU receives the working state fed back by the SOC in real time.
And the MCU receives the working state fed back by the SOC in real time.
S203: the MCU determines whether the working state is normal;
and after receiving the working state fed back by the SOC in real time, the MCU determines whether the working state of the SOC is normal or not according to the working state fed back by the SOC in real time.
S204: and if the working state is abnormal, the MCU controls the SOC to reset and restart.
If the MCU determines that the working state of the SOC is abnormal, the MCU controls the SOC to reset and restart so as to enable the SOC to enter a normal working state.
In this embodiment, after the SOC is started, the SOC feeds back the real-time working state to the MCU, the MCU receives the working state fed back by the SOC in real time and determines whether the working state is normal, and if the working state of the SOC is abnormal, the MCU controls the SOC to reset and restart, so that the SOC enters the normal working state, thereby reducing the possibility that the vehicle device cannot be started normally due to the abnormal working state of the SOC.
In an embodiment, as shown in fig. 3, after the MCU determines whether the operating state is normal, the method further includes the following steps:
s205: if the working state is normal, the MCU determines whether an engine ignition signal is received.
If the MCU determines that the working state of the SOC is normal, the MCU determines whether an engine of the vehicle is ignited, if the engine of the vehicle is ignited, the vehicle bus network sends an engine ignition signal to the MCU through the CAN message, so that the vehicle machine is started so that a user CAN use the vehicle machine.
S206: and the MCU sends a screen lightening signal to the SOC so that the SOC lightens the display screen of the vehicle machine after receiving the screen lightening signal.
After the MCU determines that the engine ignition signal is received, the MCU sends a screen lightening signal to the SOC through the serial port, so that after the SOC receives the screen lightening signal, the SOC supplies power to the display screen to lighten the display screen of the vehicle machine, the vehicle machine completes a starting process, and the vehicle machine enters a normal working state.
In the embodiment, after the MCU determines whether the working state is normal, if the working state is normal, the MCU determines whether the engine of the vehicle is ignited, if the engine of the vehicle is ignited, the MCU determines that the ignition signal of the vehicle is received, and the MCU sends the screen-on signal to the SOC, so that the SOC receives the screen-on signal and then lights the display screen of the vehicle, further refining the step of starting the vehicle after the SOC starts.
In an embodiment, after the car machine is started, the method specifically further includes the following steps:
s31: the MCU determines whether the vehicle is turned off.
After the vehicle machine is started and enters a working state, the MCU determines whether the vehicle is flameout in real time.
S32: and if the vehicle is flamed out, the MCU controls the SOC to turn off a display screen of the vehicle machine.
If the MCU determines that the vehicle is flamed out, after the MCU detects a flameout instruction, the MCU sends a screen turn-off instruction to the SOC through the serial port bus, so that the SOC receives the turn-off instruction to immediately cut off the power supply of the display screen, and the display screen of the vehicle machine is turned off.
S33: the MCU determines whether a whole vehicle sleep signal is received within a preset time length.
After the vehicle is flamed out and the MCU controls the SOC to close the display screen of the vehicle machine, the MCU determines whether a whole vehicle sleep signal is received within a preset time length.
S34: and if the whole vehicle sleep signal is received within the preset time, the MCU controls the vehicle machine to sleep.
After the vehicle is flamed out, the MCU controls the SOC to close the display screen of the vehicle machine, if the CAN bus on the vehicle is dormant within the preset time, the bus network on the vehicle sends a dormancy signal to the MCU of the vehicle machine through the CAN message, and at the moment, the MCU determines that the MCU receives a complete vehicle dormancy signal within the preset time, and then the MCU controls the vehicle machine to be dormant according to the complete vehicle dormancy signal.
For example, the preset time is 15 minutes, after the vehicle is turned off, the MCU controls the SOC to turn off a display screen of the vehicle, the MCU receives a whole vehicle sleep signal within 15 minutes, and the MCU controls the vehicle to sleep according to the whole vehicle sleep signal.
S35: if the whole vehicle sleep signal is not received within the preset time and the engine ignition signal is not received, the MCU determines that the vehicle is in an abnormal state and controls the vehicle machine to sleep.
When the vehicle is flameout, after the MCU controls the SOC to close the display screen of the vehicle machine, the whole vehicle sleep signal is not received within the preset time, and the engine ignition signal is not received, the meter MCU determines that the vehicle is in an abnormal state, and the MCU controls the vehicle machine to sleep for protecting the safety of the vehicle.
For example, the preset time is 15 minutes, after the vehicle is turned off, the MCU controls the SOC to turn off the display screen of the vehicle, the MCU receives the vehicle sleep signal within 15 minutes, and does not receive the engine ignition signal for restarting the vehicle, and then the MCU determines that the vehicle is in an abnormal state, and the MCU performs sleep.
In this embodiment, the preset time duration of 15 minutes is only an exemplary illustration, and in other embodiments, the preset time duration may be other time durations, which is not described herein again.
In the embodiment, after the vehicle is started, the MCU determines whether the vehicle is turned off, if the vehicle is turned off, the MCU controls the SOC to turn off the display screen of the vehicle, and if the MCU determines whether the vehicle sleep signal is received within the preset time period, and if the vehicle sleep signal is received within the preset time period, the MCU controls the vehicle to sleep, and if the vehicle sleep signal is not received within the preset time period and the engine ignition signal is not received, the MCU determines that the vehicle is in an abnormal state, and controls the vehicle to sleep, so that a shutdown process of the vehicle is defined, a shutdown process of the vehicle is optimized, and safety of the vehicle is improved.
In an embodiment, the MCU controls the car machine to sleep, which specifically includes the following steps:
s341: and the MCU sends a power-off instruction to the SOC.
And after the MCU receives the whole vehicle sleep signal within a preset time length or the MCU determines that the vehicle is in an abnormal state, the MCU sends a power-off instruction to the SOC through the serial port, so that the SOC stores vehicle related data according to the power-off instruction and returns a power-off instruction after storing the vehicle related data.
S342: the SOC stores the vehicle-related data after receiving the power-down command and returns the power-down command after storing the vehicle-related data.
After receiving the power-off command, the SOC carries out protection storage on the vehicle related data, and after the vehicle related data are stored, the SOC returns the power-off command to the MCU through the serial port, so that the MCU cuts off the power supply of the SOC after receiving the power-off command.
S343: the MCU receives the power-down instruction and cuts off the SOC power supply according to the power-down instruction.
And after receiving the power-down instruction, the MCU cuts off the power supply of the SOC according to the power-down instruction.
S344: and the MCU enters a sleep state to enable the vehicle machine to sleep.
After the power supply of the SOC is cut off according to the power-off instruction, the MCU also enters a sleep state so as to enable the vehicle machine to sleep.
In the embodiment, the MCU sends a power-off instruction to the SOC, the SOC stores vehicle related data and returns a power-off instruction after storing the vehicle related data after receiving the power-off instruction, the MCU receives the power-off instruction, cuts off an SOC power supply according to the power-off instruction and enters a sleep state to enable the vehicle to sleep, detailed steps of controlling the vehicle to sleep by the MCU are detailed, and the vehicle related data are stored in the process of controlling the vehicle to sleep by the MCU, so that the safety of the vehicle data is protected.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, an MCU is provided, and the MCUs correspond to the car machine control methods in the above embodiments one to one. As shown in fig. 4, the MCU includes a determination module 401, a restart module 402, and a purge module 403. The functional modules are explained in detail as follows:
a determining module 401, configured to determine, by an MCU of a vehicle, whether a power-off flag exists after the MCU of the vehicle is turned on, where the power-off flag is a flag recorded when the MCU sends a power-off instruction to an SOC of the vehicle;
a restart module 402, configured to, if the power-off flag exists, ignore the current state of the SOC by the MCU, and control the SOC to perform power-off restart so as to complete the start of the vehicle machine;
and a clearing module 403, configured to clear the power-off flag by the MCU after the SOC power-off restart is completed.
Further, before the MCU determines whether the power-off flag bit exists, the determining module 401 is further specifically configured to:
determining whether an initial wake-up signal is received, wherein the initial wake-up signal is a wake-up signal sent by a vehicle bus when a vehicle door of a vehicle is opened;
if the initial wake-up signal is determined to be received, the MCU enters a normal working state;
controlling the SOC to start;
determining whether a full vehicle sleep signal is received;
if the whole vehicle sleep signal is received, sending a power-off instruction to the SOC;
and recording and storing the power-off zone bit.
Further, after the power-off flag is recorded and stored, the restart module 402 is further specifically configured to:
determining whether an engine ignition signal or a whole vehicle wake-up signal is received;
and if the engine ignition signal or the whole vehicle wake-up signal is received, resetting and restarting.
Further, after the SOC is started, the MCU further includes a determination module 401 specifically configured to determine whether the SOC is started
Receiving the working state fed back by the SOC in real time;
determining whether the working state is normal;
and if the working state is abnormal, the MCU controls the SOC to reset and restart.
Further, after the vehicle machine is started, the MCU further includes a sleep module, and the sleep module is specifically configured to:
determining whether the vehicle is turned off;
if the vehicle is flamed out, controlling the SOC to close a display screen of the vehicle machine;
determining whether a whole vehicle sleep signal is received within a preset time length;
if the whole vehicle sleep signal is received within the preset time length, controlling the vehicle machine to sleep;
and if the whole vehicle sleep signal is not received within the preset time and the engine ignition signal is not received, determining that the vehicle is in an abnormal state, and controlling the vehicle machine to sleep.
Further, the sleep module is further specifically configured to:
sending a power-off instruction to the SOC, so that the SOC stores vehicle related data according to the power-off instruction and returns a power-off instruction after the vehicle related data are stored;
receiving the power-down instruction and cutting off the SOC power supply according to the power-down instruction;
and entering a dormant state to enable the car machine to be dormant.
For specific definition of the MCU, reference may be made to the above definition of the vehicle control method, which is not described herein again. The various modules in the MCU described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, an MCU is provided that includes a processor, a memory connected by a system bus. Wherein the processor of the MCU is configured to provide computational and control capabilities. The memory of the MCU comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The computer program is executed by a processor to realize the vehicle-mounted machine control method.
In one embodiment, as shown in fig. 5, there is provided an MCU, including a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
after the MCU of the vehicle machine is started, the MCU determines whether a power-off flag bit exists, wherein the power-off flag bit is a flag bit recorded when the MCU sends a power-off instruction to the SOC of the vehicle machine;
if the power-off flag bit exists, the MCU ignores the current state of the SOC, and controls the SOC to perform power-off restart so as to finish the start of the vehicle machine;
and after the SOC is powered off and restarted, the MCU clears the power-off zone bit.
In one embodiment, a readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, performs the steps of:
after the MCU of the vehicle machine is started, the MCU determines whether a power-off flag bit exists, wherein the power-off flag bit is a flag bit recorded when the MCU sends a power-off instruction to the SOC of the vehicle machine;
if the power-off flag bit exists, the MCU ignores the current state of the SOC, and controls the SOC to perform power-off restart so as to finish the start of the vehicle machine;
and after the SOC is powered off and restarted, the MCU clears the power-off zone bit.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. The utility model provides a car machine control method which characterized in that includes:
after the MCU of the vehicle machine is started, the MCU determines whether a power-off zone bit exists, wherein the power-off zone bit is a zone bit recorded when the MCU sends a power-off instruction to the SOC of the vehicle machine;
if the power-off flag bit exists, the MCU ignores the current state of the SOC and controls the SOC to perform power-off restart so as to finish the start of the vehicle machine;
and after the SOC is controlled to be powered off and restarted, the MCU clears the power-off zone bit.
2. The in-vehicle machine control method according to claim 1, wherein before the MCU determines whether the power-down flag bit exists, the method further comprises:
the MCU determines whether an initial wake-up signal is received, wherein the initial wake-up signal is a wake-up signal sent by a vehicle bus when a vehicle door of a vehicle is opened;
if the initial wake-up signal is determined to be received, the MCU enters a normal working state;
the MCU controls the SOC to start;
the MCU determines whether a whole vehicle sleep signal is received;
if the whole vehicle sleep signal is received, the MCU sends a power-off instruction to the SOC;
and the MCU records and stores the power-off zone bit.
3. The vehicle machine control method according to claim 2, wherein after recording and storing the power-off flag, the method further comprises:
the MCU determines whether an engine ignition signal or a whole vehicle wake-up signal is received;
and if the engine ignition signal or the whole vehicle wake-up signal is received, resetting and restarting the MCU.
4. The on-board unit control method according to claim 3, wherein after the SOC finishes starting, the method further comprises:
the MCU receives the working state fed back by the SOC in real time;
the MCU determines whether the working state is normal or not;
and if the working state is abnormal, the MCU controls the SOC to reset and restart.
5. The vehicle machine control method according to any one of claims 1 to 4, wherein after the vehicle machine is started, the method further comprises:
the MCU determines whether the vehicle is flameout;
if the vehicle is flamed out, the MCU controls the SOC to close a display screen of the vehicle machine;
the MCU determines whether a whole vehicle sleep signal is received within a preset time length or not;
if the whole vehicle sleep signal is received within the preset time length, the MCU controls the vehicle machine to sleep;
and if the whole vehicle sleep signal is not received within the preset time and the engine ignition signal is not received, the MCU determines that the vehicle is in an abnormal state and controls the vehicle machine to sleep.
6. The vehicle-mounted device control method according to claim 5, wherein the MCU controls the vehicle-mounted device to sleep, and comprises:
the MCU sends a power-off instruction to the SOC, so that the SOC stores vehicle related data according to the power-off instruction and returns a power-off instruction after the vehicle related data are stored;
the MCU receives the power-down instruction and cuts off the SOC power supply according to the power-down instruction;
and the MCU enters a sleep state so as to enable the vehicle machine to sleep.
7. An MCU, comprising:
the system comprises a determining module and a judging module, wherein the determining module is used for determining whether a power-off zone bit exists after an MCU of the vehicle machine is started, and the power-off zone bit is a zone bit recorded when the MCU sends a power-off instruction to the SOC of the vehicle machine;
the restarting module is used for ignoring the current state of the SOC and controlling the SOC to perform power-off restarting so as to finish the vehicle machine starting if the power-off flag bit exists;
and the clearing module is used for clearing the power-off zone bit after controlling the SOC to carry out power-off restart.
8. An MCU, comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps of the car machine control method according to any one of claims 1 to 6 when executing the computer program.
9. The utility model provides a car machine of vehicle which characterized in that includes: SOC and MCU according to claim 7 or 8.
10. A readable storage medium storing a computer program, wherein the computer program is used for implementing the steps of the car machine control method according to any one of claims 1 to 6 when being executed by a processor.
CN202010496048.1A 2020-06-03 2020-06-03 Vehicle machine control method, MCU and storage medium Active CN113759762B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010496048.1A CN113759762B (en) 2020-06-03 2020-06-03 Vehicle machine control method, MCU and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010496048.1A CN113759762B (en) 2020-06-03 2020-06-03 Vehicle machine control method, MCU and storage medium

Publications (2)

Publication Number Publication Date
CN113759762A true CN113759762A (en) 2021-12-07
CN113759762B CN113759762B (en) 2023-04-14

Family

ID=78783387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010496048.1A Active CN113759762B (en) 2020-06-03 2020-06-03 Vehicle machine control method, MCU and storage medium

Country Status (1)

Country Link
CN (1) CN113759762B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116300780A (en) * 2022-09-07 2023-06-23 广州汽车集团股份有限公司 Component configuration method, device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957806A (en) * 2012-11-16 2013-03-06 东莞宇龙通信科技有限公司 Method and device for restarting mobile phone
CN106353781A (en) * 2016-12-01 2017-01-25 东风电子科技股份有限公司 Beidou terminal device based on multi-chip cooperative work and control method
CN106959868A (en) * 2016-11-02 2017-07-18 惠州市德赛西威汽车电子股份有限公司 The upgrade method of vehicle-mounted software
CN107193555A (en) * 2017-05-04 2017-09-22 广州视源电子科技股份有限公司 The method for restarting and device of electric equipment
CN107199891A (en) * 2017-05-23 2017-09-26 北京新能源汽车股份有限公司 Fuel cell car power-on and power-off control method, entire car controller and electric automobile
CN110704119A (en) * 2019-10-15 2020-01-17 东风小康汽车有限公司重庆分公司 Pre-starting method, device and system for vehicle-mounted audio-video entertainment system and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957806A (en) * 2012-11-16 2013-03-06 东莞宇龙通信科技有限公司 Method and device for restarting mobile phone
CN106959868A (en) * 2016-11-02 2017-07-18 惠州市德赛西威汽车电子股份有限公司 The upgrade method of vehicle-mounted software
CN106353781A (en) * 2016-12-01 2017-01-25 东风电子科技股份有限公司 Beidou terminal device based on multi-chip cooperative work and control method
CN107193555A (en) * 2017-05-04 2017-09-22 广州视源电子科技股份有限公司 The method for restarting and device of electric equipment
CN107199891A (en) * 2017-05-23 2017-09-26 北京新能源汽车股份有限公司 Fuel cell car power-on and power-off control method, entire car controller and electric automobile
CN110704119A (en) * 2019-10-15 2020-01-17 东风小康汽车有限公司重庆分公司 Pre-starting method, device and system for vehicle-mounted audio-video entertainment system and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116300780A (en) * 2022-09-07 2023-06-23 广州汽车集团股份有限公司 Component configuration method, device, electronic equipment and storage medium
CN116300780B (en) * 2022-09-07 2024-01-23 广州汽车集团股份有限公司 Component configuration method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113759762B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
EP1717664B1 (en) Computer circuit
US20030085689A1 (en) Power management system and method for an automobile
CN112208470B (en) Method for realizing low power consumption of equipment and vehicle-mounted terminal
US6401163B1 (en) Apparatus and method for rewriting data from volatile memory to nonvolatile memory
CN113759762B (en) Vehicle machine control method, MCU and storage medium
KR20200056838A (en) Communication system for vehicle and control method of the same
EP1944691A2 (en) Electronic engine control apparatus having improved configuration for ensuring excellent engine startability
CN112081701B (en) Protection control method, device and equipment for starter and storage medium
US20230202454A1 (en) Power conservation control method and apparatus for vehicle, and readable storage medium
CN108241361B (en) Vehicle power supply control method, controller and vehicle
CN115009187A (en) Parking power supply management method and system
CN115139937B (en) Power-on and power-off time sequence control method of vehicle-mounted controller and vehicle-mounted controller
CN113306513B (en) Infotainment system for vehicle, control method of infotainment system and vehicle
CN115402108A (en) Method and device for controlling power-on time sequence, new energy agitating lorry and medium
CN112208333B (en) Remote operation method for reducing vehicle storage battery feed
CN115437859A (en) Dormancy awakening processing method and device, electronic equipment and storage medium
CN111456875B (en) Idle speed start-stop control method and device, controller and computer readable storage medium
US5928296A (en) Method of controlling engine starting of vehicle having powertrain control module
US7853768B2 (en) Electronic control apparatus and method for writing backup data in electronic control apparatus
CN115503720A (en) Vehicle control unit resetting driving method and device, computer equipment and storage medium
CN115641896A (en) Data protection method, system and storage medium under vehicle-mounted multimedia ACC power circulation
CN115202743A (en) Vehicle-mounted system capable of being rapidly started and stopped and rapid starting and stopping method of vehicle-mounted system
WO2023168953A1 (en) Ota power-on refresh control method and system for vehicle
CN117698602A (en) Power management method of ECU, electronic control unit, system and vehicle
US20220300274A1 (en) Program update control apparatus, program update control method, and computer-readable storage 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
GR01 Patent grant
GR01 Patent grant