ラジオ少年の楽しい電子工作、その他

AVRを使った簡単な回路の実験、そして日々のちょっとした出来事を書きます。

ATXMEGAのFuseについて

2012年11月25日 | 日記

8-bit Atmel XMEGA A Microcontroller XMEGA A MANUAL

を見ると下記記述があります。

3.13 Fuse Lock
For some system-critical features, it is possible to program a fuse to disable all changes to the associated I/O control registers. If this is done, it will not be possible to change the registers from the user software, and the fuse can only be reprogrammed using an external programmer. Details on this are described in the datasheet module where this feature is available.

これを訳すと

3.13 フューズ 錠

あるシステム-危なっかしさのある-の為に、一連のI/O制御レジスタに対し全ての変更を無効化する様にフユーズをプログラムすることが可能である。もしこれが行われるとユーザソフトウエアからレジスタを変更することは出来ない。そして、フューズは外部書き込み機を使うことで再設定が可能である。これについての詳細はこの機能が有効であるデータシートに述べられている。

これについてはこれからデータシートを見つける必要が有りそう、一体どういう事のか?


もう一つ、ATXMEGAのfuseはプログラムで変える(設定)すると何処かに書いて有りましたので、それはどの様にプログラム上で記述するのかを知りたくて調べて見たところこの記述が出てきました。

4.4 Fuses and Lock bits
The fuses are used to configure important system functions, and can only be written from an external programmer. The application software can read the fuses. The fuses are used to configure reset sources such as brownout detector and watchdog, startup configuration, JTAG enable, and JTAG user ID.The lock bits are used to set protection levels for the different flash sections (i.e., if read and/or write access should be blocked). Lock bits can be written by external programmers and application software, but only to stricter protection levels.
Chip erase is the only way to erase the lock bits. To ensure that flash contents are protected even during chip erase, the lock bits are erased after the rest of the flash memory has been erased.
An unprogrammed fuse or lock bit will have the value one, while a programmed fuse or lock bit will have the value zero.
Both fuses and lock bits are reprogrammable like the flash program memory.
For some fuse bytes, leaving them unprogrammed (0xFF) will result in invalid settings. The user must ensure that the fuse bytes are programmed to values which give valid settings. Refer to the detailed description of the individual fuse bytes for further information.

これを読んでみると、fuse 設定は外部書き込み機を使う事で可能になる、らしい。fuseの値はソフトで読み込む事は可能。Lock bitは外部書き込み機、そしてアプリケーションソフトで書き込み可能、厳重なプロテクトの為に。Lock bitを消去する方法はチップ消去だけである。Lock bitはflashの中身が全て消された後に消去される様な事が書いてある。

fuse byteはプログラムされていないと0xFFであるがこのままでは不正な場合があり、適切にプログラムすることが必要との事。

どうもfuseの書き込みは、外部書き込み機で行いfuse valueはプログラムでreadは出来ると云うことの様ですね。 これで良いのかは??

コメント (7)
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする