JP2021004031A - Automotive electronic control device - Google Patents

Automotive electronic control device Download PDF

Info

Publication number
JP2021004031A
JP2021004031A JP2020148666A JP2020148666A JP2021004031A JP 2021004031 A JP2021004031 A JP 2021004031A JP 2020148666 A JP2020148666 A JP 2020148666A JP 2020148666 A JP2020148666 A JP 2020148666A JP 2021004031 A JP2021004031 A JP 2021004031A
Authority
JP
Japan
Prior art keywords
core
program
software
ram
rewriting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2020148666A
Other languages
Japanese (ja)
Other versions
JP6998434B2 (en
Inventor
雄介 阿部
Yusuke Abe
雄介 阿部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2020148666A priority Critical patent/JP6998434B2/en
Publication of JP2021004031A publication Critical patent/JP2021004031A/en
Application granted granted Critical
Publication of JP6998434B2 publication Critical patent/JP6998434B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

To securely rewrite software in an automotive electronic control device equipped with a multi-core microcontroller.SOLUTION: When rewriting software on a code flash, by a command from a core rewriting the software, it causes the cores other than the core rewriting the software executed on the code flash to move to a program on RAMs for each core or a RAM common for the cores.SELECTED DRAWING: Figure 2

Description

本発明は、マルチコアマイコンを搭載する自動車用電子制御装置におけるソフトウェア書き換えに関する。 The present invention relates to software rewriting in an electronic control device for an automobile equipped with a multi-core microcomputer.

ECU(Electrical Control Unit)などの自動車電子制御装置は、マイコンにより制御されており、そのマイコンには電気的にプログラムやデータが消去および書き込みが可能な不揮発性メモリであるコードフラッシュ、データフラッシュと、揮発性メモリであるRAM(Random Access Memory)を搭載し、コードフラッシュに記憶されている制御プログラムによって車両装置(例えば、エンジンの噴射・点火)を制御する。 Automotive electronic control devices such as ECUs (Electrical Control Units) are controlled by microcomputers, which include code flash and data flash, which are non-volatile memories that can electrically erase and write programs and data. It is equipped with RAM (Random Access Memory), which is a volatile memory, and controls vehicle equipment (for example, engine injection / ignition) by a control program stored in a code flash.

近年、自動車制御の高度化・多機能化により、複数のコアを有するマイコンがECUに搭載されてきており、各コアは、自身のコアに割り当てられたソフトウェア機能のタスクを並行して実行する。 In recent years, due to the sophistication and multifunctionality of automobile control, microcomputers having a plurality of cores have been mounted on the ECU, and each core executes tasks of software functions assigned to its own core in parallel.

一方で、ECUのソフトウェアに不具合が発生した場合に修正ソフトウェアにアップデートするために、あるいは、より効率的な制御ソフトウェアに入れ替えるために、ECUはソフトウェア書き換え機能を有することがある。通常のソフトウェア書き換えは、有線あるいは無線により接続された外部の書き込みツールと通信を行い、外部の書き込みツールからECUに更新ソフトウェアを転送しながら、ECUがマイコンのコードフラッシュに書き込みを行う。ソフトウェア書き換えを行うにあたり、コードフラッシュの書き換え前にコードフラッシュの消去が必要となる。(特許文献1) On the other hand, the ECU may have a software rewriting function in order to update to the correction software when a problem occurs in the software of the ECU or to replace the software with more efficient control software. In normal software rewriting, communication is performed with an external writing tool connected by wire or wirelessly, and the ECU writes to the code flash of the microcomputer while transferring the update software from the external writing tool to the ECU. When rewriting software, it is necessary to erase the code flash before rewriting the code flash. (Patent Document 1)

特開2015−172974号公報JP 2015-172974

ところで、マルチコアマイコンが採用されているECUでソフトウェア書き換えを実施する場合、コアが消去しようとしている消去ブロックに属するコードフラッシュで動作すると、不当命令実行や資源アクセス違反などの例外・割り込みが発生してしまう。 By the way, when software is rewritten in an ECU that employs a multi-core microcomputer, exceptions / interrupts such as illegal instruction execution and resource access violation occur when operating with a code flash belonging to the erase block that the core is trying to erase. It ends up.

マルチコアマイコンにおいて、ソフトウェア書き換え機能を担当するコアが、その他の異なる機能を実行しているコアがコードフラッシュのどの位置に存在しているかを知ることは困難であり、また、その他の異なる機能を実行しているコアのコードフラッシュ上の位置を知ることが可能な場合でも、その全てのコアが消去しようとしている消去ブロックとは別位置のコードフラッシュ上で動作している状況を作り出す必要があったり、同期をとり時間待ちが発生してしまったりするなど、その管理が難しいという問題があった。 In a multi-core microcomputer, it is difficult for the core in charge of the software rewriting function to know the position of the core performing other different functions in the code flash, and it also executes other different functions. Even if it is possible to know the position of the core on the code flash, it may be necessary to create a situation where all the cores are operating on the code flash at a different position from the erase block to be erased. There was a problem that it was difficult to manage it, such as synchronization and waiting for time.

本発明では上記問題に鑑みなされたものであり、マルチコアマイコンにおけるソフトウェア書き換え実施時に、全てのコアが消去しようとしている消去ブロック上で動作することが無い状況を容易に構成する自動車用電子制御装置を提供することを目的とする。 The present invention has been made in view of the above problems, and an electronic control device for an automobile that easily configures a situation in which all cores do not operate on an erasing block to be erased when software is rewritten in a multi-core microcomputer. The purpose is to provide.

本発明では、自動車用電子制御装置のソフトウェア書き換えにおいて、ソフトウェア書き換えを実施するコアの指令のもとに、ソフトウェア書き換えを実施するコア以外のコアをRAM上にあるプログラムに移行させ、消去しようとしている消去ブロックで動作することが無い状況にする。 In the present invention, in software rewriting of an electronic control device for an automobile, a core other than the core for performing software rewriting is transferred to a program on RAM and erased under the command of the core for performing software rewriting. Make the situation that the erase block does not work.

前記ソフトウェア書き換えを実施するコアの指令は、コア間の割り込み機能を利用し執り行い、前記RAM上にあるプログラムは、ソフトウェア書き換えを実施するコアの指令のもとに復帰するように構成した。 The command of the core that executes the software rewriting is performed by using the interrupt function between the cores, and the program on the RAM is configured to return to the command of the core that executes the software rewriting.

本発明によると、マルチコアマイコンにおけるソフトウェア書き換え、不当命令実行や資源アクセス違反などの例外・割り込みを発生させることなく実行することができる。 According to the present invention, it is possible to execute software without causing exceptions / interrupts such as software rewriting, illegal instruction execution, and resource access violation in a multi-core microcomputer.

マルチコアマイコンの構成を示す図である。It is a figure which shows the structure of the multi-core microcomputer. コードフラッシュ内の消去ブロックの構成とコア1とコア2のプログラムカウンタの例を示す図である。It is a figure which shows the structure of the erase block in a code flash, and the example of the program counter of core 1 and core 2. コードフラッシュ上のプログラムで動作していたコア2が、コア2用RAM上のプログラムに移行する例を説明した図である。It is a figure explaining the example that the core 2 which was operating by the program on the code flash shifts to the program on the RAM for core 2. コードフラッシュ上のプログラムで動作していたコア2とコア3が、コア共通RAM上のプログラムに移行する例を説明した図である。It is a figure explaining the example that the core 2 and the core 3 which were operating by the program on the code flash shift to the program on the core common RAM. コードフラッシュ上のプログラムとRAM上のプログラムの例と、退避プログラムの動作を示すフローチャートである。It is a flowchart which shows the example of the program on the code flash and the program on RAM, and the operation of the save program.

以下、添付された図面を参照し、本発明を実施するための実施形態について詳述する。 Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the attached drawings.

[第1実施例]
図1はn個のコアを持つマルチコアマイコンの構成を示す図である。マルチコアマイコンは、プログラムの演算処理を実施するコア1〜nと、各コア専用でアクセスすることのできるコア1〜n用の揮発性RAM11〜1nと、コア共通でアクセスすることができる不揮発性のメモリであるコードフラッシュ100と、コア共通でアクセスすることができる揮発性のRAMであるコア共通RAM200から構成される。各コアから相互に割り込みを発生させることができるコア間割り込み機能を備えている。
[First Example]
FIG. 1 is a diagram showing a configuration of a multi-core microcomputer having n cores. The multi-core microcomputer is a non-volatile microcomputer that can be accessed in common with cores 1 to n that perform program arithmetic processing, volatile RAMs 11 to 1n for cores 1 to n that can be accessed exclusively for each core, and cores 1 to 1n. It is composed of a code flash 100 which is a memory and a core common RAM 200 which is a volatile RAM which can be accessed in common by the core. It has an inter-core interrupt function that can generate interrupts from each core.

ソフトウェアの実行プログラムはコードフラッシュに配置され、各コアは、コードフラッシュ内のプログラムをそれぞれ実行する。 The software execution program is placed in the code flash, and each core executes the program in the code flash.

図2はコードフラッシュ内の消去ブロックの構成とコア1とコア2のプログラムカウンタの例を示す図である。図2に示すとおり、コードフラッシュは複数のm個の消去ブロック101〜10mから構成される。コードフラッシュのデータ書込みを行う際には、事前に消去状態である必要があり、コードフラッシュの消去は消去ブロック単位で行われる。 FIG. 2 is a diagram showing an example of the configuration of the erase block in the code flash and the program counters of the core 1 and the core 2. As shown in FIG. 2, the code flash is composed of a plurality of m erasing blocks 101 to 10 m. When writing data to the code flash, it is necessary to be in the erase state in advance, and the code flash is erased in units of erase blocks.

ソフトウェアの書き換えを行う際には、ソフトウェアの書き換えのセキュリティアクセス許可されたあとに、ソフトウェアの書き換え対象領域に対応する消去ブロックを消去し、外部より接続される書込みツールよりデータを書き込んでいく。 When rewriting software, after the security access for rewriting the software is granted, the erase block corresponding to the rewrite target area of the software is erased, and data is written from a writing tool connected from the outside.

ここで、コードフラッシュ内の消去ブロックを消去する際に、消去しようとしている消去ブロックで動作するコアが存在すると、消去された状態のコードフラッシュをプログラムと誤って実行してしまい、不当命令実行や資源アクセス違反などの例外・割り込みが発生し、例外・割り込み処理が正しく行われないと、マイコンがリセット状態となってしまう。 Here, when erasing the erase block in the code flash, if there is a core operating in the erase block to be erased, the erased code flash will be mistakenly executed as a program, resulting in illegal instruction execution. If an exception / interrupt such as a resource access violation occurs and the exception / interrupt processing is not performed correctly, the microcomputer will be in the reset state.

言い換えると、ソフトウェア書き換えを途中で失敗することなく、安全に行うためには、消去ブロックを指し示すようなプログラムカウンタが無い状態にすることが好ましい。 In other words, in order to safely perform software rewriting without failing in the middle, it is preferable that there is no program counter that points to the erase block.

図2には、コアを2つ搭載するマイコンのコードフラッシュ100と、コードフラッシュ上のコア1のプログラムが動作している先を示すコア1用プログラムカウンタ201と、コードフラッシュ上のコア2のプログラムが動作している先を示すコア2用プログラムカウンタ202の例も示している。 FIG. 2 shows a code flash 100 of a microcomputer equipped with two cores, a program counter 201 for core 1 indicating where the program of core 1 on the code flash is operating, and a program of core 2 on the code flash. An example of the program counter 202 for core 2 indicating the destination where is operating is also shown.

コア2用プログラムカウンタ202がコードフラッシュ100の消去ブロック104上で動作している際に、消去ブロック104の消去が実行された場合、コア2が実行するプログラムが不当命令実行や例外・割り込みを発生させてしまう。 If the erase block 104 is erased while the program counter 202 for the core 2 is operating on the erase block 104 of the code flash 100, the program executed by the core 2 causes an illegal instruction execution or an exception / interrupt. I will let you.

ECUのソフトウェア書き換えの手段には、複数のコードフラッシュを備えるマイコンを採用し、複数あるコアのうちのいくつがソフトウェア書き換え機能として動作し、それ以外のコアは通常動作しているプログラムを実行する方式が存在する。ソフトウェア書き換えが完了後は、次回ECUの起動時に、新しく書込みが行われたコードフラッシュが選択されプログラムが実行される。この方式は主に無線によるECUのソフトウェア書き換えに利用される。 A microcomputer equipped with multiple code flashes is used as the means for rewriting the software of the ECU, some of the multiple cores operate as software rewriting functions, and the other cores execute programs that are normally operating. Exists. After the software rewriting is completed, the newly written code flash is selected and the program is executed the next time the ECU is started. This method is mainly used for wireless ECU software rewriting.

ここでは、ソフトウェア書き換えを実行する際に、通常実行されているモードから、ソフトウェア書き換えの為の専用モードへ移行し、通常動作しているプログラムは実行されていない方式を前提としている。この方式は、ソフトウェア書き換えの頻度が少ないシステムを対象にしたECUのソフトウェア書き換えに利用される。 Here, when executing software rewriting, it is assumed that the mode that is normally executed is shifted to the dedicated mode for software rewriting, and the program that is normally operating is not executed. This method is used for software rewriting of the ECU for a system in which the frequency of software rewriting is low.

図3は2つのコアを有するマイコンにおいて、ソフトウェア書き換えを行うコア1の指令により、コードフラッシュ上のプログラムで動作していたコア2が、コア2用RAM上のプログラムに移行する第1実施例の一例を示した図である。 FIG. 3 shows a first embodiment in a microcomputer having two cores, in which the core 2 operating in the program on the code flash is transferred to the program on the RAM for the core 2 by the command of the core 1 for rewriting the software. It is a figure which showed an example.

まず、ソフトウェア書き換えを実行するコアからのコア間割り込みが発生した場合に、専用の処理が実行できるように、マイコンの起動時に各コアで個別に、割込みの許可設定を行う。前記専用処理は、コア2用RAMの退避プログラム領域312に移行するための処理を実施する。 First, interrupt permission is set individually for each core when the microcomputer is started so that dedicated processing can be executed when an interrupt between cores from the core that executes software rewriting occurs. In the dedicated process, a process for migrating to the save program area 312 of the core 2 RAM is performed.

具体的には、コードフラッシュ100で実行中のコア2用のプログラムカウンタ202を、コア2用RAMの退避プログラム領域312にある退避時に実行するプログラムが実行できるRAM上のプログラムカウンタ302にアドレスを変更する。 Specifically, the address of the program counter 202 for core 2 being executed by the code flash 100 is changed to the program counter 302 on the RAM in which the program to be executed at the time of evacuation can be executed in the evacuation program area 312 of the RAM for core 2. To do.

コア2用RAMの退避プログラム領域312に対し、ソフトウェア書き換えを実行するコア以外のコアであるコア2により、予め退避時に実行するプログラムを展開する。このコア2用RAMの退避プログラム領域312に退避時実行プログラムを展開するタイミングは、実際にソフトウェア書き換えが許可されてから実行してもよいし、マイコンの起動時に各コアで個別に行ってもよい。 A program to be executed at the time of evacuation is developed in advance by the core 2 which is a core other than the core that executes software rewriting in the evacuation program area 312 of the RAM for core 2. The timing of deploying the save execution program in the save program area 312 of the RAM for core 2 may be executed after the software rewriting is actually permitted, or may be performed individually for each core when the microcomputer is started. ..

かかる移行処理の第1実施例によれば、ソフトウェア書き換えを実行するコア以外のコアは、ソフトウェア書き換えを実行するコアからのコア間の割り込みが発生した場合に、各コア専用のRAMに展開されたプログラムに移行することできるように、コア間割り込みの設定と、コア専用RAMへのプログラムの展開を行う。 According to the first embodiment of the migration process, the cores other than the core that executes the software rewrite are expanded to the RAM dedicated to each core when an interrupt occurs between the cores that execute the software rewrite. Set the inter-core interrupt and expand the program to the core dedicated RAM so that it can be transferred to the program.

従って、ECUのソフトウェア書き換えを行う際に、消去される消去ブロックのコードフラッシュに実行されるコアが存在しない状況を作り出すことができ、ソフトウェア書き換え時の不当命令実行や資源アクセス違反などの例外・割り込みが発生することがなくなる。 Therefore, when rewriting the software of the ECU, it is possible to create a situation where there is no core to be executed in the code flash of the erase block to be erased, and exceptions / interrupts such as illegal instruction execution and resource access violation at the time of software rewriting can be created. Will not occur.

要するに、ECUのソフトウェア書き換えの際に、マイコンのリセットがかかることがなく安全にソフトウェア書き換えを実施することができる。 In short, when the software of the ECU is rewritten, the software can be safely rewritten without resetting the microcomputer.

[第2実施例]
図4は3つのコアを有するマイコンにおいて、ソフトウェア書き換えを行うコア1の指令により、コードフラッシュ上のプログラムで動作していたコア2とコア3が、コア共通RAM200上のプログラムに移行する第2実施例の一例を示した図である。
[Second Example]
FIG. 4 shows a second implementation in which, in a microcomputer having three cores, the cores 2 and 3 that were operating in the program on the code flash are transferred to the program on the core common RAM 200 by the command of the core 1 that rewrites the software. It is a figure which showed an example of an example.

まず、ソフトウェア書き換えを実行するコアからのコア間割り込みが発生した場合に、専用の処理が実行できるように、マイコンの起動時に各コアで個別に、割込みの許可設定を行う。前記専用処理は、コア共用RAM200上の退避プログラム領域400に移行するための処理を実施する。 First, interrupt permission is set individually for each core when the microcomputer is started so that dedicated processing can be executed when an interrupt between cores from the core that executes software rewriting occurs. The dedicated process is a process for migrating to the save program area 400 on the core shared RAM 200.

具体的には、コードフラッシュ100で実行中のコア2用のプログラムカウンタ202とコア3用のプログラムカウンタ203を、コア共用RAM200の退避プログラム領域400にある退避時に実行するプログラムが実行できるRAM上のプログラムカウンタ302、303にアドレスを変更する。 Specifically, the program counter 202 for the core 2 and the program counter 203 for the core 3 being executed by the code flash 100 are on the RAM on which the program to be executed at the time of saving in the save program area 400 of the core shared RAM 200 can be executed. Change the address to the program counters 302 and 303.

コア共用RAM200の退避プログラム領域400に対し、ソフトウェア書き換えを実行するコア1により、予め退避時に実行するプログラムを展開しておく。このコア共用RAM200の退避プログラム領域400に退避時実行プログラムを展開するタイミングは、実際にソフトウェア書き換えが許可されてから実行してもよいし、マイコンの起動時に
行ってもよい。
A program to be executed at the time of evacuation is developed in advance by the core 1 that executes software rewriting in the evacuation program area 400 of the core shared RAM 200. The timing of deploying the save execution program in the save program area 400 of the core shared RAM 200 may be executed after the software rewriting is actually permitted, or may be performed when the microcomputer is started.

かかる移行処理の第2実施例によれば、ソフトウェア書き換えを実行するコア以外のコアは、ソフトウェア書き換えを実行するコアからのコア間割り込みが発生した場合に、コア共通RAM200に展開されたプログラムに移行することができるように、コア間割り込みを設定し、ソフトウェア書き換えを実行するコアはコア共通RAM200へのプログラム展開を行う。 According to the second embodiment of the migration process, the cores other than the core that executes software rewriting are transferred to the program expanded in the core common RAM 200 when an interrupt between cores occurs from the core that executes software rewriting. The core that sets the inter-core interrupt and executes the software rewrite expands the program to the core common RAM 200 so that it can be executed.

従って、第1の実施形態と同様に、ECUのソフトウェア書き換えを行う際に、消去される消去ブロックのコードフラッシュに実行されるコアが存在しない状況を作り出すことができ、ソフトウェア書き換え時の不当命令実行や資源アクセス違反などの例外・割り込みが発生することがなくなる。 Therefore, as in the first embodiment, when the software of the ECU is rewritten, it is possible to create a situation in which there is no core to be executed in the code flash of the erase block to be erased, and an illegal instruction is executed at the time of software rewriting. Exceptions and interrupts such as resource access violations will no longer occur.

第1の実施形態では、各コアで実行される退避プログラムの動作を異なるものにし、動作を変えることが可能である。一方で、第2の実施形態は、第1の実施形態と比べて、各コアが同一の退避プログラムを利用することができ、ソフトウェア書き換えを実施するコアが退避する際に実行させたいプログラムを選ぶことができたり、共通化されることによるRAM使用量の削減ができたりする効果が得られる。 In the first embodiment, it is possible to make the operation of the save program executed in each core different and change the operation. On the other hand, in the second embodiment, as compared with the first embodiment, each core can use the same save program, and the core that executes software rewriting selects a program to be executed when it saves. It is possible to obtain the effect of reducing the amount of RAM used by making it common.

[第3実施例]
図5は退避プログラム中にコードフラッシュのアクセスに影響しないような例外・割り込みを利用する第3実施例の一例を示した図である。本例では、コードフラッシュ上のプログラムとRAM上のプログラムの例と、退避プログラムの動作を示すフローチャートを示している。
[Third Example]
FIG. 5 is a diagram showing an example of a third embodiment in which an exception / interrupt that does not affect the access of the code flash is used during the evacuation program. In this example, an example of a program on the code flash and a program on the RAM, and a flowchart showing the operation of the save program are shown.

コードフラッシュには、通常時に実行されるプログラム502と、通常時に実行されるプログラム502が動作中に例外・割り込みが発生した際に実行する例外・割り込み処理情報を提供している通常プログラム502用のベクターテーブル501が配置されている。 The code flash is for a program 502 that is normally executed and a normal program 502 that provides exception / interrupt processing information to be executed when an exception / interrupt occurs during operation of the program 502 that is normally executed. The vector table 501 is arranged.

RAMには退避プログラム504と、退避時に実行される退避プログラム504が動作中に例外・割り込みが発生した際に実行する例外・割り込み処理情報を提供している退避プログラム503用のベクターテーブル503が配置されるように、第1の実施形態と第2の実施形態で挙げられた方法でRAMに展開する。 A save program 504 and a vector table 503 for the save program 503 that provides exception / interrupt processing information to be executed when an exception / interrupt occurs during operation of the save program 504 that is executed at the time of save are arranged in the RAM. As described above, the program is expanded into the RAM by the methods described in the first embodiment and the second embodiment.

ソフトウェア書き換えを行うコアからの指令により、ソフトウェア書き換えを行うコア以外のコアであるコア2用のプログラムカウンタ202を、退避時に実行するプログラムが実行できるRAM上のプログラムカウンタ302に移行すると、退避処理の前処理S501が実行される。 When the program counter 202 for core 2, which is a core other than the core for software rewriting, is transferred to the program counter 302 on the RAM that can execute the program to be executed at the time of evacuation, the evacuation process is performed by a command from the core that rewrites the software. Preprocessing S501 is executed.

前処理S501では、必要に応じて退避プログラムが実行される間の状態を設定する処理であり、例えば、ECUのソフトウェア書き換え中にコードフラッシュやRAMへのアクセスが発生しないようにDMAC(Direct Memory Access Controller)の退避プログラムで使用しない周辺機器の停止を行うこともできる。 The pre-process S501 is a process of setting the state while the save program is executed as needed. For example, DMAC (Direct Memory Access) prevents access to the code flash or RAM during rewriting of the software of the ECU. It is also possible to stop peripheral devices that are not used in the save program of Controller).

退避終了条件判定S503にて退避終了条件が成立しない間は、退避中処理S502を繰り返し実施する。退避終了条件が成立した場合、復帰処理S504を実行し、退避プログラム504の実行を完了する。 While the evacuation end condition is not satisfied in the evacuation end condition determination S503, the evacuation process S502 is repeatedly executed. When the save end condition is satisfied, the return process S504 is executed, and the execution of the save program 504 is completed.

退避終了条件判定S503は、コア共用RAM200や、コア共用のレジスタ(図示せず)を介して復帰情報をポーリング監視したり、復帰処理を実施するプログラムを退避プログラム用ベクターテーブル503にコア間割り込みを設定したりすることで判定が可能である。 The save end condition determination S503 polls and monitors the return information via the core shared RAM 200 and the core shared register (not shown), and causes a program that executes the return process to interrupt the vector table 503 for the save program between cores. Judgment is possible by setting.

かかる復帰処理の第3実施例によれば、退避プログラム用のベクターテーブルを、退避プログラムと同様に予めRAMへ展開して利用することで、コードフラッシュのアクセスに影響しないような例外・割り込みを利用することができ、退避終了条件が成立したときに復帰処理を実施することができる。第3実施例は第1実施例と第2実施例のどちらにも
適用することができる。
According to the third embodiment of the recovery process, by expanding the vector table for the save program to the RAM in advance and using it in the same manner as the save program, exceptions / interrupts that do not affect the access of the code flash are used. This can be done, and the return process can be executed when the save end condition is satisfied. The third embodiment can be applied to both the first embodiment and the second embodiment.

ここで、前記実施形態から把握し得る請求項以外の技術的思想について、以下に効果と共に記載する。 Here, the technical ideas other than the claims that can be grasped from the above-described embodiment will be described below together with the effects.

(イ)少なくとも2つのコアを有するマイコンを搭載する自動車用電子制御装置であって、あるコアが故障したと判定された際に、故障コア以外のコアからの指令により、故障コアを不揮発性メモリ上のプログラムで動作しているプログラムから、故障コア専用の揮発性メモリ上にあるプログラムへ移行することを特徴とする自動車用電子制御装置。
かかる技術的思想によれば、コア故障時のフェールセーフ処理とすることができる。
(B) An electronic control device for automobiles equipped with a microcomputer having at least two cores, and when it is determined that a certain core has failed, the failed core is stored in a non-volatile memory by a command from a core other than the failed core. An electronic microcontroller for automobiles, which is characterized by migrating from a program running in the above program to a program in a volatile memory dedicated to a failed core.
According to such a technical idea, it can be a fail-safe process at the time of core failure.

(ロ)少なくとも2つのコアを有するマイコンを搭載する自動車用電子制御装置であって、コアで共通してアクセスできる資源がどのタスクにも占有されていない資源に対してアクセスする際、資源へのアクセス優先度の高いタスクが実行されるコアがアクセスする際に、資源へのアクセス優先度の高いタスクが実行されるコアからの指令で、より低いアクセス優先度のタスクが実行されるコアを不揮発性メモリ上のプログラムで動作しているプログラムから、揮発性メモリ上にあるプログラムへ移行することを特徴とする自動車用電子制御装置。 (B) When accessing a resource that is an electronic control device for automobiles equipped with a microcomputer having at least two cores and the resources that can be commonly accessed by the core are not occupied by any task, the resource is accessed. When a core that executes a task with a high access priority accesses, the core that executes a task with a lower access priority is non-volatile in response to a command from the core that executes a task with a higher access priority to resources. An electronic control device for automobiles, which is characterized by migrating from a program running on a program on sexual memory to a program on volatile memory.

かかる技術的思想によれば、複数のコアが同一資源を扱う場合のコアを跨いだ割込み禁止処理の効果を得ることができ、コアを跨いだセマフォ処理を構築することができる。 According to such a technical idea, the effect of interrupt prohibition processing across cores can be obtained when a plurality of cores handle the same resource, and semaphore processing across cores can be constructed.

1〜n コア1〜n
11〜1n コア専用RAM
100 コードフラッシュ
200 コア共通RAM
101〜10m 消去ブロック
201 コア1用プログラムカウンタ
202 コア2用プログラムカウンタ
302 RAMに移行したコア2用プログラムカウンタ
312 コア2用RAMの退避プログラム領域
303 RAMに移行したコア3用プログラムカウンタ
400 コア共通RAMの退避プログラム領域
501 通常時実行プログラム用ベクターテーブル
502 通常時実行プログラム
503 退避時実行プログラム用ベクターテーブル
504 退避時実行プログラム
1-n core 1-n
11-1n core dedicated RAM
100 code flash 200 core common RAM
101-10m Erase block 201 Program counter for core 1 202 Program counter for core 2 302 Program counter for core 2 transferred to RAM 312 Program area for saving RAM for core 2 303 Program counter for core 3 transferred to RAM 400 Core common RAM Save program area 501 Vector table for normal execution program 502 Normal execution program 503 Vector table for save execution program 504 Save execution program

Claims (1)

少なくとも2つのコアを有するマイコンを搭載する自動車用電子制御装置であって、
あるコアが故障したと判定された際に、故障コア以外のコアからの指令により、
前記故障コアを不揮発性メモリ上のプログラムで動作しているプログラムから、故障コア専用の揮発性メモリ上にあるプログラムへ移行することを特徴とする自動車用電子制御装置。
An electronic control device for automobiles equipped with a microcomputer having at least two cores.
When it is determined that a certain core has failed, a command from a core other than the failed core gives
An electronic control device for an automobile, characterized in that the failed core is transferred from a program operating in a program on a non-volatile memory to a program on a volatile memory dedicated to the failed core.
JP2020148666A 2020-09-04 2020-09-04 Electronic control device for automobiles Active JP6998434B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020148666A JP6998434B2 (en) 2020-09-04 2020-09-04 Electronic control device for automobiles

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020148666A JP6998434B2 (en) 2020-09-04 2020-09-04 Electronic control device for automobiles

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2019176397A Division JP6762411B2 (en) 2019-09-27 2019-09-27 Electronic control unit for automobiles

Publications (2)

Publication Number Publication Date
JP2021004031A true JP2021004031A (en) 2021-01-14
JP6998434B2 JP6998434B2 (en) 2022-01-18

Family

ID=74097478

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020148666A Active JP6998434B2 (en) 2020-09-04 2020-09-04 Electronic control device for automobiles

Country Status (1)

Country Link
JP (1) JP6998434B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008305317A (en) * 2007-06-11 2008-12-18 Toyota Motor Corp Multiprocessor system and control method thereof
JP2013097715A (en) * 2011-11-04 2013-05-20 Nikon Corp Electronic device and program
JP2013225208A (en) * 2012-04-20 2013-10-31 Toyota Motor Corp Information processing apparatus, information processing method and program
JP2014049013A (en) * 2012-09-03 2014-03-17 Hitachi Automotive Systems Ltd Electronic control system for automobile

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008305317A (en) * 2007-06-11 2008-12-18 Toyota Motor Corp Multiprocessor system and control method thereof
JP2013097715A (en) * 2011-11-04 2013-05-20 Nikon Corp Electronic device and program
JP2013225208A (en) * 2012-04-20 2013-10-31 Toyota Motor Corp Information processing apparatus, information processing method and program
JP2014049013A (en) * 2012-09-03 2014-03-17 Hitachi Automotive Systems Ltd Electronic control system for automobile

Also Published As

Publication number Publication date
JP6998434B2 (en) 2022-01-18

Similar Documents

Publication Publication Date Title
JP5044387B2 (en) Information processing apparatus and stack pointer updating method thereof
CN110908932B (en) Data processing apparatus and data protection method thereof
KR102485288B1 (en) Controller for vehicle and operating system scheduling method thereof
JP2018055583A (en) Control apparatus, control method and program
WO2015045507A1 (en) Vehicular control device
JP2005071303A (en) Program starting device
CN112863582B (en) Data power failure holding method and device, computer equipment and storage medium
US8464016B2 (en) Method and device for switching over in a memory for a control device
JP6762411B2 (en) Electronic control unit for automobiles
JP6998434B2 (en) Electronic control device for automobiles
US9223697B2 (en) Computer reprogramming method, data storage medium and motor vehicle computer
JP2004338883A (en) Elevator controller
JP2018028830A (en) Electronic controller and information storage method thereof
JP6596455B2 (en) Electronic control unit for automobile
JP2017204083A (en) Memory protection system
CN109147847B (en) Semiconductor device and flash memory control method
JP7302250B2 (en) electronic controller
JP6676791B2 (en) Information processing device
JP2009223435A (en) Data storage method and device, and program
JP6349444B2 (en) Vehicle control device
JP6252259B2 (en) Electronic control unit
US9773562B2 (en) Storage apparatus, flash memory control apparatus, and program
JP2015090512A (en) Information processing device having memory dump function
CN112732309B (en) Flash memory updating method and device and electronic equipment
US20240004635A1 (en) Electronic control device, reprogram execution method, and non-transitory computer readable storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200904

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200923

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200908

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200925

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210624

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210629

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20210730

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20210816

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20210824

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210927

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20211207

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211220

R150 Certificate of patent or registration of utility model

Ref document number: 6998434

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150