アームプロセッサでコールドブートとウォームブーツを検出する方法は?

StackOverflow https://stackoverflow.com/questions/3730464

  •  03-10-2019
  •  | 
  •  

質問

アームプロセッサがコールドブーツ(つまり、初期電源)から温かいブーツ(つまり、実際の電力損失なしのアサーションをリセットする)から起動しているかどうかを判断する方法を探しています。具体的には、ARM968コアを使用しており、Cまたはアセンブリを使用して決定を行います。決定を使用して、特定の操作が後続のリセットではなく、初期のパワーオンでのみ実行されるように使用します。以前のプロジェクトでは、外部回路(FPGAなど)を活用して、さまざまなブートシナリオを検出しましたが、この場合はARMコアに限定されています。

役に立ちましたか?

解決

RAMのグローバル変数を、コールドブート中にはありそうもない値に初期化し、ブート中にそれを確認できます。

マイクロコントローラーの場合、通常、特定のチップのリセットロジックはステータスレジスタを提供します。これはリセットのソースを示します。それがこの大きなコアに存在するかどうか、そしてそれを使用できるかどうかはわかりません。

他のヒント

特定のチップのドキュメントを確認してください( "ARM968"は十分に具体的ではありません)。リセットの原因を説明するレジスタがあるはずです。たとえば、LPC23XXが持っているものは次のとおりです。

Reset Source Identification Register (RSIR - 0xE01FC180)

This register contains one bit for each source of Reset. Writing a 1 to any of these bits
clears the corresponding read-side bit to 0. The interactions among the four sources are
described below.

Bit Symbol Description
0 POR Assertion of the POR signal sets this bit, and clears all of the other bits in
this register. But if another Reset signal (e.g., External Reset) remains
asserted after the POR signal is negated, then its bit is set. This bit is not
affected by any of the other sources of Reset.
1 EXTR Assertion of the RESET signal sets this bit. This bit is cleared by POR,
but is not affected by WDT or BOD reset.
2 WDTR This bit is set when the Watchdog Timer times out and the WDTRESET
bit in the Watchdog Mode Register is 1. It is cleared by any of the other
sources of Reset.
3 BODR This bit is set when the 3.3 V power reaches a level below 2.6 V.
If the VDD(DCDC)(3V3) voltage dips from 3.3 V to 2.5 V and backs up, the
BODR bit will be set to 1.
If the VDD(DCDC)(3V3) voltage dips from 3.3 V to 2.5 V and continues to
decline to the level at which POR is asserted (nominally 1 V), the BODR
bit is cleared.
if the VDD(DCDC)(3V3) voltage rises continuously from below 1 V to a level
above 2.6 V, the BODR will be set to 1.
This bit is not affected by External Reset nor Watchdog Reset.
Note: Only in case when a reset occurs and the POR = 0, the BODR bit
indicates if the VDD(DCDC)(3V3) voltage was below 2.6 V or not.

それは難しい可能性があり、おそらくあなたは本当にコア自体だけを意味しないでしょう。コアはリセットを取得する必要がありますが、外のメモリ(ただし、おそらくチップ内)はそうではありませんでした。メモリがドラムに基づいている場合、ブートで拭くことがあります。一般的なワンサイズがすべての答えに合うことを知りません。あなたとStarblueの両方がそれを持っています、あなたはリセットでクリアされていない場所にいくつかの登録を見つける必要があります、それをパワーアップでランダムに起こらないような「おそらく」何かに設定します。それを読んでから設定してください。ボードレベルでリセットロジックを管理するFPGAまたはPLDのように(ある場合)、リセットのパワーでもリセットされているため、温かいリセットでは、それを引き起こし、状態を維持するものです。 。

コアまたはチップのレジスタ仕様をTRMを掘り、リセット状態が未定義のレジスタがあるかどうかを確認します。それは私が見始める場所として、それはパワーアップします。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top