Printing main control chip and printing method
By using the parallel processing and DMA transmission mechanism of the main CPU core and the printing CPU core in the printing main control chip, the problems of poor printing performance and insufficient adaptability in the existing technology are solved, and high-efficiency and low-energy multi-device adaptation are achieved and dynamic working mode improve the efficiency and applicability of printing tasks.
Patent Information
- Application Number
- CN202210764569.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-06-30
AI Technical Summary
The existing printing master chip has a single structure, poor printing performance, simple interface functions, and fewer printing scenarios, which cannot meet the needs of multiple printing devices, limiting its applicability and user-defined mode use. .
Design a printing main control chip, adopts the main CPU core and the printing CPU core to process the printing tasks in parallel, and realizes the adaptation of multiple printing devices through the DMA transmission mechanism of the printing interface control unit, and has multiple working modes for dynamic adjustment. Power consumption and adapt to different printing task requirements.
It improves the processing efficiency and applicability of printing tasks, so that the printing master chip can be suitable for a variety of printing equipment, reduces power consumption, and supports a variety of dynamic working modes to meet low-energy consumption needs.
Smart Images

Figure CN115079965B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to printing master control chip technology, and in particular to a printing master control chip and a printing method. Background Art
[0002] The printer's main control chip is the core component of the printer's main board or hard disk. It is the bridge between the various units of the printer and the brain that controls the operation of the printer.
[0003] For current printers, due to the lack of knowledge of the internal functional structure of the main control chip and the relatively closed printing system software used, users can only use it according to the specific control program provided, and cannot adapt to the user's set mode. In addition, the printing equipment that is matched with this type of printer main control chip must be customized according to its interface definition. Therefore, the adaptation of this type of printer peripherals has great limitations and cannot be widely promoted.
[0004] Most of the existing printing master control chips have a relatively simple structure, mainly using a single-chip microcomputer plus a field programmable gate array. The printing performance they achieve is poor, and the interface functions are simple, and their skills are only adapted to a few printing scenarios. Summary of the invention
[0005] The present application provides a printing main control chip and a printing method, which are used to improve the printing performance of a printer and make the printing main control chip flexible and versatile.
[0006] On the one hand, the present application provides a printing main control chip, which includes: a main CPU core, a printing CPU core and a printing interface control unit, wherein:
[0007] The main CPU core is used to obtain a print task received by an external device, wherein the print task includes first print data;
[0008] The main CPU core is also used to process the first printing data to obtain second printing data, and store the second printing data in the memory storage unit;
[0009] The printing CPU core is used to load the driver of the printing device and start the DMA transmission mechanism of the printing interface control unit after receiving the wake-up command of the main CPU core;
[0010] The printing interface control unit is used to obtain the second printing data from the memory storage unit based on the DMA transmission mechanism, and transmit the second printing data to the printing device through a printing device interface that is communicatively connected to the printing interface control unit.
[0011] In another possible implementation, the printing CPU core is further used for:
[0012] If it is determined that the next printing task is not obtained within the first preset time after the main CPU core is started or within the first preset time after the previous printing task is completed, the main CPU core is shut down to put the chip into a standby state.
[0013] In another possible implementation, the printing CPU core is further used for:
[0014] After the chip enters the standby state, if it is determined that the next printing task is not obtained within the second preset time period, the main CPU core is powered off, the current system data of the main CPU core is stored in the memory storage unit, and the memory storage unit is controlled to enter the self-refresh mode to prevent the system data from being lost.
[0015] In another possible implementation, the printing CPU core is further used for:
[0016] After the main CPU core is powered off, if it is detected that the external device receives the wake-up command, the main CPU core is powered on again and the main CPU core is woken up so that the main CPU core restarts and enters a standby state.
[0017] In another possible implementation, the printing CPU core is further used for:
[0018] The voltage is restored to normal, and when the printing task sent by the external device is detected again, a reset instruction is sent to the main CPU core to switch the main CPU core from the standby state to the working state.
[0019] In another possible implementation, the main CPU core is further used for:
[0020] When the power is turned on again, the system data is extracted from the memory storage unit and then run, and the driver corresponding to the external device is loaded to obtain the printing task sent by the external device again.
[0021] In another possible implementation, the printing interface control unit is integrated with multiple types of interfaces;
[0022] The printing interface control unit is specifically used to: obtain the interface type of the printing device according to the corresponding identifier of the printing device, obtain the second printing data from the memory storage unit based on the DMA transmission mechanism, and transmit the second printing data to the printing device through the printing device interface corresponding to the interface type.
[0023] In another possible implementation, the chip further includes a transmission controller; the transmission controller includes a network controller and a USB bus controller, and the transmission controller is used to receive the print task from the external device.
[0024] On the other hand, the present application provides a printing method, applied to a main control chip including a main CPU core, a printing CPU core and a printing interface control unit, the method comprising:
[0025] The main CPU core acquires a printing task sent by an external device, wherein the printing task includes first printing data;
[0026] The main CPU processes the first printing data to obtain second printing data, and stores the second printing data in a memory storage unit connected to the main control chip;
[0027] After receiving the wake-up command from the main CPU core, the printing CPU core loads the driver of the printing device and starts the DMA transmission mechanism of the printing interface control unit;
[0028] The printing interface control unit obtains the second printing data from the memory storage unit based on the DMA transmission mechanism, and transmits the second printing data to the printing device through a printing device interface that is communicatively connected to the printing interface control unit.
[0029] In another possible implementation, the method further includes:
[0030] When the printing CPU core detects that the next printing task is not obtained within the first preset time after the main CPU core is started or within the first preset time after the previous printing task is completed, the main CPU core is shut down to put the main CPU core into a standby state.
[0031] In another possible implementation manner, after the main CPU core enters the standby state, the method further includes:
[0032] When the printing CPU core detects that the next printing task has not been obtained within a second preset time period, the main CPU core is powered off, the current system data of the main CPU core is stored in the memory storage unit, and the memory storage unit is controlled to enter a self-refresh mode to prevent the system data from being lost; the system data is used to restore the main CPU core to the state before power failure when it is awakened.
[0033] In another possible implementation, after the main CPU core is powered off, the method further includes:
[0034] When the printing CPU core detects the wake-up command sent by the external device, the main CPU core is controlled to be powered on again and the main CPU core is woken up, so that the main CPU core restarts and enters the standby state.
[0035] In another possible implementation manner, after the main CPU core is restarted to enter the standby state, the method further includes:
[0036] When the printing CPU core detects the printing task sent by the external device again, a reset instruction is sent to the main CPU core to switch the main CPU core from the standby state to the normal working state.
[0037] The present application provides a printing master chip and a printing method, which processes the printing task in a parallel manner of the main CPU core and the printing CPU core. Specifically, the main CPU core is used to obtain the printing task of the external device, process the first printing data included in the printing task, obtain the second printing data and store the second printing data. The printing CPU core is used to realize the transmission of the second printing data by the printing interface control unit, and load the driver of the printing device at the same time. Through the aforementioned printing master chip, when the printing task is obtained, the main CPU core is firstly processed to obtain the second printing data and store the second printing data. Secondly, the printing CPU core starts the DMA transmission mechanism of the printing interface control unit, so that the printing interface control unit transmits the second printing data in the memory to the printing device; so that the printing device can finally complete the printing task based on the driver and the second printing data of the printing device. The parallel manner of the main CPU core and the printing CPU core effectively improves the processing efficiency of the printing task. At the same time, through the printing interface control unit, the printing master chip can be applied to a variety of printer models, that is, the printing master chip has good versatility.
[0038] In addition, when the next print task is not received within the first preset time after the previous print task is completed, the print CPU core shuts down the main CPU core, causing the main CPU core to enter a standby state until the next print task is obtained. If the next print task is still not received within the second preset time, the print CPU core powers off the main CPU core, causing the main CPU core to enter a dormant state. At the same time, the print CPU core switches to a low-frequency and low-voltage mode until the next print task is obtained. Through the above method, after the main control chip is powered on, the print CPU core can dynamically monitor the print task requirements and adjust the status of the main CPU in a timely manner to achieve automatic switching management of multiple dynamic working modes, effectively control the power consumption of the entire main control chip, and help meet the needs of low-energy printing devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] Figure 1 A schematic diagram of the architecture of a printing system provided in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of the structure of a printing main control chip provided in an embodiment of the present application Figure 1 ;
[0042] Figure 3 A schematic diagram of the structure of a printing main control chip provided in an embodiment of the present application Figure 2 ;
[0043] Figure 4 A schematic diagram of a working mode of a main CPU core provided in an embodiment of the present application;
[0044] Figure 5 A method flow chart of a printing method provided in an embodiment of the present application;
[0045] Figure 6 A schematic flow chart of a printing method based on a printing main control chip provided in an embodiment of the present application.
[0046] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0047] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0048] Figure 1 Schematic diagram of the architecture of a printing system provided by an embodiment of the present application. Figure 1 As shown, the system includes a terminal device 101, a main control chip 102 and a printing device 103, wherein the terminal device 101 can be a mobile phone, a computer 101 and a USB device, the terminal device 101 communicates with the main control chip 102 via a wired or wireless network, and the main control chip 102 is arranged on the printing device 103 and can communicate with the printing device 103. Figure 1The terminal device 101 shown is a computer 101. The computer 101 sends a printing task to the main control chip 102. The main control chip 102 enables the printing device 103 to complete printing and output based on the printing task to obtain a printed product.
[0049] For the above-mentioned printing system, due to the lack of understanding of the internal functional structure of the main control chip and the relatively closed printing system software used, users can only use it according to the specific control program provided, and cannot adapt it according to the user's set mode. In addition, the printing equipment used with this type of printing main control chip must be customized according to its interface definition. Therefore, the adaptation of this type of printer peripherals has great limitations and cannot be widely promoted.
[0050] To overcome the above difficulties, the existing printing control chip is often simple in structure, mainly using a single-chip microcomputer plus a field-programmable gate array (FPGA), which has poor printing performance, simple interface functions, and is only suitable for a few printing scenarios. Therefore, the embodiment of the present application provides a printing control chip to improve printing performance and printing efficiency, effectively reduce power consumption, and is suitable for a variety of printing devices.
[0051] The following specific embodiments are used to describe in detail the technical solution of the present invention and how the technical solution of the present invention solves the above technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0052] Figure 2 A schematic diagram of the structure of a printing main control chip provided in this embodiment Figure 1 The following combination Figure 2 , an embodiment of the present application is described in detail. Figure 2 As shown, this embodiment provides a printing main control chip, which has power division inside, unified external power supply, and separate internal power supply for each component. Specifically, the main control chip provided by this embodiment includes a main CPU core, a printing CPU core, and a printing interface control unit, wherein:
[0053] The main CPU core is used to obtain a printing task sent by an external device, where the printing task includes first printing data;
[0054] The main CPU core is also used to process the first printing data to obtain second printing data, and store the second printing data in a memory storage unit connected to the main control chip;
[0055] The print CPU core is used to load the driver of the print device and start the DMA transmission mechanism of the print interface control unit after receiving the wake-up command from the main CPU core;
[0056] The printing interface control unit is used to obtain the second printing data from the memory storage unit based on the DMA transmission mechanism, and transmit the second printing data to the printing device through the printing device interface that is communicatively connected to the printing interface control unit.
[0057] The main CPU core uses a high-performance main CPU large core, and the printing CPU core uses a low-power printing CPU small core. Figure 1 Any terminal device 101 shown transmits the printing task to the main CPU core and the printing CPU core by wired or wireless means. When the main control chip is arranged on the printing device, the printing CPU core identifies the printing device. When the printing CPU core is started or when the main CPU core receives the printing task, the printing CPU core loads the driver corresponding to the printing device based on the identified printing device model, wherein the printing device mainly includes a printing mechanism, and specific types include laser type, LED type, etc. The printing interface control unit can match the interface communication of different printing mechanism models, and at the same time, the internal integrated DMA printing data transmission mechanism can perform real-time transmission of the printing data interface independently of the main CPU core, ensuring the high-speed operation of the printing interface.
[0058] Specifically, when the external device receives a print task, the main CPU core processes the first print data included in the print task to obtain the second print data, and stores the second print data in the memory storage unit, waiting for output. The second print data is data that can be recognized by the printing device. At the same time, the printing CPU core will load the driver of the printing device based on the printing device, and start the DMA transmission mechanism of the printing interface control unit, so that the printing interface control unit obtains the second print data from the memory storage unit based on the DMA transmission mechanism, and outputs the second print data to the printing device through the printing device interface. The printing device will complete the print task based on the driver of the printing device loaded by the printing CPU core and the second print data. When the printing CPU core executes the above process, if there is a next print task, the main CPU core synchronously receives the first print data of the next working cycle for processing, obtains the second print data, and stores the second print data in the memory storage unit, thereby realizing high-performance parallel processing of print data.
[0059] The printing main control chip provided in this embodiment adopts the method of parallel operation of the main CPU core and the printing CPU core, so that when the main control chip receives a printing task, it can promptly process the first printing data and promptly transmit the processed second printing data to the printing device, thereby facilitating the printing device to efficiently complete the printing task, thereby facilitating improving the user experience. At the same time, the printing interface control unit can match different printing devices, effectively improving the applicability of the main control chip.
[0060] In addition, this embodiment adopts a heterogeneous multi-core CPU of different sizes, which can effectively avoid the problem of resource waste caused by multi-core homogeneity while ensuring the performance of the main control chip.
[0061] Figure 3 A schematic diagram of the structure of a printing main control chip provided in this embodiment Figure 2 . Combined Figure 3 , the specific structure of the embodiment of the present application is further described in detail. The main control chip provided in this embodiment includes a memory controller, a transmission controller and an expansion device interface in addition to a main CPU core, a printing CPU core and a printing interface control unit.
[0062] like Figure 3 As shown, the print CPU core and the print interface control unit constitute a print processing unit, and the main CPU core and the print CPU core are both connected to the memory controller, the transmission controller, and the expansion device interface. Among them, the main CPU core and the print processing unit are connected to the memory storage unit through the memory controller, the main CPU core and the print processing unit are connected to the external device through the transmission controller, and the main CPU core and the print processing unit are connected to the expansion device through the expansion device interface.
[0063] Specifically, the transmission controller includes a USB bus controller and a network controller. The main CPU core and the printing CPU core receive printing tasks from the USB host / device through the USB bus controller. The main CPU core and the printing CPU core receive printing tasks transmitted over the network through the network controller.
[0064] The expansion device interfaces include mainstream printing peripheral interfaces such as SDIO, NAND, PWM, ADC, DAC, UART, GPIO, etc. The main CPU core or printing CPU core can realize real-time control of different types of printing devices, including motors, movement heads, temperature control units and other expansion devices / components through mainstream printing peripheral interfaces such as SDIO, NAND, PWM, ADC, DAC, UART, GPIO, etc.
[0065] The printing interface control unit integrates various types of interfaces, and the printing interface control unit is specifically used to: obtain the interface type of the printing device according to the printing device identifier, obtain the second printing data from the first storage unit based on the DMA transmission mechanism, and transmit the second printing data to the printing device through the printing device interface corresponding to the interface type.
[0066] Based on the above-mentioned embodiments, this embodiment further describes the printing CPU core and the main CPU core in detail. Figure 4The following is a schematic diagram of the working mode of a main CPU core provided in an embodiment of the present application. The main CPU core includes three working modes: working state, standby state and sleep state. The adjustment of the working mode of the main CPU core is completed by the printing CPU core. Figure 4 , the conditions for adjusting the three working modes of the main CPU core through the printing CPU core and the status of each part of the main control chip after adjustment are explained in detail.
[0067] 1. Working status
[0068] After the main control chip is powered on, the main CPU core and the printing CPU core are both in the startup state. At this time, if a print task is received, the main control chip enters the working state. When the main control chip is in the working state, the main CPU core and the printing CPU core cooperate with each other to complete the processing of the print task. The specific process is as follows:
[0069] When monitoring a print task transmitted by the transmission controller, the main CPU core processes the first print data contained in the print task, obtains the second print data that can be recognized by the printing device, stores the second print data in the memory storage unit, and sends a transmission command to the print CPU core. After the print CPU core is started or when the main CPU core processes the first print data, based on the type of the printing device, it loads the driver of the printing device and prepares for printing. When receiving the transmission command, the print CPU core starts the DMA transmission mechanism of the print interface control unit, so that the print interface control unit transmits the second print data from the memory storage unit to the printing device based on the DMA transmission mechanism, so that the printing device completes the printing job according to the second print data and the driver of the printing device loaded by the print CPU core. After the printing job is completed, the printing ends and the working state ends. In the above process, monitoring refers to the main CPU core and the printing CPU core monitoring in real time through the network controller and / or the USB bus controller whether the printing task sent by the external device is received. If the network controller and / or the USB bus controller does not receive the printing task, it means that it is detected that there is no printing task at present, and no task instruction is sent to the main CPU core and the printing CPU core. Otherwise, it means that the printing task is detected and the task instruction is sent to the main CPU core and the printing CPU core. When the main CPU core receives the task instruction, it obtains the printing task.
[0070] Since the printing interface control unit integrates the driver of the mainstream printing device in the market, the printing CPU core can directly access and load the printing device driver of the corresponding type of the printing interface control unit when receiving the wake-up command of the main CPU core or when receiving the task instruction, and then wait for the transmission command. The transmission command is sent by the main CPU core after processing the first printing data to obtain the second printing data. When the printing CPU core receives the transmission command, it starts the DMA transmission mechanism of the printing interface control unit.
[0071] Specifically, the main CPU's processing of the first print data may include format conversion processing, decompression processing, or print language parsing processing of the first print data. For example, when a PDF file needs to be printed, the PDF file must first be converted into a specific format, and then converted into second print data that can be recognized by the printing device based on the printing device language parsing software.
[0072] 2. Standby mode
[0073] After the last printing task is completed / the main CPU core is started within the first preset time, if the next printing task is not detected, the main CPU core enters the standby state. Specifically, when the above conditions are met, the printing CPU core controls the main CPU core to shut down, that is, shuts down the main CPU core and the peripheral clock unit (not shown in the figure), etc., so that the main CPU core stops running and enters the standby state, that is, the entire printing device is in standby mode, thereby effectively reducing the overall power consumption.
[0074] Among them, the clock unit of the present application may include a timer and a controller. In this embodiment, the first preset duration is timed by the timer, and the first preset duration is adjustable, and the user can send an adjustment command to the timer through the controller according to the needs. For the embodiment of the present application, within the first preset duration, if the printing CPU core has not received the task instruction sent by the transmission controller, then at the end of the first preset duration, a control command is sent to the main CPU core, and the main CPU core responds to the control command and enters the standby state.
[0075] In the standby state, if the printing CPU core receives a task instruction, it sends a reset instruction to the main CPU core to restart the main CPU core, switching from the standby state to the working state, so that the printing device re-enters the working mode.
[0076] If the next printing task transmitted by the transmission controller is obtained within the first preset time after the previous printing task is completed / the main CPU core is started, the printing CPU core does not shut down the main CPU core. At this time, the printing device is still in the working mode, and the printing CPU core and the main CPU core cooperate to complete the actions when the main CPU core is in the working state.
[0077] 3. Sleep state
[0078] After the main CPU core enters the standby state, if the printing CPU core does not receive a task instruction within the second preset time, a control command is sent to the main CPU to control the main CPU core to power off, store the data of the main CPU core to the memory storage unit, and control the memory storage unit to enter the self-refresh mode. The second preset time is the time when the main CPU core is in the standby state, and the second preset time is adjustable. The user can send an adjustment command to the timer through the controller in the clock unit according to the needs.
[0079] In the dormant state, the printing CPU core completely takes over the control of each functional unit of the main control chip and related peripherals. Specifically, the transmission controller is switched to a low-power monitoring polling mode, that is, it only responds to specific wake-up commands of the transmission controller and shields other communication requests. At the same time, the main CPU core and other functional units inside the main control chip are powered off, the main CPU core operating system is saved in the memory storage unit and enters the self-refresh mode to prevent system data from being lost. Finally, the printing CPU core automatically switches to a low-frequency, low-voltage, and low-energy monitoring mode, and only maintains the transmission controller peripheral wake-up mechanism.
[0080] In the dormant state, if the transmission controller receives a valid wake-up command, the printing CPU core starts to wake up the main control chip. Specifically, the printing CPU core first restores the power supply of other functional units inside the main control chip. After the power supply is restored, the clock gating core reset state of the main control chip is released. The main CPU core is woken up to restart the main CPU core. Finally, the printing CPU core restores the normal voltage and operating frequency, and puts the main control chip into the standby state or working state according to whether there is a printing task demand within the first preset time.
[0081] Optionally, for the above three working modes, after the main CPU core is started, it is judged whether the current mode is in the wake-up mode of the external device, that is, it is determined whether the transmission controller receives a valid wake-up command, and the valid wake-up command is sent by the external device. If so, it is determined that the main CPU core is not in the first power-on state, that is, the printing main control chip of the present application is not in the initial state, but the print CPU core is in the wake-up state monitored by the transmission controller, so there is no need to start the print CPU core again, and no processing is required. If not, it is determined that the main CPU core is in the first power-on state. At this time, the printing main control chip of the present application is in the initial state. The main CPU core needs to send a wake-up command to the print CPU core to control the startup of the print CPU core so that the print CPU core can cooperate with the main CPU core to complete the printing task.
[0082] For the above three working modes, exemplarily, the first preset time length is adjusted to 20 minutes, and the second preset time length is adjusted to 10 minutes. Specifically, after the main CPU core is started or after receiving the task instruction, it sends a first timing command to the controller of the clock unit. When the controller receives the first timing command, it controls the timer to start timing, and the timing cycle is 20 minutes. When the printing CPU core sends a control command to the main CPU core to make the main CPU core enter the standby state, it sends a second timing command to the controller of the clock unit. When the controller receives the second timing command, it controls the timer to start timing, and the timing cycle is 10 minutes.
[0083] Based on the above configuration, within twenty minutes after receiving the last print task or within twenty minutes after the main CPU core is started, if the next print task is not obtained, the print CPU core will shut down the main CPU core and put the main CPU core into a standby state. If the next print task is still not obtained within ten minutes after the main CPU core enters the standby state, the print CPU core will power off the main CPU core to put the main CPU core into a dormant state, store the data of the main CPU core in a memory storage unit, and put the memory storage unit into a self-refresh mode through a memory controller.
[0084] If a print task can be received within twenty minutes after the last print task is received or within twenty minutes after the main CPU core is started, the main CPU core is in a working state and can process the print task.
[0085] If the transmission controller receives a print task within ten minutes after the printing device enters the standby state, the print CPU sends a reset instruction to the main CPU core to make the main CPU core run again, enter the working state, and process the print task.
[0086] After the main CPU core enters the dormant state, if the transmission controller receives a valid wake-up command, the printing CPU core wakes up the main CPU core and the clock unit, that is, restores the power supply to the main CPU core and the clock unit. The awakened main CPU core enters the standby state. Within ten minutes after the main CPU core is in the standby state, if a print task is received, the main CPU core is started. At this time, since the main CPU core is in the peripheral wake-up mode, it means that the printing CPU core is in the start-up state. Therefore, the main CPU core directly enters the working state and processes the print task without sending a wake-up command to the printing CPU core.
[0087] The above-mentioned embodiment introduces a printing main control chip from the perspective of system structure and system use. The following embodiment introduces a printing method from the perspective of method flow. Please refer to the following embodiment for details.
[0088] Figure 5A method flow chart of a printing method provided in an embodiment of the present application, such as Figure 5 As shown, the present application embodiment provides a printing method, which includes step S501, step S502, step S503 and step S504, wherein:
[0089] Step S501, the main CPU core obtains a printing task sent by an external device, where the printing task includes first printing data;
[0090] Step S502, the main CPU processes the first printing data to obtain second printing data, and stores the second printing data in a memory storage unit connected to the main control chip;
[0091] Step S503, after receiving the wake-up command from the main CPU core, the printing CPU core loads the driver of the printing device and starts the DMA transmission mechanism of the printing interface control unit;
[0092] In step S504, the printing interface control unit obtains the second printing data from the memory storage unit based on the DMA transmission mechanism, and transmits the second printing data to the printing device through the printing device interface communicatively connected to the printing interface control unit.
[0093] There is no strict timing relationship between step S502 and step S503, and the two can be performed synchronously.
[0094] Specifically, the external device transmits the received print task to the main CPU core and the printing CPU core. At this time, the printing CPU core loads the driver of the printing device, and the main CPU core processes the first print data contained in the print task to obtain the second print data and stores it in the memory storage unit. Then, the printing interface control unit takes out the second print data from the memory storage unit through the DMA transmission mechanism and transmits it to the corresponding printing device. Finally, the printing device completes the printing of the print task based on the loaded driver and the second print data.
[0095] Through the method provided in this embodiment, when the main CPU core and the printing CPU core obtain the printing task, they divide the work to process the printing task, which effectively improves the efficiency of completing the printing task, thereby helping to improve the user experience. At the same time, the printing interface control unit can be used to match the interface communication of different printer core models, greatly improving the applicability of the main control chip itself.
[0096] Figure 6 A flow chart of a printing method based on a printing main control chip provided in an embodiment of the present application is shown as follows: Figure 6 As shown, the specific process of the printing method based on the printing main control chip is:
[0097] When the main control chip is in the power-on state as a whole, after the main CPU core is started, it is first determined whether the current mode is the peripheral wake-up mode. If not, it means that the main control chip is in the initial state and the main CPU core is powered on for the first time. At this time, the main CPU core sends a wake-up command to the printing CPU core to start the printing CPU core. Secondly, it is determined whether there is a printing task at present. When there is a printing task, the printing CPU core loads the corresponding printing device driver according to the type of printing device it identifies, and prints the printing task based on the second printing data obtained after the printing device driver and the main CPU core process the first printing data until printing is completed.
[0098] After printing is completed, if the next printing task is not received within the first preset time, the printing CPU core shuts down the main CPU core and puts the main CPU core into a standby state. When the main CPU core is in the standby state, the printing CPU core continuously monitors whether there is a printing task in the standby state through the transmission controller. If the printing task is still not received within the second preset time, the printing CPU core controls the main CPU core to power off, and the printing CPU core automatically enters a low-voltage and low-frequency monitoring mode, and the main CPU core enters a dormant state.
[0099] When the main CPU core is in standby mode, if the transmission controller detects a printing task within a second preset time period, the printing CPU core restarts the main CPU core and executes steps after starting the main CPU core.
[0100] When the main CPU core is in sleep mode, the transmission controller monitors whether there is a peripheral wake-up command, and when there is a peripheral wake-up command, sends a system wake-up command to the printing CPU core. After receiving the system wake-up command, the printing CPU core starts the main CPU core and the clock unit, and repeats the steps after starting the main CPU. If there is no peripheral wake-up command, the printing CPU core is still in low-voltage and low-frequency monitoring mode, and monitors the peripheral wake-up command until the peripheral wake-up command is obtained.
[0101] For the system awakened by the printing CPU core, after the main CPU core is started, the result of judging whether it is the peripheral wake-up mode is: it is the peripheral wake-up mode. At this time, it means that the main control chip is not in the initial state, and the printing CPU core is in the startup state, so the step of starting the printing CPU core can be skipped.
[0102] After the main CPU core and the printing CPU core are started, if the result of judging whether there is a printing task at present is: no printing task is received, then directly enter the waiting stage for the first preset time. If a printing task is detected in this stage, repeat the steps of loading the printing control module and subsequent steps.
[0103] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0104] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A printing main control chip, characterized in that: include: Main CPU core, printing CPU core and printing interface control unit; wherein, The main CPU core is used to obtain a print task sent by an external device, wherein the print task includes first print data; The main CPU core is also used to process the first printing data to obtain second printing data, and store the second printing data in a memory storage unit connected to the main control chip; The printing CPU core is used to load the driver of the printing device and start the DMA transmission mechanism of the printing interface control unit after receiving the wake-up command of the main CPU core; The printing interface control unit is used to obtain the second printing data from the memory storage unit based on the DMA transmission mechanism, and transmit the second printing data to the printing device through a printing device interface that is communicatively connected to the printing interface control unit.
2. The chip according to claim 1, characterized in that: The printing CPU core is also used for: If it is monitored that the next printing task is not obtained within the first preset time after the main CPU core is started or within the first preset time after the previous printing task is completed, the main CPU core is shut down to put the main CPU core into a standby state.
3. The chip according to claim 2, characterized in that: The printing CPU core is also used for: After the main CPU core enters the standby state, if it is monitored that the next printing task is not obtained within the second preset time period, the main CPU core is powered off, the current system data of the main CPU core is stored in the memory storage unit, and the memory storage unit is controlled to enter the self-refresh mode to prevent the system data from being lost.
4. The chip according to claim 3, characterized in that: The printing CPU core is also used for: After the main CPU core is powered off, if the wake-up command sent by the external device is detected, the main CPU core is controlled to be powered on again and the main CPU core is woken up, so that the main CPU core restarts and enters the standby state.
5. The chip according to claim 4, characterized in that: The printing CPU core is also used for: The voltage is restored to normal, and when the printing task sent by the external device is detected again, a reset instruction is sent to the main CPU core to switch the main CPU core from the standby state to the working state.
6. The chip according to claim 4, characterized in that: The main CPU core is also used for: When the power is turned on again, the system data is extracted from the memory storage unit and then run, and the driver corresponding to the external device is loaded to obtain the printing task sent by the external device again.
7. The chip according to claim 1, characterized in that: The printing interface control unit is integrated with various types of printing device interfaces; The printing interface control unit is specifically used to: obtain the interface type of the printing device according to the corresponding identifier of the printing device, obtain the second printing data from the memory storage unit based on the DMA transmission mechanism, and transmit the second printing data to the printing device through the printing device interface corresponding to the interface type.
8. The chip according to claim 1, characterized in that: The chip also includes a transmission controller; the transmission controller includes a network controller and a USB bus controller, and the transmission controller is used to receive the printing task from the external device.
9. A printing method, characterized in that: Applied to a main control chip including a main CPU core, a printing CPU core and a printing interface control unit, the method comprises: The main CPU core acquires a printing task sent by an external device, wherein the printing task includes first printing data; The main CPU processes the first printing data to obtain second printing data, and stores the second printing data in a memory storage unit connected to the main control chip; After receiving the wake-up command from the main CPU core, the printing CPU core loads the driver of the printing device and starts the DMA transmission mechanism of the printing interface control unit; The printing interface control unit obtains the second printing data from the memory storage unit based on the DMA transmission mechanism, and transmits the second printing data to the printing device through a printing device interface that is communicatively connected to the printing interface control unit.
10. The method according to claim 9, characterized in that The method further comprises: When the printing CPU core detects that the next printing task is not obtained within the first preset time after the main CPU core is started or within the first preset time after the previous printing task is completed, the main CPU core is shut down to put the main CPU core into a standby state.
11. The method according to claim 10, characterized in that After the main CPU core enters the standby state, the method further includes: When the printing CPU core detects that the next printing task has not been obtained within a second preset time period, the main CPU core is powered off, the current system data of the main CPU core is stored in the memory storage unit, and the memory storage unit is controlled to enter a self-refresh mode to prevent the system data from being lost.
12. The method according to claim 11, characterized in that After the main CPU core is powered off, the method further includes: When the printing CPU core detects the wake-up command sent by the external device, the main CPU core is controlled to be powered on again and the main CPU core is woken up, so that the main CPU core restarts and enters the standby state.
13. The method according to claim 12, characterized in that After the main CPU core is restarted and enters the standby state, the method further includes: When the printing CPU core detects the printing task sent by the external device again, a reset instruction is sent to the main CPU core to switch the main CPU core from the standby state to the normal working state.
