Starting method and device of multi-core controller

By adopting the method of master core activating slave cores and performing synchronous actions in the automotive ECU, multi-core initialization is completed, which solves the problem of long startup time of multi-core controllers under the AUTOSAR architecture, achieves a faster startup process, and improves customer experience. .

CN118567724APending Publication Date: 2024-08-30CONTINENTAL AUTOMOTIVE (CHANGCHUN) CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410683264.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

During the startup process of existing multi-core controllers under the AUTOSAR architecture, multi-core resources are not fully utilized, causing the startup time of the automotive ECU to be too long and affecting customer experience.

Method used

The master core is used to activate the slave cores and perform synchronous actions. The master and slave cores start the OS Kernel at the same time, run the Init Task respectively, complete the multi-core initialization of the protocol stack and functions, and use multi-core processing capabilities to shorten the startup time.

Benefits of technology

Through multi-core collaboration, the ECU startup time is shortened, customer experience is improved, and the startup performance problem of multi-core real-time systems is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567724A
    Figure CN118567724A
Patent Text Reader

Abstract

The embodiment of the invention discloses a method and a device for starting a multi-core controller, which can ensure that after a Bootloader of the controller is started, Application is started by utilizing a multi-core resource, so that the starting time is optimized. The method comprises the following steps: a master core activates a slave core and completes a first synchronization action between the master core and the slave core; starting an OS Kernel by the master core and the slave core at the same time, and creating an Idle Task and an Init Task of the master core and the slave core respectively; the master and slave cores call the Start OS, start to run the RTOS and complete a second synchronization action; the master core and the slave core respectively run respective Init Tasks to complete initialization of a protocol stack and functions on the cores; the master and slave cores complete a third synchronization action; the master core and the slave core call the RteStart at the same time, initialization of the SWC is completed, and after a CAN network wake-up source is detected, the Application sends a first frame NM message. According to the invention, the multi-core resource of the controller is utilized, so that the quick start of the Application is realized, and the overall start time is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic controllers, and in particular to a method, a device and a storage medium for starting a vehicle multi-core controller. Background Art

[0002] At present, automotive ECUs (controllers) are responsible for more and more processing tasks, and a traditional car has dozens or even hundreds of ECUs. As cars develop towards electrification and intelligence, automotive ECUs are also rapidly developing towards more integrated domain controllers, which means that if a single-core ECU handles existing tasks, it will bear a greater load. Under the current trend of ECU integration, ECUs with multiple cores are increasingly being used in the automotive field. However, there are many difficulties in the application of multi-core ECUs under the AUTOSAR architecture, especially how to optimize the use of multi-core resources in the key steps of startup, thereby shortening the startup time has always been a difficulty in the industry. In the existing known solutions, it takes more than 600 milliseconds for the automotive ECU to receive the NM wake-up frame and for the ECU's real-time system to send the first frame of the NM message. This is because most of the application startup process under the current solution is concentrated in the main core (core 0), and is not reasonably distributed to other slave cores (cores 1-3). Secondly, the startup time of each core in parallel is not fully utilized. Since it is necessary to wait for all cores to be started before the application layer can start running, the core with the longest startup time is the bottleneck of the startup time.

[0003] Looking at the main factors that affect the startup time of the automotive control system, there are roughly three parts: the first part is SoC BootRom, the second part is Bootloader, and the third part is Application. Among them, because BootRom is a chip-fixed code, its execution time cannot be simply optimized on the application side. However, at present, even under the existing multi-core controller, the system startup process is still implemented according to the traditional single-core startup process, which does not fully utilize the multi-core resources provided by the chip, resulting in a long startup time and greatly affecting the customer experience. Summary of the invention

[0004] A method for starting a multi-core controller in an embodiment of the present invention utilizes the multi-core resource capabilities of the multi-core controller to implement multi-core initialization of protocol stacks and functions. In particular, a method for implementing multi-core startup based on the Application execution phase during the startup of an automobile ECU is proposed, which fully utilizes the processing power of the multi-core to shorten the overall startup time and improve the customer's user experience.

[0005] A method for starting a multi-core controller according to an embodiment of the present invention includes: a master core activates a slave core and completes a first synchronization action between the master and slave cores; the master and slave cores simultaneously start the OS Kernel and create respective Idle Tasks and Init Tasks; the master and slave cores call Start OS to start running the RTOS and complete a second synchronization action; the master and slave cores respectively run their respective Init Tasks and complete the initialization of the protocol stack and its on-core functions; the master and slave cores complete a third synchronization action; the master and slave cores simultaneously call Rte_Start to complete the initialization of the SWC; when a CAN network wake-up source is detected, the Application sends a first frame NM message.

[0006] Among them, protocol stacks with low coupling between each other are initialized on different cores.

[0007] Among them, protocol stacks with low coupling do not call each other and do not use the same hardware resources.

[0008] In another embodiment, the first synchronization action includes confirming that the master and slave cores have completed one synchronization of activation and completing another synchronization after initialization of the data and stack areas.

[0009] The third synchronization action includes a synchronization after the master and slave cores complete the protocol stack and function initialization and a synchronization again after determining that the protocol stack communication is enabled.

[0010] Among them, the CAN protocol stack is initialized on the master core and one slave core, and the LIN and ETH protocol stacks are initialized on the slave core.

[0011] The functions and the protocol stack on which their implementation depends are initialized on the same core.

[0012] Among them, the diagnostic function and CAN protocol stack are initialized on the main core.

[0013] Among them, the end-to-end encryption function and the encryption and decryption protocol stack are initialized on the same slave core.

[0014] Among them, the initialization order on the master and slave cores is: the CAN protocol takes precedence over other protocol stacks, and the bottom layer function takes precedence over the upper layer function for initialization.

[0015] An embodiment of the present invention further provides a multi-core controller device for a vehicle. After the device is powered on and started, the processor can execute the steps of the method of the embodiment of the present invention.

[0016] A non-transitory computer-readable storage medium provided in an embodiment of the present invention stores program instructions that can be executed by a processing circuit, and when the program instructions are executed by a processor, the steps of the method described in the embodiment of the present invention are implemented.

[0017] Beneficial effects of the embodiments of the present invention:

[0018] In view of the characteristics of multi-core processing capabilities of current controllers, especially multi-core controllers, and the fact that existing technologies have not fully utilized their processing capabilities under the Classic AutoSAR architecture, especially in the Application startup phase, the solution of the embodiment of the present invention has redesigned a method specifically for implementing multi-core startup in the Application phase, which also includes initialization methods for different protocol stacks and functions and synchronization methods between cores, so that the master and slave cores can fully cooperate, greatly shortening the ECU startup time and solving the startup performance problem of the multi-core real-time system. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Other details and advantages of the present invention will become apparent from the detailed description provided below. It should be understood that the following drawings are merely illustrative and thus cannot be considered as limiting the present invention. The following will be described in detail with reference to the drawings, wherein:

[0020] Figure 1 It is a schematic diagram of the protocol stack and functions referred to in the present invention being initialized and synchronized on different cores;

[0021] Figure 2 is a flow chart of an embodiment of a method for executing startup of the present invention;

[0022] Figure 3 is a schematic diagram of an embodiment of an initialization function on each core of the present invention;

[0023] FIG. 4 (a, b) is a flow chart of a preferred embodiment of the method of the present invention for executing the first synchronization action and the third synchronization action;

[0024] Figure 5 It is a schematic diagram of the hardware architecture of the device of the present invention; DETAILED DESCRIPTION

[0025] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention clearer and more understandable, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.

[0026] In the description of the present invention, it is to be understood that the terms "first", "second", "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first", "second", "third" may explicitly or implicitly include one or more of the features. Moreover, the terms "first", "second", "third", etc. are applicable to distinguishing similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.

[0027] In the background technology introduced in the scheme of the present invention, factors that affect the startup time after the ECU is awakened have been revealed. In the existing technical scheme, when the ECU receives an external wake-up frame in low-power mode, it takes about 600ms from the wake-up startup to the real-time system sending the first frame NM message, which greatly affects the customer experience and therefore needs to be optimized.

[0028] The startup process of ECU is divided into three parts: 1. Run BootRom program; 2. Start Bootloader program; 3. Start Application to send NM frame. Through testing, the startup running time of BootRom is more than 15ms, the startup running time of Bootloader is about 200ms, and the startup running time of Application is about 400ms. The present invention focuses on the optimization of the startup running time of Application. Most of the existing Application startup processes on multi-core ECUs are concentrated on the main core (for example, core 0), not reasonably distributed to other cores (for example, cores 1-3) and do not make full use of the startup time of each core in parallel. Because it is necessary to wait for all cores to start before the Application application layer can be started, the core with the longest startup time is the bottleneck of the startup time, which causes the problem of too long startup time. Of course, when it comes to the startup of Application on multi-cores, in addition to initializing the protocol stack and functions, the synchronization between each core is also crucial. In the present invention, a new synchronization method between multiple cores is designed to ensure the smooth startup of the system.

[0029] The main core involved in the startup and operation of the multi-core controller Application of the present invention disclosed in the embodiment of the present invention is core 0. Core 0 first needs to complete the necessary board-side initialization: for example, the configuration of XRDC (the board-side initialization here refers to the initialization of the stack pointer and the initialization of the RAM to be used by the program later. XRDC is mainly used to control the access rights of each core to resources. For example, the access rights of Nor Flash are assigned to core 0, and cores 1-3 will trigger an exception when accessing Nor Flash). After core 0 completes the above steps, the setting of the entry function accessed by the slave core is completed, and the slave core (for example, core 1-3) is activated thereby. At this time, in order to ensure that all cores are successfully activated, after the master core activates the slave core, a synchronization action is designed to be performed. Then, the master core and the slave core need to complete the initialization of the data area and the stack area to prepare for Start OS. It is necessary that after the master core and the slave core complete the initialization of the data area and the stack area, before Start OS Kernel, a synchronization action is designed to be performed.

[0030] After completing the above two synchronization actions, the master core and the slave core start the OS Kernel at the same time. At this time, the master core and the slave core will initialize some variables used by the OS and the MPU (MPU is the Memory Protection Unit, which is mainly used to control the access rights to the memory. For example, Task A can only access the memory area 0x10000-0x20000; Task B can only access the memory area 0x30000-0x40000. If Task A accesses the area outside its authority, an exception will be triggered.) and complete the creation of IdleTask and Init Task. In comparison, it is known that Idle Task is the lowest priority Task. When the CPU has no high-priority Task to execute, it will execute Idle Task, and Init Task is the first Task to run after the OS starts scheduling, which is used to initialize some functional modules needed by the Application. For example, CAN protocol stack, LIN protocol stack, ETH protocol stack. According to the actual situation, the corresponding modules are initialized for the functions required. In a multi-core system, each core has independent Idle and Init processes. At this time, the main core calls EcuM_Init (EcuM_Init is a standard interface defined by AutoSAR, which is used to initialize the hardware resources needed by the Application, such as timers, sensors, power management chips, analog-to-digital converters, etc.) to initialize basic hardware resources: for example, OS Timer, ADC, ICU, I2C, etc. (OS Timer is the scheduling basis of the real-time system. OS relies on Timer to determine the next scheduling point. For example, assuming that the commonly used setting is to trigger a scheduling once every 1ms, the 1ms timing here is implemented by OS Timer;

[0031] ADC-Analog Digital Converter, analog-to-digital converter, is generally used to convert analog signals into digital signals;

[0032] ICU-Input Capture Unit, input capture unit, is generally used to capture changes in input signals. For example, the wake-up source can be collected through the ICU to wake up the ECU through a hard-wired signal;

[0033] I2C-Inter-Integrated Circuit, a common low-speed communication bus, one end of the bus is connected to the master core, and the other end is connected to the slave core. The master core can send commands to the slave core to let the slave core complete the corresponding function. For example, the RTC chip is connected to the I2C bus. If the whole vehicle needs to set the alarm, at this time, the alarm setting command can be sent to the RTC through I2C).

[0034] After completing the initialization of the basic hardware resources, the master core and the slave core call Start OS to start running the RTOS, after which the master core and the slave core are designed to perform a synchronous action.

[0035] It should be noted that when the synchronization action is completed at this time, the master core and the slave core run their own Init Task respectively. In order to ensure the first frame KPI (Key Performance Indicator, here refers to the performance indicator) of the CAN NM (CAN-Controller Area Network, which is the most common bus in the automotive industry. NM-Network Management, the ECUs on the whole vehicle can sleep and wake up together through the CAN NM message. In this way, the whole vehicle can achieve power saving and normal function) message, it is necessary to first initialize the communication protocol stack on the master and slave cores.

[0036] The following is a description of the relevant communication protocol stack:

[0037] CAN (Controller Area Network) protocol stack is a network protocol for real-time communication, widely used in automotive, industrial control and IoT fields. It is a serial communication protocol that allows multiple devices to communicate on the same bus. CAN protocol stack is a key software component to realize the communication function of automotive CAN bus. It provides a series of functional software to process the communication protocol of the physical layer and data link layer of CAN bus to achieve reliable and efficient communication of automotive electronic systems.

[0038] The LIN (Local Interconnect Network) protocol stack is a low-cost serial communication network developed specifically for automobiles. It is a complementary protocol to the CAN protocol, targeting applications that do not require high time requirements or do not require precise fault tolerance (LIN has lower reliability than the CAN protocol).

[0039] ETH protocol stack refers to the in-vehicle Ethernet protocol, which is an in-vehicle network communication technology that uses Ethernet interface and Ethernet physical layer standards. It defines the data link layer and physical layer specifications for communication between vehicles and external devices.

[0040] Furthermore, the embodiment of the present invention shows and creatively designs an initialization method for all protocol stacks and functions including the communication protocol stack on multiple cores in the startup phase of the ECU startup process Application. In the given embodiment, when core 0 is the main core and cores 1-3 are slave cores, the memory resources of cores 0, 1, and 3 are better than the memory resources of core 2. It can be understood that the memory capacity of cores 0, 1, and 3 is greater than the memory capacity of core 2. Because the LIN protocol stack is related to the vehicle body function, the LIN protocol stack and the CAN protocol stack need to be initialized on one core; because the ETH protocol stack has a large amount of data, it needs to occupy a core exclusively to complete its initialization. In the embodiment of the present invention, the CAN protocol stack is initialized on core 0 and core 1, the LIN protocol stack is initialized on core 1, and the ETH protocol stack is initialized on core 3.

[0041] In the initialization step, the CAN protocol stack is initialized first, and then other protocol stacks and functions in the main core are initialized. At the same time, the slave core also starts to initialize the functions on it. The consideration of initialization on each core in the embodiment of the present invention is based on the degree of coupling between the protocol stacks and the dependency relationship of function implementation. The degree of coupling here can be understood as the number of function interface calls between the two protocol stacks. The more the number, the higher the degree of coupling. Functional dependency means that the realization of a certain function requires reliance on a certain protocol stack to be realized.

[0042] The embodiment of the present invention initializes the protocol stacks with low coupling degree on different cores. For example, in the communication protocol stack, the CAN protocol stack is initialized on core 0 and core 1, the LIN protocol stack is initialized on core 1, the ETH protocol stack is initialized on core 3, and other large protocol stacks, such as the memory protocol stack, are initialized on core 0, while the encryption and decryption protocol stack is initialized on core 1. Then, the relevant functional modules are initialized according to the dependency relationship of the function implementation. So, for example, the diagnostic function depends on the CAN protocol stack to be implemented, so it needs to be initialized on core 0; the end-to-end encryption function depends on the encryption and decryption protocol stack, so it is initialized on core 1.

[0043] Furthermore, during the initialization process at this stage, the initialization functions required for initialization have been allocated to the corresponding cores. In the embodiment of the present invention, the initialization of the initialization functions on each core is performed in the following order: that is, the bottom layer functions are initialized first, and then the upper layer functions are initialized.

[0044] The order dependency of initialization functions is introduced by the initialization process of the CAN protocol stack. The initialization of the underlying functions must be ensured first: the first step is to initialize the CAN Transceiver to ensure that the physical layer is correctly configured; the second step is to initialize the CAN Controller to configure the CAN baud rate, working mode and transceiver mode; the third step is to initialize the CanIf module; the fourth step is to initialize the NM module... until the upper layer ComM module and Dcm module are initialized. So far, we have initialized all CAN-related modules.

[0045] Furthermore, the initialization process of the embodiment of the present invention is also designed with multiple synchronization points to meet the timing dependency between cores. A synchronization point means that when a core runs to a synchronization point, it needs to wait for other cores to enter this synchronization point. Only when all cores are at this synchronization point can all cores continue to execute.

[0046] The synchronization point is also crucial to the efficiency of the entire startup process.

[0047] Generally speaking, the embodiments of the present invention have the following synchronization points in the startup process: after the master core activates the slave core, there is a synchronization point to confirm that the master core and the slave core are normally activated; when the master and slave cores complete the initialization of the data area and the stack area, that is, the initialization of the memory area required by each core is completed, there is a synchronization point; when the master and slave cores start to run the RTOS, that is, after the OS scheduling of each core is successfully started, there is a synchronization point to ensure that the task scheduling of all cores starts synchronously; when the initialization of the protocol stack and function of the master and slave cores is completed, there is a synchronization point; and after the master and slave cores respectively enable the corresponding protocol stack communication, there is a synchronization point before the master and slave cores call and execute Rte_Start, thereby ensuring that the Rte_Start of all cores is executed synchronously, so that the scheduling timing of each application Task is determined. Therefore, the overall synchronization design of the embodiments of the present invention covers the entire period from the initial activation and operation of the multi-core to the issuance of the first frame NM message by the Application.

[0048] In order to better illustrate the solution disclosed in the embodiment of the present invention, further description is given in conjunction with the accompanying drawings:

[0049] like Figure 1 As shown, it is a schematic diagram of the initialization of the protocol stack and functions on each core in a multi-core processor with one master core and three slave cores of the present invention, wherein the master core and the slave cores have completed the steps before each core runs the Init Task, and start to execute the initialization steps of the protocol stack and functions on each core.

[0050] According to the initialization strategy in the method of the present invention, different protocol stacks and functions are initialized on different cores. In the given embodiment, the CAN protocol stack, LIN protocol stack, and ETH protocol stack are initialized on core 0 and core 1, core 1, and core 3 respectively. As for the Dlt functional module, because the Dlt (Diagnostic Log and Trace) module is mainly used to receive log information (log information) from DET, DEM, SW-Cs or trace information (traceinformation) from RTE. The Dlt module needs to transmit these data through the communication bus so that these logs and trace information are visible outside the ECU. The Dlt module eventually prints out the log information through ETH, so the Dlt main module needs to be initialized on core 3 together with the ETH protocol stack, and the Dlt slave module completes initialization on cores 0, 1, and 2, and at this stage, the initialization of the Dlt main module is later than the initialization of the Dlt slave module.

[0051] Based on the coupling degree between the protocol stacks and the dependency of function implementation, the memory protocol stack is initialized on core 0, the encryption and decryption protocol stack is initialized on core 1, and the time synchronization function module is initialized on core 3. On this basis, other functions are initialized on different cores.

[0052] When executing the initialization steps for each core, each core independently runs its own initialization steps. For example, for the main core 0, the initialization of the CAN protocol stack is first executed, and then the Dlt slave module, memory protocol stack, and other functions are initialized in sequence. Of course, on the basis of the completion of the initialization of the CAN protocol stack and other communication protocol stacks, the initialization order of the functions on each core is not limited by the order of the example diagram. On the contrary, the initialization order of different functions can be adjusted. When all cores complete the initialization of the protocol stack and function, as mentioned above, there is a synchronization point, at this time, each core needs to perform a synchronization. Similarly, for the synchronization of the protocol stack and function initialization stage, it can also be designed that a synchronization can be performed after completing the initialization of the communication protocol stack and other large protocol stacks and the initialization of some functions. That is to say, the initialization of some functions on the core can be arranged after this synchronization point, and the initialization can be completed before the synchronization point after enabling network communication. For example, the initialization of the Dlt main module on core 3.

[0053] Therefore, before each core officially starts the application layer task, the embodiment of the present invention also requires each core to complete the operation of enabling network communication. Specifically, after core 0 completes the initialization of the upper-layer CAN management module and completes the enabling of network communication, core 1 completes the initialization of the upper-layer CAN management module and completes the enabling of network communication, and core 3 completes the initialization of the Dlt main module and the Ethernet diagnostic gateway, and completes the enabling of network communication. After completing all the operations on the above different cores, synchronization between the cores is performed once. Then the master and slave cores call Rte_Start, start the application layer tasks in parallel, and start running SWC. After this, the CAN protocol stack can run normally, and after detecting the CAN network wake-up source, the Application will send the first frame NM message.

[0054] like Figure 2 The figure is a schematic diagram of an example of the initialization function executed on the master and slave cores of the present invention, which reflects the initialization of different functions assigned to different cores and the third synchronization action, involving the design of two synchronization points in the preferred mode.

[0055] like Figure 3 , which is a flowchart of the execution of the startup method according to an embodiment of the present invention, embodies the complete process of starting an Application on a multi-core ECU and reflects the overall synchronization strategy involved in the present invention.

[0056] like Figure 4a , Figure 4b FIG. 1 is a schematic diagram of a synchronization point flow chart of the synchronization point strategy of the method of the present invention, involving the preferred design of the first synchronization action and the third synchronization action.

[0057] like Figure 5 FIG. 1 is a hardware schematic diagram of an embodiment of the device of the present invention. The device 5 may be, for example, Figure 1 The central controller in the embodiment may be other types of controllers or devices, etc., which are not limited here. The computer device includes: a memory 50, a multi-core processor 52, and a computer program / instruction stored in the memory 50, and the processor 52 executes the computer program / instruction to implement the steps of the method described in the embodiment of the present invention.

[0058] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by the processor, the steps of the method described in the embodiment of the present invention are implemented.

[0059] The description of the above device and storage medium embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the device, storage medium and program product embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0060] The processor may be at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, a microprocessor, etc. It is understandable that the electronic device that implements the function of the processor may also be other, and the embodiments of the present application are not specifically limited.

[0061] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0062] It should be noted that the above description is only for example and not for limitation of the present invention. In other embodiments of the present invention, the method may have more, fewer or different steps, and the order, inclusion and function of each step may be different from that described and illustrated. For example, generally multiple steps can be combined into a single step, and a single step can also be divided into multiple steps. For those of ordinary skill in the art, without paying creative work, the sequential changes of each step are also within the scope of protection of the present invention.

[0063] The technical solution of the present invention, in essence or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor or a microcontroller to perform all or part of the steps of the method described in each embodiment of the present invention.

[0064] Those skilled in the art will appreciate that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed.

[0065] Although the present invention has been disclosed as above with preferred embodiments, the present invention is not limited thereto. Any changes and modifications made by any person skilled in the art without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention, and therefore the protection scope of the present invention should be subject to the scope defined by the claims.

[0066] The glossary of relevant technical terms in the present invention is explained as follows:

[0067] ECU: Electronic Control Unit

[0068] NM: Network Management

[0069] BootRom: A term specific to NXP chips, used for the initial startup self-test and other functions of the chip

[0070] Bootloader: Start the boot program, used to provide flash mode and load Application

[0071] Application: used to provide the application that ECU needs to implement

[0072] Init Task: is the first thread in the Linux kernel

[0073] Idle Task: Idle Task

[0074] RTE: Real-time runtime environment

[0075] SWC: Software Component

[0076] Kernel: operating system kernel

[0077] NM: Network Management

[0078] RTOS: Real-time operating system

[0079] XRD:Extended Resource Domain Controller

[0080] MPU: Memory Protection Unit

[0081] NOR flash: NOR flash, an electronic non-volatile computer storage medium.

Claims

1. A method for starting a multi-core controller, characterized in that: After the Bootloader is started, follow the steps below to start the Application on multiple cores: Step S10, the master core activates the slave core and completes the first synchronization action between the master and slave cores; Step S20, the master core and the slave core start the OS Kernel simultaneously, and create their own Idle Task and Init Task; Step S30, the master and slave cores call Start OS to start running the RTOS and complete the second synchronization action; Step S40, the master and slave cores respectively run their own Init Tasks to complete the initialization of the protocol stack and its core functions; Step S50, the master and slave cores complete the third synchronization action; Step S60, the master and slave cores call Rte_Start simultaneously to complete the initialization of SWC; When the CAN network wake-up source is detected, the Application sends the first frame NM message.

2. The method according to claim 1, characterized in that Protocol stacks with low coupling are initialized on different cores.

3. The method according to claim 2, characterized in that The protocol stacks with low coupling do not call each other and do not use the same hardware resources.

4. The method according to claim 1, characterized in that The first synchronization action includes confirming that the master and slave cores have completed a synchronization of activation and completing a resynchronization after the data and stack areas are initialized.

5. The method according to claim 1, characterized in that The third synchronization action includes a synchronization after the master and slave cores complete the protocol stack and function initialization and a synchronization again after determining that the protocol stack communication is enabled.

6. The method according to any one of claims 1 to 5, characterized in that: The CAN protocol stack is initialized on the master core and one slave core, and the LIN and ETH protocol stacks are initialized on the slave core.

7. The method according to claim 6, characterized in that The function and the protocol stack on which its implementation depends are initialized on the same core.

8. The method according to claim 7, characterized in that The diagnostic functions and the CAN protocol stack are initialized on the main core.

9. The method according to claim 7, characterized in that The end-to-end encryption function and the encryption and decryption protocol stack are initialized on the same slave core.

10. The method according to any one of claims 7 to 9, characterized in that: The initialization order on the master and slave cores is: the CAN protocol takes precedence over other protocol stacks, and the bottom layer functions take precedence over the upper layer functions for initialization.

11. A multi-core controller device for a vehicle, characterized in that: The device can execute the method of any one of claims 1 to 5 after being powered on.

12. A non-transitory computer-readable storage medium, characterized in that: The device stores program instructions that can be executed by a processing circuit, and can execute the method of any one of claims 1-5.

Citation Information

Cited By

  • Synchronous message processing method and system, vehicle and storage medium

    CN121334628A

  • Fast response method and device of first frame CANNM, vehicle and storage medium

    CN121455548A

  • Fast response method and device for first frame cannm, vehicle and storage medium

    CN121455548B