A flashing device, a flashing device control method and a computer readable storage medium
Patent Information
- Application Number
- CN202610841649.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-11
- Publication Date
- 2026-08-28
AI Technical Summary
[0003]本申请提供一种刷写设备、刷写设备控制方法及计算机可读存储介质,以解决或缓解上述描述的问题
Smart Images

Figure CN122653673A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and in particular to a flashing device, a flashing device control method, and a computer-readable storage medium. Background Technology
[0002] In the automotive industry, it may be necessary to flash or update the firmware of multiple devices (such as electronic control units) on a vehicle simultaneously. However, when using manual serial flashing to flash or update the firmware of multiple devices on a vehicle, the relevant technologies are not only inefficient and prone to errors, but also prone to physical wear and poor contact due to frequent plugging and unplugging. Summary of the Invention
[0003] This application provides a writing device, a writing device control method, and a computer-readable storage medium to solve or alleviate the problems described above.
[0004] In a first aspect, this application provides a flashing device, comprising: a main control module, configured to receive a mode switching instruction and execute corresponding control logic according to the mode switching instruction; and a switch module, connected to the main control module, configured to select an internal switch connector for conduction under the control logic of the main control module, and dynamically configure the firmware flashing signal path of the object to be flashed according to the functional mode corresponding to the mode switching instruction; wherein the object to be flashed includes an electronic control unit, and the functional mode includes at least one of firmware distribution mode, parallel flashing mode, and standard communication mode.
[0005] Compared with related technologies, this flashing device has at least the following advantages: By controlling the switch module through the main control module to select the internal switch connector for conduction, it can select a functional mode from firmware distribution mode, parallel flashing mode and standard communication mode to dynamically configure the firmware flashing signal path of the object to be flashed. Thus, only the functional mode switching needs to be done through the control logic, eliminating the need for frequent manual plugging and unplugging, reducing physical wear of the interface and the frequency of poor contact. Moreover, switching the functional mode through the control logic is more efficient and has a lower error rate than manual plugging and unplugging.
[0006] In one possible implementation, the flashing device further includes: an interface expansion module connected to the switch module for expanding the target communication port; a storage management module connected to the switch module for dividing the built-in storage chip into multiple independent logical units and enumerating the multiple independent logical units as multiple independent disks on a host computer; and at least one downlink communication port connected to the switch module for establishing a physical connection with the object to be flashed; wherein, in the firmware distribution mode, the control logic of the main control module includes: controlling the switch module to enable the switch connector between the interface expansion module and the storage management module to be connected; in the parallel flashing mode, the control logic of the main control module includes: controlling the switch module to enable the switch connector between the storage management module and the downlink communication port to be connected; and in the standard communication mode, the control logic of the main control module includes: controlling the switch module to enable the switch connector between the interface expansion module and the downlink communication port to be connected. Therefore, this application can establish a multi-channel concurrent architecture for automotive flashing, integrating three different functional modes—firmware distribution mode, parallel flashing mode, and standard communication mode—on a single flashing device. This not only allows for dynamic configuration of multiple firmware flashing signal paths, transforming the serial flashing process into parallel flashing and shortening the total time for batch flashing tasks on multiple flashing devices, but also enables switching between different functional modes by controlling the switch module through the main control module to select the internal switch connector for conduction. This reduces the number of manual plugging and unplugging operations, decreases physical wear on the interface, and reduces the number and types of flashing devices required in the workshop, thereby lowering overall costs.
[0007] In one possible implementation, the firmware flashing signal path dynamically configured in the firmware distribution mode includes: a switch connector between the interface expansion module and the storage management module is connected, and an external device can identify the multiple independent disks to distribute the firmware corresponding to the object to be flashed to the built-in storage chip; or, the firmware flashing signal path dynamically configured in the parallel flashing mode includes: a switch connector between the storage management module and the downlink communication port is connected, each downlink communication port is independently connected to the built-in storage chip, and the built-in storage chip serves as the flashing source for the object to be flashed; or, the firmware flashing signal path dynamically configured in the standard communication mode includes: a switch connector between the interface expansion module and the downlink communication port is connected, and each target communication port is independently connected to a downlink communication port. Therefore, this application can establish a multi-channel concurrent architecture for automotive flashing, integrating three different functional modes—firmware distribution mode, parallel flashing mode, and standard communication mode—on a single flashing device. This not only allows for dynamic configuration of multiple firmware flashing signal paths, transforming the serial flashing process into parallel flashing and shortening the total time for batch flashing tasks on multiple flashing devices, but also enables switching between different functional modes by controlling the switch module through the main control module to select the internal switch connector for conduction. This reduces the number of manual plugging and unplugging operations, decreases physical wear on the interface, and reduces the number and types of flashing devices required in the workshop, thereby lowering overall costs.
[0008] In one possible implementation, the main control module, the switch module, the interface expansion module, and the storage management module are connected via at least one of an integrated circuit bus, a serial peripheral interface, a universal asynchronous transceiver, and a universal input / output interface. Therefore, the main control module can communicate with the switch module, the interface expansion module, and the storage management module in various ways.
[0009] In one possible implementation, the writing device further includes a mode switching module, connected to the main control module via a general-purpose input / output interface, for generating the mode switching command via a physical button, a DIP switch, or by receiving it from a host computer. Therefore, this application can generate mode switching commands via a physical button, directly via a DIP switch, or receive mode switching commands from a host computer and transmit them to the main control module, so that the main control module can control the switching module to achieve the switching selection of different functional modes.
[0010] In one possible implementation, the flashing device further includes a power module, connected to the main control module via at least one of an integrated circuit bus, a serial peripheral interface, and a universal asynchronous transceiver, for providing power; wherein the power module integrates at least one of overcurrent protection logic, overvoltage protection logic, and hot-swap control logic. Therefore, by incorporating a power module into the flashing device, this application can provide a stable power supply to the flashing device, and by integrating overcurrent protection logic, overvoltage protection logic, and / or hot-swap control logic within the power module, it can ensure the power safety of each port in the flashing device.
[0011] In one possible implementation, the writing device further includes a status indicator module, connected to the main control module via at least one of an integrated circuit bus, a serial peripheral interface, and a universal asynchronous transceiver, for displaying the current functional mode and / or writing status, including success, failure, or in progress. Therefore, this application can display the current functional mode of the writing device in real time via the status indicator module, and can also display the writing status in real time, such as in progress, success, or failure.
[0012] In one possible implementation, the status indication module includes at least one of a light-emitting diode, a buzzer, or a display screen. Therefore, this application can display the functional mode and / or write status in various ways.
[0013] In one possible implementation, the interface expansion module is formed from a Universal Serial Bus (USB) hub. Therefore, this application can use a USB hub to form an interface expansion module, thereby expanding the USB (Universal Serial Bus) port.
[0014] In one possible implementation, the switch connector is formed by a multiplexer. Therefore, this application can use a multiplexer to form the switch connector, thereby dynamically configuring the path of the USB data signal under the control of the main control module and switching between different functional modes.
[0015] Secondly, this application provides a method for controlling a flashing device, the method comprising the following steps: receiving a mode switching instruction; determining a corresponding functional mode according to the mode switching instruction, and dynamically configuring the firmware flashing signal path of the object to be flashed according to the determined functional mode; wherein, the functional mode includes at least one of firmware distribution mode, parallel flashing mode and standard communication mode.
[0016] Compared with related technologies, this flashing device control method has at least the following advantages: it can select one functional mode from firmware distribution mode, parallel flashing mode and standard communication mode to dynamically configure the firmware flashing signal path of the object to be flashed, so that only the functional mode needs to be switched through control logic, without the need for frequent manual plugging and unplugging, reducing physical wear of the interface and reducing the frequency of poor contact; moreover, switching the functional mode through control logic is more efficient and has a lower error rate than manual plugging and unplugging.
[0017] Thirdly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described brushing device control method. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0019] In the attached diagram: Figure 1 This is a schematic diagram of the hardware structure of a brushing device provided in one embodiment of this application; Figure 2 This is a schematic diagram of the hardware structure of a writing device provided in another embodiment of this application; Figure 3 A schematic diagram of the hardware structure of a brushing device provided in yet another embodiment of this application; Figure 4 This is a schematic diagram of the signal flow of a writing device provided in one embodiment of this application; Figure 5 This is a schematic diagram of a single USB switch array connection provided in one embodiment of this application; Figure 6 This is a flowchart illustrating a brushing device control method provided in one embodiment of this application. Detailed Implementation
[0020] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0021] It is understood that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0022] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the present application. However, it will be apparent to those skilled in the art that embodiments of the present application may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the present application.
[0023] The inventors discovered that in the automotive manufacturing and repair field, it may be necessary to simultaneously flash or update the firmware of multiple ECUs (Electronic Control Units) in a vehicle. Related technologies employ a manual, serial flashing method, where an operator uses a USB flash drive to copy the firmware from a PC (Personal Computer) and then sequentially inserts it into the USB (Universal Serial Bus) interface of each ECU to flash or update the firmware. This manual serial flashing method is not only inefficient and error-prone, but frequent plugging and unplugging can also lead to physical wear and poor contact at the interfaces. The inventors also discovered that while related technologies utilize USB hubs (USB HUBs) for firmware flashing or updating, connecting multiple ECUs to a PC via a single USB hub, the PC typically recognizes each connected ECU as an independent USB device, requiring separate processing by the flashing software, resulting in complex management. Furthermore, this method cannot meet the requirement of "one-time distribution and parallel independent flashing," meaning the PC cannot simultaneously and quickly distribute firmware to multiple internal storage media. Furthermore, the inventors discovered that while some USB switches allow a single USB device to be switched between multiple hosts, or their variants allow a single host to use multiple devices, they are designed for sharing external devices such as keyboards, mice, and printers. Their switching logic is simple (e.g., based on relays or analog switches), typically only switching data signals (D+ / D-), neglecting fine-grained power management, resulting in poor compatibility and stability when connecting complex devices such as ECUs. The inventors also found that while related technologies improve the switching method, their core function remains solving the problem of device sharing between hosts, without optimizing the architecture for the specific scenario of "firmware distribution-parallel flashing"; or focusing on data export rather than flashing, failing to address the core issue of independent concurrent control of multiple channels.
[0024] In an exemplary embodiment of this application, as Figure 1 As shown, this embodiment provides a writing device, including: The main control module receives mode switching commands and executes corresponding control logic accordingly. In some examples, the main control module acts as the brain or core of the flashing device and can be composed of an MCU (Microcontroller Unit). For example, a microcontroller with an ARM Cortex-M core can be used as the main control module. It is responsible for executing the firmware program, receiving mode switching commands, and controlling the coordinated operation of other modules within the flashing device. In some examples, the main control module may be referred to as the main control MCU or the device's main controller MCU.
[0025] A switch module, connected to the main control module, is used to select the internal switch connector for conduction under the control logic of the main control module, and dynamically configure the firmware flashing signal path of the object to be flashed according to the functional mode corresponding to the mode switching instruction. The object to be flashed includes an electronic control unit, and the functional mode includes at least one of firmware distribution mode, parallel flashing mode, and standard communication mode. In some examples, the switch connector inside the switch module is formed by a multiplexer, such as a multiplexer supporting USB 3.0 and above protocols. In some examples, the switch module can be composed of USB switch chips, for example, a switch module composed of USB switch chips with a transmission speed higher than the standard speed and a transmission loss lower than the standard loss. In some examples, a switch module composed of USB switch chips can also be called a USB switch array or a USB switching switch array. If the switch module is composed of USB switch chips, the switch module can dynamically configure the transmission path of USB data signals under the control of the main control module, thereby forming different functional modes.
[0026] Therefore, this application controls the switch module through the main control module to select the internal switch connector for conduction. It can select one of the functional modes from firmware distribution mode, parallel flashing mode and standard communication mode to dynamically configure the firmware flashing signal path of the object to be flashed. Thus, only the functional mode switching needs to be done through the control logic, without the need for frequent manual plugging and unplugging, reducing physical wear of the interface and reducing the frequency of poor contact. Moreover, switching the functional mode through the control logic is more efficient and has a lower error rate than manual plugging and unplugging.
[0027] In some exemplary embodiments, such as Figure 2As shown, the flashing device may further include: an interface expansion module, a storage management module, and at least one downlink communication port. Specifically, the interface expansion module, connected to the switch module, is used to expand the target communication port; wherein, the target communication port includes a universal serial bus communication port or a USB port. The storage management module, connected to the switch module, is used to divide the built-in storage chip into multiple independent logical units, and to enumerate the multiple independent logical units as multiple independent disks on the host computer. At least one downlink communication port, connected to the switch module, is used to establish a physical connection with the object to be flashed. Specifically, in firmware distribution mode, the control logic of the main control module includes: controlling the switch module to enable the switch connector between the interface expansion module and the storage management module to conduct; in parallel flashing mode, the control logic of the main control module includes: controlling the switch module to enable the switch connector between the storage management module and the downlink communication port to conduct; in standard communication mode, the control logic of the main control module includes: controlling the switch module to enable the switch connector between the interface expansion module and the downlink communication port to conduct.
[0028] In some exemplary embodiments, the firmware flashing signal path dynamically configured in firmware distribution mode includes: the switch connector between the interface expansion module and the storage management module is turned on, and the external device can identify multiple independent disks to distribute the firmware corresponding to the object to be flashed to the built-in storage chip; or, the firmware flashing signal path dynamically configured in parallel flashing mode includes: the switch connector between the storage management module and the downlink communication port is turned on, each downlink communication port is independently connected to the built-in storage chip, and the built-in storage chip serves as the flashing source for the object to be flashed; or, the firmware flashing signal path dynamically configured in standard communication mode includes: the switch connector between the interface expansion module and the downlink communication port is turned on, and each target communication port is independently connected to a downlink communication port.
[0029] In some examples, the interface expansion module can be formed from a Universal Serial Bus (USB) hub. For instance, the interface expansion module can be composed of a USB hub controller, with its uplink port connected to the uplink interface of an external device (e.g., a PC), and its downlink ports connected to the inputs of the storage management module and the switching module (or USB switch array), respectively. In some examples, the interface expansion module can also be formed from a docking station or a port replicator, with the docking station's uplink port connected to the uplink interface of an external device (e.g., a PC), and its downlink ports connected to the inputs of the storage management module and the switching module, respectively.
[0030] In some examples, the storage management module can consist of multiple Logical Unit Number (LUN) storage controllers. Each LUN storage controller can manage one built-in storage chip and configure the built-in storage chip as multiple independent logical units, thereby enumerating them as multiple independent disks on the PC. The built-in storage chip includes, but is not limited to, eMMC (Embedded Multi Media Card) and NAND Flash (non-volatile flash memory using NAND gate structures).
[0031] In some examples, the downlink communication port can be a Universal Serial Bus downlink interface, or simply a USB downlink port.
[0032] In some examples, in firmware distribution mode, the main control module connects the interface expansion module and the storage management module via a control switch module, enabling external devices to recognize multiple independent disks. In other words, the main control module connects the interface expansion module and the storage management module through the control switch module, entering firmware distribution mode, allowing external devices to write firmware to the built-in storage chips via the storage management module. For example, a PC can recognize multiple independent disks via a standard USB storage driver, and the operator can copy firmware from different ECUs to their respective disks in parallel, or distribute the same firmware in batches to multiple independent built-in storage chips via software. Therefore, the flashing device can quickly distribute firmware from a single PC interface to multiple built-in storage chips simultaneously, and the one-time accurate firmware distribution via PC avoids human error, while also preventing physical insertion and removal wear on the built-in storage chips.
[0033] In some examples, in parallel flashing mode, the main control module uses a control switch module to connect the switch connector between the storage management module and the downlink communication port, allowing each downlink communication port to connect independently to the built-in storage chip. In other words, the main control module independently connects the storage management module to all downlink communication ports via the control switch module, entering parallel flashing mode. This allows the device to be flashed to read firmware data from the built-in storage chip in parallel through the downlink communication ports and begin flashing in parallel without interference. When the device to be flashed is an ECU, this can significantly shorten the total time for batch flashing of multiple ECUs, thus transforming the serial flashing process on the automotive production line into parallel flashing.
[0034] In some examples, in standard communication mode, the main control module connects the interface expansion module to the downlink communication port via a control switch module, allowing each target communication port to connect independently to a downlink communication port. In other words, the main control module connects the interface expansion module to the downlink communication port via the control switch module, entering standard communication mode, which allows each target communication port to connect independently to a downlink communication port, thus enabling the flashing device to operate as a standard Universal Serial Bus hub.
[0035] Therefore, this application can establish a multi-channel concurrent architecture for automotive flashing, integrating three different functional modes—firmware distribution mode, parallel flashing mode, and standard communication mode—on a single flashing device. This not only allows for dynamic configuration of multiple firmware flashing signal paths, transforming the serial flashing process into parallel flashing and shortening the total time for batch flashing tasks across multiple flashing devices, but also enables switching between different functional modes by controlling the switch module through the main control module to select the internal switch connector for conduction. This reduces manual plugging and unplugging, minimizes physical wear on the interface, and reduces the number and types of flashing devices required in the workshop, thus lowering overall costs. Furthermore, when the target to be flashed is an ECU, the main control module intelligently switches the functional modes through the switch module, allowing multiple ECUs to simultaneously and independently read firmware from their corresponding storage units and complete the flashing process, effectively functioning as a regular USB hub. Therefore, this application provides a dedicated USB device solution that can efficiently, reliably, and automatically distribute firmware to multiple targets simultaneously and support parallel flashing.
[0036] In some exemplary embodiments, the main control module is connected to the switch module, interface expansion module, and storage management module via at least one of the following: Inter-Integrated Circuit (IIC or I2C), Serial Peripheral Interface (SPI), Universal Asynchronous Receiver / Transmitter (UART), and General Purpose Input / Output (GPIO). Therefore, the main control module can communicate with the switch module, interface expansion module, and storage management module in various ways.
[0037] In some exemplary embodiments, such as Figure 2As shown, the flashing device may further include a mode switching module, which is connected to the main control module via a general-purpose input / output interface, for generating mode switching commands via physical buttons, DIP switches, or by receiving commands from a host computer. Therefore, this application can generate mode switching commands via physical buttons, directly via DIP switches, or receive mode switching commands from a host computer and transmit them to the main control module, so that the main control module can control the switching module to achieve the switching selection of different functional modes.
[0038] In some exemplary embodiments, such as Figure 2 As shown, the flashing device may further include: a power module, connected to the main control module via at least one of an integrated circuit bus, a serial peripheral interface, and a universal asynchronous transceiver, for providing power; wherein the power module integrates at least one of overcurrent protection logic, overvoltage protection logic, and hot-swap control logic. In some examples, the power module may also be referred to as an intelligent power management circuit or a power management IC. Therefore, by incorporating a power module into the flashing device, this application can provide a stable power supply to the flashing device, and by integrating overcurrent protection logic, overvoltage protection logic, and / or hot-swap control logic within the power module, the power safety of each port in the flashing device can be ensured.
[0039] In some exemplary embodiments, such as Figure 2 As shown, the flashing device may further include a status indicator module, connected to the main control module via at least one of an integrated circuit bus, a serial peripheral interface, and a universal asynchronous transceiver, for displaying the current functional mode and / or flashing status, including success, failure, or in progress. Therefore, this application can display the current functional mode of the flashing device in real time through the status indicator module, and can also display the flashing status in real time, such as in progress, success, or failure, thereby facilitating the operator's understanding of the flashing progress, reducing the difficulty of firmware flashing operations, and minimizing the risk of errors.
[0040] In some examples, the status indicator module includes at least one of a light-emitting diode (LED), a buzzer, or a display screen. Therefore, this application can display the functional mode and / or write status in various ways. As an example, the status indicator module can be composed of an LED display screen.
[0041] In an exemplary embodiment of this application, as Figure 3 As shown, a writing / brushing device is provided, comprising: The physical button, serving as a mode switching module, is connected to the device's main controller MCU via GPIO.
[0042] The device's main controller MCU, as the main control module, is connected to the USB_HUB controller via at least one of I2C, SPI, UART, and GPIO, and is also connected to the USB switching array via at least one of I2C, SPI, UART, and GPIO.
[0043] The LED display screen, as a status indication module, is connected to the device's main controller MCU via at least one of I2C, SPI, and UART.
[0044] The power management IC, as a power module, connects to the device's main controller MCU via at least one of I2C, SPI, and UART to provide power and integrates overcurrent protection (OCP), overvoltage protection (OVP), and hot-swap control functions to ensure the power safety of each port.
[0045] The USB uplink port serves as an uplink communication port, connecting to external devices (such as PCs) and communicating with the USB HUB controller via the USB protocol.
[0046] The USB_HUB controller, as an interface expansion module, connects to the USB switching array via a USB linear array.
[0047] The USB switching array, acting as a switching module, is connected to at least one USB downstream port and at least one LUN storage controller. Each LUN storage controller is also connected to a built-in storage chip. At least one LUN storage controller serves as a storage management module; the USB downstream port serves as a downstream communication port.
[0048] Specifically, when using this flashing device to flash or update the firmware of an ECU in a car, power can be supplied through a power management IC. A mode switching command is generated by a physical button. The device's main controller MCU receives and responds to this mode switching command, determines the current functional mode, and executes control logic according to the determined functional mode. It selects the multiplexer that needs to be turned on from the multiplexers inside the USB switching array, entering at least one of the following modes: firmware distribution mode, parallel flashing mode, and standard communication mode. The signal flow of the flashing device in firmware distribution mode, parallel flashing mode, and standard communication mode is as follows: Figure 4 As shown.
[0049] If the flashing device needs to switch to firmware distribution mode, the signal path for firmware distribution mode is as follows: Figure 4Mode 1. In this mode, the device's main controller (MCU) controls the USB switching array, switching all the multiplexers of the USB_HUB controller towards the storage controller; simultaneously, it controls the multiplexers of the storage controller port to switch towards the USB_HUB controller, thus establishing communication between the USB_HUB and the built-in storage chip. The PC recognizes multiple independent disks through a standard USB memory driver. The operator can copy firmware from different ECUs to their respective independent disks in parallel, or distribute the same firmware in batches to multiple independent built-in storage chips via software. A connection diagram of a single USB switch array within the USB switching array is shown below. Figure 4 As shown.
[0050] If the flashing device needs to switch to parallel flashing mode, the signal path for parallel flashing mode is as follows: Figure 4 In Mode 2, the device's main controller (MCU) controls the USB switching array to switch the multiplexer of the storage controller port to the USB downstream port and vice versa. This ensures that each USB downstream port has an independent signal channel with the built-in storage chip, allowing each chip to connect independently to its designated port. The ECU to be flashed is connected to each downstream port via a USB connector. After each ECU is powered on, it can directly identify the corresponding built-in storage chip as its flashing source using a standard USB memory identification driver, initiating parallel flashing without interference.
[0051] If the flashing device needs to switch to standard communication mode, the signal path in standard communication mode is as follows: Figure 4 Mode 3. In this mode, the device's main controller (MCU) controls the USB switching array, switching all multiplexers of the USB_HUB controller to the USB downstream port, and all multiplexers of the USB downstream port to the USB_HUB controller; this allows multiple USB signal interfaces of the USB_HUB controller to be independently connected to a single USB downstream port. Simultaneously, external devices connected to the external USB flash drive interface, as well as some built-in storage controllers (configurable as needed), can be enumerated and recognized by the PC, allowing the flashing device to be used as a standard USB_HUB. This standard communication mode can also be referred to as HUB mode.
[0052] Therefore, this flashing device can rapidly distribute firmware from a single PC interface to multiple built-in storage chips simultaneously. Through intelligent switching, it enables multiple ECUs to simultaneously and independently read firmware from their respective built-in storage chips and complete the flashing process, while also functioning as a standard USB hub. Furthermore, the flashing device can intelligently control the USB switch array and USB hub controller via the main control MCU to construct a dynamically reconfigurable USB signal path network. This seamlessly integrates three different functional modes—firmware distribution mode, parallel flashing mode, and standard communication mode—on a single flashing device. By integrating the functions of a firmware distributor, parallel flasher, and USB hub into a unified design, the number and types of flashing devices required in the workshop are reduced, thus lowering overall costs. This flashing device not only transforms the traditional serial flashing process into parallel flashing, significantly shortening the total time for batch flashing tasks of multiple ECUs, but also accurately distributes firmware via PC in one go, avoiding human error and reducing physical insertion and removal losses of built-in storage chips. Simultaneously, the power supply, integrated with circuit logic (such as overcurrent protection logic, overvoltage protection logic, and / or hot-swap control logic), enhances the stability of the flashing device in complex industrial environments. Furthermore, the current operating mode and flashing status (such as in progress, successful, failed) are displayed in real time via LEDs, buzzers, or a screen, allowing operators to easily understand the flashing progress, reducing the difficulty of flashing operations, and minimizing the risk of errors. Therefore, based on MCU-based intelligent control, this flashing device achieves flexible switching of functional modes and real-time monitoring of flashing status, solving the problems of poor compatibility and unknowable status in traditional switchers. Moreover, by combining multi-LUN storage virtualization with independent channel switching, the contradiction between one-time distribution and parallel flashing can be resolved, forming a multi-channel concurrent architecture for automotive flashing, achieving truly efficient parallel processing.
[0053] In an exemplary embodiment of this application, as Figure 6 As shown, a method for controlling the writing device in some of the above embodiments is provided, including the following steps: S610, receives mode switching commands; S620 determines the corresponding functional mode according to the mode switching instruction, and dynamically configures the firmware flashing signal path of the object to be flashed according to the determined functional mode; wherein, the functional mode includes at least one of firmware distribution mode, parallel flashing mode and standard communication mode.
[0054] Therefore, this method can dynamically configure the firmware flashing signal path of the object to be flashed by selecting one of the functional modes: firmware distribution mode, parallel flashing mode, and standard communication mode. Thus, the functional mode can be switched only through control logic, eliminating the need for frequent manual plugging and unplugging, reducing physical wear of the interface, and decreasing the frequency of poor contact. Moreover, switching the functional mode through control logic is more efficient and has a lower error rate than manual plugging and unplugging.
[0055] In an exemplary embodiment of this application, a method for controlling the writing device in some of the above embodiments is provided, comprising the following steps: Receive mode switching instructions and determine the current function mode as firmware distribution mode based on the received mode switching instructions; In response to the firmware distribution mode, the control switch module connects the interface expansion module and the storage management module, so that external devices can write firmware to the built-in storage chip through the storage management module.
[0056] In some examples, if the current functional mode is firmware distribution mode, the main control module connects the interface expansion module and the storage management module via the control switch module, enabling external devices to recognize multiple independent disks. In other words, the main control module connects the interface expansion module and the storage management module via the control switch module, entering firmware distribution mode, allowing external devices to write firmware to the built-in storage chips through the storage management module. For example, a PC can recognize multiple independent disks via a standard USB storage driver, and the operator can copy firmware from different ECUs to their respective disks in parallel, or distribute the same firmware in batches to multiple independent built-in storage chips via software. Therefore, after controlling the flashing device to enter firmware distribution mode, it is possible to quickly distribute firmware from a single PC interface to multiple built-in storage chips simultaneously. Furthermore, the accurate one-time firmware distribution via PC avoids human error, and the built-in storage chips can avoid physical insertion and removal wear.
[0057] In some examples, if the current functional mode is firmware distribution mode, the signal path for firmware distribution mode is as follows: Figure 4 Mode 1. In this mode, the device's main controller (MCU) controls the USB switching array, switching all the multiplexers of the USB_HUB controller towards the storage controller; simultaneously, it controls the multiplexers of the storage controller port to switch towards the USB_HUB controller, thus establishing communication between the USB_HUB and the built-in storage chip. The PC recognizes multiple independent disks through a standard USB memory driver. The operator can copy firmware from different ECUs to their respective independent disks in parallel, or distribute the same firmware in batches to multiple independent built-in storage chips via software. A connection diagram of a single USB switch array within the USB switching array is shown below. Figure 4 As shown.
[0058] In an exemplary embodiment of this application, a method for controlling the writing device in some of the above embodiments is provided, comprising the following steps: Receive mode switching instructions and determine the current function mode as parallel flashing mode based on the received mode switching instructions; In response to the parallel flashing mode, the control switch module independently connects the storage management module to multiple downlink communication ports, so that the device to be flashed can read the firmware data in the built-in storage chip in parallel through the downlink communication ports.
[0059] In some examples, if the current functional mode is parallel flashing mode, the main control module controls the switch module to connect the switch connector between the storage management module and the downlink communication port, allowing each downlink communication port to connect independently to the built-in storage chip. In other words, the main control module independently connects the storage management module to all downlink communication ports via the control switch module, entering parallel flashing mode. This allows the device to be flashed to read firmware data from the built-in storage chip in parallel through the downlink communication port and begin parallel flashing without interference. When the device to be flashed is an ECU, this can significantly shorten the total time for batch flashing of multiple ECUs, thus transforming the serial flashing process on the automotive production line into parallel flashing.
[0060] In some examples, if the current functional mode is parallel write mode, the signal path for parallel write mode is as follows: Figure 4 In Mode 2, the device's main controller (MCU) controls the USB switching array to switch the multiplexer of the storage controller port to the USB downstream port and vice versa. This ensures that each USB downstream port has an independent signal channel with the built-in storage chip, allowing each chip to connect independently to its designated port. The ECU to be flashed is connected to each downstream port via a USB connector. After each ECU is powered on, it can directly identify the corresponding built-in storage chip as its flashing source using a standard USB memory identification driver, initiating parallel flashing without interference.
[0061] In an exemplary embodiment of this application, a method for controlling the writing device in some of the above embodiments is provided, comprising the following steps: Receive mode switching instructions and determine the current functional mode as standard communication mode based on the received mode switching instructions; In response to the standard communication mode, the control switch module connects the interface expansion module to the downlink communication port, enabling the flashing device to operate as a standard Universal Serial Bus hub.
[0062] In some examples, if the current functional mode is standard communication mode, the main control module connects the interface expansion module and the downlink communication port via the control switch module, allowing each target communication port to connect independently to a downlink communication port. In other words, the main control module connects the interface expansion module to the downlink communication port via the control switch module, entering standard communication mode, which allows each target communication port to connect independently to a downlink communication port, thus enabling the flashing device to operate as a standard universal serial bus hub.
[0063] In some examples, if the current functional mode is standard communication mode, the signal path of standard communication mode is as follows: Figure 4 Mode 3. In this mode, the device's main controller (MCU) controls the USB switching array, switching all multiplexers of the USB_HUB controller to the USB downstream port, and all multiplexers of the USB downstream port to the USB_HUB controller; thus, multiple USB signal interfaces of the USB_HUB controller are independently connected to a single USB downstream port. Simultaneously, external devices connected to the external USB flash drive interface, as well as some built-in storage controllers (configurable as needed), can be enumerated and recognized by the PC, allowing the flashing device to be used as a standard USB_HUB. This standard communication mode can also be referred to as HUB mode.
[0064] It is understood that the flashing device control method provided in this embodiment controls the flashing device described in some of the above embodiments and belongs to the same concept as the flashing device provided in the above embodiments. The specific functional modules of the flashing device have been described in detail in the above embodiments. Therefore, the specific process of the flashing device control method flashing the firmware of the object to be flashed according to the firmware distribution mode, parallel flashing mode or standard communication mode can be referred to some of the above embodiments, and will not be repeated here.
[0065] In an exemplary embodiment of this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, can perform the functions described in this application. Figure 6 The steps of the brushing device control method are shown.
[0066] Those skilled in the art will understand that all or part of the processes in the brushing device control method in the above embodiments can be implemented by a computer program instructing related hardware. The mentioned computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the brushing device control method described above. Any references to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0067] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A writing / brushing device, characterized in that, The writing device includes: The main control module is used to receive mode switching instructions and execute corresponding control logic according to the mode switching instructions; A switch module, connected to the main control module, is used to select the internal switch connector for conduction under the control logic of the main control module, and dynamically configure the firmware flashing signal path of the object to be flashed according to the functional mode corresponding to the mode switching instruction; wherein, the object to be flashed includes an electronic control unit, and the functional mode includes at least one of firmware distribution mode, parallel flashing mode, and standard communication mode.
2. The writing device according to claim 1, characterized in that, The writing device also includes: An interface expansion module, connected to the switch module, is used to expand the target communication port; A storage management module, connected to the switch module, is used to divide the built-in storage chip into multiple independent logical units and enumerate the multiple independent logical units into multiple independent disks on the host computer. At least one downlink communication port is connected to the switch module for establishing a physical connection with the object to be written; In the firmware distribution mode, the control logic of the main control module includes: controlling the switch module to enable the switch connector between the interface expansion module and the storage management module to be connected; In the parallel write mode, the control logic of the main control module includes: controlling the switch module to enable the switch connector between the storage management module and the downlink communication port to be turned on; In the standard communication mode, the control logic of the main control module includes: controlling the switch module to enable the switch connector between the interface expansion module and the downlink communication port to be connected.
3. The writing device according to claim 2, characterized in that, The firmware flashing signal path dynamically configured in the firmware distribution mode includes: the switch connector between the interface expansion module and the storage management module is turned on, and the external device can identify the multiple independent disks to distribute the firmware corresponding to the object to be flashed to the built-in storage chip. Alternatively, the firmware flashing signal path dynamically configured in the parallel flashing mode includes: the switch connector between the storage management module and the downlink communication port is turned on, each downlink communication port is independently connected to the built-in storage chip, and the built-in storage chip serves as the flashing source for the object to be flashed; Alternatively, the firmware flashing signal path dynamically configured in the standard communication mode includes: the switch connector between the interface expansion module and the downlink communication port is turned on, and each target communication port is independently connected to a downlink communication port.
4. The writing device according to claim 3, characterized in that, The main control module is connected to the switch module, the interface expansion module, and the storage management module through at least one of the following: integrated circuit bus, serial peripheral interface, universal asynchronous transceiver, and universal input / output interface.
5. The writing device according to any one of claims 1 to 4, characterized in that, The writing device also includes a mode switching module, which is connected to the main control module through a general input / output interface, and is used to generate the mode switching command through a physical button, a DIP switch or by receiving it from a host computer.
6. The writing device according to any one of claims 1 to 4, characterized in that, The flashing device further includes a power module, which is connected to the main control module via at least one of an integrated circuit bus, a serial peripheral interface, and a universal asynchronous transceiver, for providing power; wherein the power module integrates at least one of overcurrent protection logic, overvoltage protection logic, and hot-swap control logic.
7. The writing device according to any one of claims 1 to 4, characterized in that, The flashing device further includes a status indicator module, which is connected to the main control module via at least one of an integrated circuit bus, a serial peripheral interface, and a universal asynchronous transceiver, for displaying the current function mode and / or flashing status, including success, failure, or in progress.
8. The writing device according to claim 2 or 3, characterized in that, The interface expansion module is formed by a Universal Serial Bus hub; and / or, the switch connector is formed by a multiplexer.
9. A method for controlling a writing / brushing device, characterized in that, The method includes the following steps: Receive mode switching command; The corresponding functional mode is determined according to the mode switching instruction, and the firmware flashing signal path of the object to be flashed is dynamically configured according to the determined functional mode; wherein, the functional mode includes at least one of firmware distribution mode, parallel flashing mode and standard communication mode.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the brushing device control method of claim 9.