CN-116701111-B - Method, device, equipment and storage medium for monitoring state of register of drive chip
Abstract
The invention provides a method, a device, equipment and a storage medium for monitoring the state of a register of a driving chip, wherein the method comprises the following steps: the key register is monitored when the driving chip is operated, namely, the driving chip is reset when the written value and the read value are inconsistent by acquiring the written value and the read value of the register of the driving chip, so that the consistency of the read and write values of the register of the driving chip is ensured, the working state of the register can be monitored in real time within a certain period of power-on of the driving chip, and the abnormal state of the register can be processed to ensure that a pulse width modulation signal is output.
Inventors
- CHEN YU
Assignees
- 深蓝汽车科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20230531
Claims (7)
- 1. The method for monitoring the state of the register of the driving chip is characterized by comprising the steps of obtaining a writing value and a reading value of the register of the driving chip; setting monitoring set time, and timing a monitoring event to obtain a first monitoring timing time; If the first monitoring timing time is smaller than the monitoring setting time, determining the consistency state of the written value and the read value so as to monitor the register; After the monitoring setting time is set, the method for monitoring the state of the driving chip register further comprises the steps of determining the type of a motor mode if the monitoring timing time is greater than or equal to the monitoring setting time, sending a preset motor control instruction with a mapping relation with the type of the motor mode according to the type of the motor mode, wherein the type of the motor mode comprises a non-torque mode and a torque mode, the preset motor control instruction comprises a reset instruction and a fault reporting instruction, wherein if the motor mode is the non-torque mode, the reset instruction is sent, the driving chip is reset, the monitoring timing time is cleared, and if the motor mode is the torque mode, the fault reporting instruction is sent to a server.
- 2. The method of claim 1, wherein after determining a status of consistency of a write value with a read value, the method of monitoring driver chip register status further comprises ending a register monitoring event if the write value is equal to the read value; And if the writing value is larger or smaller than the reading value, triggering the driving chip to reset.
- 3. The method for monitoring the status of a driver chip register according to claim 1 or 2, wherein resetting the driver chip comprises setting a power-down delay time and disconnecting power to the driver chip; timing the restarting time of the driving chip to obtain restarting timing time; And if the restart timing time is longer than the power-down delay time, pulling up the power supply of the driving chip.
- 4. The method for monitoring the status of a driver chip register according to claim 1 or 2, further comprising, after resetting the driver chip, timing a monitor event to obtain a second monitor timing time; And if the second monitoring timing time is smaller than the monitoring setting time, judging the register monitoring state through the written value and the read value until the written value is judged to be equal to the read value, and ending the register monitoring event.
- 5. The device for monitoring the state of the register of the driving chip is characterized by comprising an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring a writing value and a reading value of the driving chip; The timing module is used for setting monitoring set time and timing the monitoring event to obtain first monitoring timing time; The monitoring module is used for determining the consistency state of the writing value and the reading value to monitor the register if the first monitoring timing time is smaller than the monitoring setting time, determining the type of a motor mode after the monitoring setting time is set, sending a preset motor control instruction with a mapping relation with the type of the motor mode according to the type of the motor mode if the monitoring timing time is larger than or equal to the monitoring setting time, wherein the type of the motor mode comprises a non-torque mode and a torque mode, the preset motor control instruction comprises a reset instruction and a reporting fault instruction, sending the reset instruction to reset the driving chip if the motor mode is the non-torque mode, and clearing the monitoring timing time if the motor mode is the torque mode, and sending the reporting fault instruction to the server.
- 6. An apparatus, the apparatus comprising: One or more processors; Storage means for storing one or more programs which when executed by the one or more processors cause the apparatus to implement the method of monitoring driver-chip register status as claimed in any one of claims 1 to 4.
- 7. A computer readable storage medium, having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the method of monitoring the status of a driver-chip register of any one of claims 1 to 4.
Description
Method, device, equipment and storage medium for monitoring state of register of drive chip Technical Field The present invention relates to the field of motor driving chips, and in particular, to a method, an apparatus, a device, and a storage medium for monitoring a status of a register of a driving chip. Background Current control of IGBTs (InsulatedGateBipolarTransistor, insulated gate bipolar transistors) typically requires control of the IGBT drive chip by SPI commands to ensure proper PWM output. However, in actual production and application processes, due to the defect that the SPI communication loop is longer and the anti-interference performance of the driving chip is weaker, sometimes the situation that the value written into the register of the driving chip is inconsistent with the value actually read out can occur, so that the IGBT state is abnormal and PWM (PulseWidthModulation ) cannot be output correctly. The bulletin number is CN103944144A, which discloses a method for detecting IGBT fault state by software, comprising a digital signal processor DSP, an isolation driving fault protection circuit, a fault detection signal synthesis circuit and an IGBT driving H bridge. The fault detection signal synthesis circuit detects each fault state of the IGBT drive H bridge, synthesizes each fault state, and sends each fault state and the synthesized total fault state into the DSP, and the DSP completes detection and protection of the fault state through a software detection algorithm. The method does not monitor the register state of the IGBT driving chip in real time, and when the state of the IGBT driving chip is abnormal, the condition that PWM cannot be output still exists. Disclosure of Invention The invention provides a method, a device, equipment and a storage medium for monitoring the state of a register of a driving chip, which are used for solving the technical problem that the register cannot be monitored in real time. The method for monitoring the state of the driving chip register comprises the steps of obtaining a writing value and a reading value of the driving chip register, setting monitoring setting time, timing a monitoring event to obtain first monitoring timing time, and determining the consistency state of the writing value and the reading value if the first monitoring timing time is smaller than the monitoring setting time so as to monitor the register. In an embodiment of the present invention, after determining the consistency status of the write value and the read value, the method for monitoring the status of the driver chip register further includes ending the register monitoring event if the write value is equal to the read value, and triggering the driver chip to reset if the write value is greater than or less than the read value. In an embodiment of the present invention, after setting the monitoring setting time, the method for monitoring the status of the driving chip register further includes determining a type of a motor mode if the monitoring timing time is greater than or equal to the monitoring setting time, and sending a preset motor control command having a mapping relationship with the type of the motor mode according to the type of the motor mode, where the type of the motor mode includes a non-torque mode and a torque mode. In an embodiment of the present invention, according to the type of the motor mode, a preset motor control instruction having a mapping relation with the type of the motor mode is sent, where the preset motor control instruction includes a reset instruction, and includes: and if the motor mode is a non-torque mode, sending a reset instruction, resetting the driving chip, and resetting the monitoring timing time. In an embodiment of the present invention, according to the type of the motor mode, a preset motor control instruction having a mapping relation with the type of the motor mode is sent, where the preset motor control instruction includes a report fault instruction, and the method for monitoring the status of the driving chip register further includes sending the report fault instruction and reporting the power module fault to the server if the motor mode is a torque mode. In one embodiment of the invention, resetting the driving chip comprises setting a power-down delay time, disconnecting power supply of the driving chip, timing the restarting time of the driving chip to obtain a restarting timing time, and restarting the driving chip if the restarting timing time is greater than the power-down delay time. In an embodiment of the invention, after resetting the driving chip, the method further comprises the steps of timing a monitoring event to obtain a second monitoring timing time, and judging the register monitoring state through the writing value and the reading value if the second monitoring timing time is smaller than the monitoring setting time until the writing value is equal to the reading value, and ending the register