JP6998434B2 - Electronic control device for automobiles - Google Patents

Electronic control device for automobiles Download PDF

Info

Publication number
JP6998434B2
JP6998434B2 JP2020148666A JP2020148666A JP6998434B2 JP 6998434 B2 JP6998434 B2 JP 6998434B2 JP 2020148666 A JP2020148666 A JP 2020148666A JP 2020148666 A JP2020148666 A JP 2020148666A JP 6998434 B2 JP6998434 B2 JP 6998434B2
Authority
JP
Japan
Prior art keywords
core
program
volatile memory
cores
executed
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.)
Active
Application number
JP2020148666A
Other languages
Japanese (ja)
Other versions
JP2021004031A (en
Inventor
雄介 阿部
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 Astemo 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 Astemo Ltd filed Critical Hitachi Astemo 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)

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 are non-volatile memories that can electrically erase and write programs and data, such as code flash and data flash. 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 multi-functionalization of automobile control, microcomputers having a plurality of cores have been mounted on ECUs, and each core executes tasks of software functions assigned to its own cores 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 defect 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-A-2015-172974

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

マルチコアマイコンにおいて、ソフトウェア書き換え機能を担当するコアが、その他の異なる機能を実行しているコアがコードフラッシュのどの位置に存在しているかを知ることは困難であり、また、その他の異なる機能を実行しているコアのコードフラッシュ上の位置を知ることが可能な場合でも、その全てのコアが消去しようとしている消去ブロックとは別位置のコードフラッシュ上で動作している状況を作り出す必要があったり、同期をとり時間待ちが発生してしまったりするなど、その管理が難しいという問題があった。 In a multi-core microcomputer, it is difficult for the core in charge of the software rewriting function to know where in the code flash the core performing other different functions is located, 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, such as synchronization and waiting for time.

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

本発明によると、マルチコアマイコンにおけるソフトウェア書き換え、不当命令実行や資源アクセス違反などの例外・割り込みを発生させることなく実行することができる。 According to the present invention, it can be executed 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 a multi-core microcomputer. コードフラッシュ内の消去ブロックの構成とコア1とコア2のプログラムカウンタの例を示す図である。It is a figure which shows the configuration of the erase block in a code flash, and the example of the program counter of a core 1 and a core 2. コードフラッシュ上のプログラムで動作していたコア2が、コア2用RAM上のプログラムに移行する例を説明した図である。It is a figure explaining the example that the core 2 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 core 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 that 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 erased 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 the 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 to have 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 generates an illegal instruction 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 the software rewrite function, 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 when the ECU is started next time. 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 changed 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 an 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 which, in a microcomputer having two cores, the core 2 operated by 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. The dedicated process carries out a process for migrating to the save program area 312 of the RAM for the core 2.

具体的には、コードフラッシュ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 that can execute the program to be executed at the time of evacuation in the evacuation program area 312 of the RAM for core 2. 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 the 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 between the cores that execute the software rewrite occurs. Set the interrupt between cores 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 in which 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 core 2 and the core 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 carries out 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 migrated 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 interrupt between cores and executes software rewriting expands the program to the core common RAM 200 so that it can be performed.

従って、第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 the core to be executed does not exist in the code flash of the erase block to be erased, and the illegal instruction at the time of software rewriting can be executed. And exceptions / interrupts such as resource access violations will not 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 performs software rewriting selects a program to be executed when the core 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. A 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 executed at the time of save are arranged in the RAM. As is to be done, it is expanded into the RAM by the method mentioned 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 on which the program to be executed at the time of evacuation can be executed by a command from the core for rewriting the software, the evacuation process is performed. Preprocessing S501 is executed.

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

かかる復帰処理の第3実施例によれば、退避プログラム用のベクターテーブルを、退避プログラムと同様に予めRAMへ展開して利用することで、コードフラッシュのアクセスに影響しないような例外・割り込みを利用することができ、退避終了条件が成立したときに復帰処理を実施することができる。第3実施例は第1実施例と第2実施例のどちらにも
適用することができる。
According to the third embodiment of the return processing, 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. And when the save end condition is satisfied, the return process can be executed. The third embodiment can be applied to both the first embodiment and the second embodiment.

ここで、前記実施形態から把握し得る請求項以外の技術的思想について、以下に効果と共に記載する。 Here, technical ideas other than the claims that can be grasped from the above-described embodiment will be described below together with their 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 control device for automobiles 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 in the event of a 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 the core that executes the task with high access priority accesses, the core that executes the task with lower access priority is non-volatile by the command from the core that executes the task with high access priority to the resource. An electronic control device for automobiles 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, it is possible to obtain the effect of interrupt prohibition processing across cores when a plurality of cores handle the same resource, and it is possible to construct semaphore processing across cores.

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 to 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 (5)

少なくとも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 a command.
An electronic control device for an automobile, characterized in that a program operating in the failed core is transferred from a program on a non-volatile memory to a program on a volatile memory dedicated to the failed core.
前記マイコンは、前記少なくとも2つのコア共通でアクセス可能な不揮発性メモリと、各コア専用の揮発性メモリとを有することを特徴とする請求項1に記載の自動車用電子制御装置。 The electronic control device for an automobile according to claim 1, wherein the microcomputer has a non-volatile memory that can be accessed in common by at least two cores and a volatile memory dedicated to each core. 少なくとも2つのコアを有し、前記少なくとも2つのコアの実行プログラムが格納されている不揮発性メモリ及び揮発性メモリを有するマイコンを搭載する自動車用電子制御装置であって、 An automobile electronic control device having at least two cores and equipped with a microcomputer having a non-volatile memory and a volatile memory in which an execution program of the at least two cores is stored.
前記コアで共通してアクセスできるが、どのタスクにも占有されていない資源に対して、前記資源へのアクセス優先度の高いタスクが実行されるコアがアクセスする際に、前記資源へのアクセス優先度の高いタスクが実行されるコアからの指令により、より低いアクセス優先度のタスクが実行されるコアで動作するプログラムを、前記不揮発性メモリ上のプログラムから、前記揮発性メモリ上のプログラムへ移行することを特徴とする自動車用電子制御装置。 When a core that executes a task with a high access priority to the resource accesses a resource that can be accessed in common by the core but is not occupied by any task, the access priority to the resource is prioritized. A program running on a core on which a task with a lower access priority is executed is transferred from a program on the non-volatile memory to a program on the volatile memory by a command from a core on which a task with a high degree is executed. An electronic control device for automobiles, characterized in that it does.
複数のコア、並びに前記複数のコアの実行プログラムが格納されている不揮発性メモリ及び揮発性メモリを有するマルチコアマイコンを備え、 A multi-core microcomputer having a plurality of cores and a non-volatile memory and a volatile memory in which execution programs of the plurality of cores are stored is provided.
前記不揮発性メモリは、通常時に実行される通常プログラムと、前記通常プログラム用のベクターテーブルを格納し、 The non-volatile memory stores a normal program executed at normal times and a vector table for the normal program.
前記揮発性メモリは、退避プログラムと、前記退避プログラム用のベクターテーブルを格納し、 The volatile memory stores a save program and a vector table for the save program.
前記複数のコアのうち、前記不揮発性メモリのプログラムによりソフトウェア書き換えを行うコアからの指令により、他のコアで動作するプログラムを、前記不揮発性メモリ上の前記通常プログラムから、前記揮発性メモリ上の前記退避プログラムへ移行し、 Among the plurality of cores, a program operating in another core is changed from the normal program on the non-volatile memory to the volatile memory by a command from the core that rewrites the software by the program of the non-volatile memory. Move to the above save program and
退避終了条件が成立しない間は前記退避プログラムを繰り返し実行し、前記退避終了条件が成立すると前記退避プログラムの実行を終了することを特徴とする自動車用電子制御装置。 An electronic control device for an automobile, characterized in that the evacuation program is repeatedly executed while the evacuation end condition is not satisfied, and the execution of the evacuation program is terminated when the evacuation end condition is satisfied.
前記ソフトウェア書き換えを行うコアからの指令により、前記他のコアのプログラムカウンタから、前記退避プログラムが実行できる前記揮発性メモリのプログラムカウンタへ移行することを特徴とする請求項4に記載の自動車用電子制御装置。 The automotive electron according to claim 4, wherein the program counter of the other core shifts to the program counter of the volatile memory in which the save program can be executed by a command from the core that rewrites the software. Control device.
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 JP2021004031A (en) 2021-01-14
JP6998434B2 true 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
JP2021004031A (en) 2021-01-14

Similar Documents

Publication Publication Date Title
JP3892851B2 (en) Memory card and semiconductor device
JP5044387B2 (en) Information processing apparatus and stack pointer updating method thereof
CN110908932B (en) Data processing apparatus and data protection method thereof
US10657039B2 (en) Control device for a motor vehicle
US5825649A (en) Kernel substitution method in multi-processor system and multi-processor system having kernel substitution function
JP2001195241A (en) Computer
JP2005071303A (en) Program starting device
WO2015045507A1 (en) Vehicular control device
JP6998434B2 (en) Electronic control device for automobiles
JP6762411B2 (en) Electronic control unit for automobiles
US9223697B2 (en) Computer reprogramming method, data storage medium and motor vehicle computer
JP6596455B2 (en) Electronic control unit for automobile
JP2018028830A (en) Electronic controller and information storage method thereof
JP2017204083A (en) Memory protection system
JP7302250B2 (en) electronic controller
JP6676791B2 (en) Information processing device
JP2009223435A (en) Data storage method and device, and program
WO2019188177A1 (en) Information processing device
JPH07261997A (en) Flash rom management system
JP6252259B2 (en) Electronic control unit
CN112732309B (en) Flash memory updating method and device and electronic equipment
JP2015090512A (en) Information processing device having memory dump function
JP7141977B2 (en) Control device and control method
JP7375643B2 (en) In-vehicle information processing device, control method and computer program
JP2017204286A (en) Vehicle control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200904

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200923

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200908

A521 Written amendment

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 Written amendment

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