JP6596455B2 - Electronic control unit for automobile - Google Patents

Electronic control unit for automobile Download PDF

Info

Publication number
JP6596455B2
JP6596455B2 JP2017030608A JP2017030608A JP6596455B2 JP 6596455 B2 JP6596455 B2 JP 6596455B2 JP 2017030608 A JP2017030608 A JP 2017030608A JP 2017030608 A JP2017030608 A JP 2017030608A JP 6596455 B2 JP6596455 B2 JP 6596455B2
Authority
JP
Japan
Prior art keywords
core
program
ram
software
cores
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
JP2017030608A
Other languages
Japanese (ja)
Other versions
JP2018136730A (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 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 JP2017030608A priority Critical patent/JP6596455B2/en
Publication of JP2018136730A publication Critical patent/JP2018136730A/en
Application granted granted Critical
Publication of JP6596455B2 publication Critical patent/JP6596455B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

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

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

近年、自動車制御の高度化・多機能化により、複数のコアを有するマイコンがECUに搭載されてきており、各コアは、自身のコアに割り当てられたソフトウェア機能のタスクを並行して実行する。   In recent years, microcomputers having a plurality of cores have been installed in ECUs due to the advancement and multi-functionalization of automobile control, and each core executes a software function task 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 the correction software when a malfunction occurs in the ECU software or to replace it with more efficient control software. In normal software rewriting, the ECU writes to the code flash of the microcomputer while communicating with an external writing tool connected by wire or wirelessly and transferring 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号公報Japanese Patent Laying-Open No. 2015-172974

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

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

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

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

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

本発明によると、マルチコアマイコンにおけるソフトウェア書き換え、不当命令実行や資源アクセス違反などの例外・割り込みを発生させることなく実行することができる。   According to the present invention, it is possible to execute without causing an exception / interrupt such as software rewriting, illegal instruction execution or 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 example of the structure of the erase block in a code flash, and the program counter of the core 1 and the core 2. FIG. コードフラッシュ上のプログラムで動作していたコア2が、コア2用RAM上のプログラムに移行する例を説明した図である。It is the figure explaining the example which the core 2 which was operating with the program on a code flash transfers to the program on RAM for core 2. FIG. コードフラッシュ上のプログラムで動作していたコア2とコア3が、コア共通RAM上のプログラムに移行する例を説明した図である。It is the figure explaining the example which the core 2 and the core 3 which were operating with the program on a code flash transfer to the program on a core common RAM. コードフラッシュ上のプログラムとRAM上のプログラムの例と、退避プログラムの動作を示すフローチャートである。It is a flowchart which shows the example of the program on a code flash, the program on RAM, and operation | movement of a save program.

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

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

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

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

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

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

言い換えると、ソフトウェア書き換えを途中で失敗することなく、安全に行うためには、消去ブロックを指し示すようなプログラムカウンタが無い状態にすることが好ましい。   In other words, in order to safely perform software rewriting without failing in the middle, it is preferable that there is no program counter indicating an 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 core 1 program counter 201 indicating where the core 1 program on the code flash is operating, and a core 2 program on the code flash. The example of the program counter 202 for core 2 which shows the point | piece which is operating is also shown.

コア2用プログラムカウンタ202がコードフラッシュ100の消去ブロック104上で動作している際に、消去ブロック104の消去が実行された場合、コア2が実行するプログラムが不当命令実行や例外・割り込みを発生させてしまう。   If the erase of the erase block 104 is executed 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のソフトウェア書き換えに利用される。   The ECU software rewrite means adopts a microcomputer with multiple code flashes, a number of cores that operate as software rewrite functions, and other cores execute programs that normally operate Exists. After the software rewriting is completed, the newly written code flash is selected and the program is executed at the next startup of the ECU. This method is mainly used for software rewriting of the ECU by radio.

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

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

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

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

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

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

従って、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. Will not occur.

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

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

まず、ソフトウェア書き換えを実行するコアからのコア間割り込みが発生した場合に、専用の処理が実行できるように、マイコンの起動時に各コアで個別に、割込みの許可設定を行う。前記専用処理は、コア共用RAM200上の退避プログラム領域400に移行するための処理を実施する。   First, an interrupt permission setting is individually made in each core when the microcomputer is activated so that a dedicated process can be executed when an inter-core interrupt from a core executing software rewrite occurs. The dedicated process performs a process for shifting 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 in the code flash 100 are stored on the RAM that can execute the program executed at the time of saving in the saving program area 400 of the core shared RAM 200. The address is changed to the program counters 302 and 303.

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

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

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

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

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

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

RAMには退避プログラム504と、退避時に実行される退避プログラム504が動作中に例外・割り込みが発生した際に実行する例外・割り込み処理情報を提供している退避プログラム503用のベクターテーブル503が配置されるように、第1の実施形態と第2の実施形態で挙げられた方法でRAMに展開する。   The RAM stores 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 while the save program 504 executed at the time of saving is in operation. As described above, the data is expanded in the RAM by the method described in the first embodiment and the second embodiment.

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

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

退避終了条件判定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 performed. 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にコア間割り込みを設定したりすることで判定が可能である。   In the save end condition determination S503, the return information is polled and monitored via the core shared RAM 200 or a core shared register (not shown), and a program for executing the return process is interrupted 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, the exception program / interrupt that does not affect the access to the code flash is used by using the vector table for the save program after being expanded in the RAM in the same manner as the save program. The return process can be performed when the evacuation end condition is satisfied. 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 embodiment will be described together with effects.

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

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

かかる技術的思想によれば、複数のコアが同一資源を扱う場合のコアを跨いだ割込み禁止処理の効果を得ることができ、コアを跨いだセマフォ処理を構築することができる。   According to this 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 RAM dedicated to core
100 code flash 200 core common RAM
101-10m Erase block 201 Core 1 program counter 202 Core 2 program counter 302 Core 2 program counter 312 transferred to RAM Save program area 303 of core 2 RAM Core 3 program counter 400 transferred to RAM Core common RAM Save program area 501 Normal execution program vector table 502 Normal execution program 503 Save execution program vector table 504 Save execution program

Claims (4)

複数のコア、前記複数のコアの実行プログラムが格納されている不揮発性メモリ、揮発性メモリ、を有するマルチコアマイコンを備え、
前記複数のコアのうち、前記不揮発性メモリのプログラムによりソフトウェア書き換えを行うコアから指令を受けた他のコアは、揮発性メモリにあるプログラムへ移行することを特徴とする自動車用電子制御装置。
A multi-core microcomputer having a plurality of cores, a non-volatile memory storing an execution program of the plurality of cores, and a volatile memory;
Of the plurality of cores, another core that receives a command from a core that performs software rewriting by a program in the nonvolatile memory shifts to a program in a volatile memory.
前記揮発性メモリは、ソフトウェア書き換えを行うコア以外のコアのみがアクセスすることができる揮発性メモリであることを特徴とする請求項1に記載の自動車用電子制御装置。   The automotive electronic control device according to claim 1, wherein the volatile memory is a volatile memory that can be accessed only by a core other than a core that performs software rewriting. 前記揮発性メモリは、コアが共通してアクセスすることができる共用の揮発性メモリであることを特徴とする請求項1に記載の自動車用電子制御装置。   2. The automotive electronic control device according to claim 1, wherein the volatile memory is a shared volatile memory that can be commonly accessed by cores. ソフトウェア書き換えを行うコアから、不揮発性メモリ上のプログラムで動作しているソフトウェア書き換えを行うコア以外へのコアへの指令の発行に、コア間割込みを使用することを特徴とする請求項1乃至3の何れかに記載の自動車用電子制御装置。   4. An inter-core interrupt is used to issue a command from a core that performs software rewriting to a core other than a core that performs software rewriting that is operating in a program on a nonvolatile memory. An electronic control device for an automobile according to any one of the above.
JP2017030608A 2017-02-22 2017-02-22 Electronic control unit for automobile Active JP6596455B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017030608A JP6596455B2 (en) 2017-02-22 2017-02-22 Electronic control unit for automobile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017030608A JP6596455B2 (en) 2017-02-22 2017-02-22 Electronic control unit for automobile

Related Child 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
JP2018136730A JP2018136730A (en) 2018-08-30
JP6596455B2 true JP6596455B2 (en) 2019-10-23

Family

ID=63366881

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017030608A Active JP6596455B2 (en) 2017-02-22 2017-02-22 Electronic control unit for automobile

Country Status (1)

Country Link
JP (1) JP6596455B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5094531B2 (en) * 2008-04-24 2012-12-12 三菱電機株式会社 Software rewriting apparatus, software rewriting method, and software rewriting program
JP5900168B2 (en) * 2012-06-05 2016-04-06 株式会社デンソー Electronic control unit
JP6421635B2 (en) * 2015-02-16 2018-11-14 株式会社デンソー Electronic control device and memory rewriting method

Also Published As

Publication number Publication date
JP2018136730A (en) 2018-08-30

Similar Documents

Publication Publication Date Title
US10657039B2 (en) Control device for a motor vehicle
JP5576557B2 (en) Processor system and control method thereof
CN110908932B (en) Data processing apparatus and data protection method thereof
US10229077B2 (en) Method for data transfer between real-time tasks using a DMA memory controller
JP2009157542A (en) Information processing apparatus and method of updating stack pointer
EP3084593B1 (en) Updatable integrated-circuit radio
JP2005071303A (en) Program starting device
JP2013225208A (en) Information processing apparatus, information processing method and program
JP5499987B2 (en) Shared cache memory device
JP5999216B2 (en) Data processing device
US9223697B2 (en) Computer reprogramming method, data storage medium and motor vehicle computer
JP6596455B2 (en) Electronic control unit for automobile
AU2005303305A1 (en) Nonvolatile memory system
JP6762411B2 (en) Electronic control unit for automobiles
JP6998434B2 (en) Electronic control device for automobiles
JP2018028830A (en) Electronic controller and information storage method thereof
JP2017204083A (en) Memory protection system
JP2006127245A (en) Electronic device system
WO2019188177A1 (en) Information processing device
JP6466269B2 (en) Electronic control device and stack area usage monitoring method
JP7395011B2 (en) Flash memory management device and flash memory management method
CN117234729B (en) Dynamic memory protection method, device, computer equipment and storage medium
JP5915624B2 (en) Electronic control unit
JP6950383B2 (en) Memory access device and memory access method
JP2007280376A (en) Programmable controller

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170224

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181107

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190826

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: 20190903

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190930

R150 Certificate of patent or registration of utility model

Ref document number: 6596455

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350