動いた!
BF53[123]のJTAG周りの不可解な挙動のため,さんざん泣かされた刺身包丁.Rev.D版で,やっと安定動作ですよ.
$ src/jtag UrJTAG 0.10 #1587 Copyright (C) 2002, 2003 ETC s.r.o. Copyright (C) 2007, 2008, 2009 Kolja Waschk and the respective authors UrJTAG is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for UrJTAG. WARNING: UrJTAG may damage your hardware! Type "quit" to exit, "help" for help.
↑UrJTAG-0.10で…
jtag> cable oocdlink-s Connected to libftd2xx driver. jtag> detect IR length: 5 Chain length: 1 Device Id: 01000010011110100101000011001011 (0x00000000427A50CB) Manufacturer: Analog Devices Part(0): BF533 Stepping: 4 Filename: /opt/urjtag-0.10/share/urjtag/analog/bf533/bf533 jtag> peek 0xffa00000 Error: Bus driver missing. jtag> initbus_bf533ezkit initbus_bf533ezkit: unknown command jtag> initbus bf533_ezkit jtag> peek 0xffa00000 bus_read(0xffa00000) = 0x0001 (1) jtag> poke 0xffa00000 0xffff jtag> peek 0xffa00000 bus_read(0xffa00000) = 0xFFFF (65535) jtag> poke 0xffa00000 0xa5a5 jtag> peek 0xffa00000 bus_read(0xffa00000) = 0xA5A5 (42405)
↑BF533CBでは内蔵RAMにアクセスでき…
jtag> detect IR length: 5 Chain length: 1 Device Id: 01010010011110100101000011001011 (0x00000000527A50CB) Manufacturer: Analog Devices Part(0): BF533 Stepping: 5 Filename: /opt/urjtag-0.10/share/urjtag/analog/bf533/bf533 jtag> initbus bf533_stamp jtag> detectflash 0x20000000 Query identification string: Primary Algorithm Command Set and Control Interface ID Code: 0x0002 (AMD/Fujitsu Standard Command Set) Alternate Algorithm Command Set and Control Interface ID Code: 0x0000 (null) Query system interface information: Vcc Logic Supply Minimum Write/Erase or Write voltage: 2700 mV Vcc Logic Supply Maximum Write/Erase or Write voltage: 3600 mV Vpp [Programming] Supply Minimum Write/Erase voltage: 9000 mV Vpp [Programming] Supply Maximum Write/Erase voltage: 10000 mV Typical timeout per single byte/word program: 16 us Typical timeout for maximum-size multi-byte program: 4 us Typical timeout per individual block erase: 512 ms Typical timeout for full chip erase: 32768 ms Maximum timeout for byte/word program: 256 us Maximum timeout for multi-byte program: 64 us Maximum timeout per individual block erase: 8192 ms Maximum timeout for chip erase: 524288 ms Device geometry definition: Device Size: 4194304 B (4096 KiB, 4 MiB) Flash Device Interface Code description: 0x0002 (x8/x16) Maximum number of bytes in multi-byte program: 4 Number of Erase Block Regions within device: 2 Erase Block Region Information: Region 0: Erase Block Size: 8192 B (8 KiB) Number of Erase Blocks: 8 Region 1: Erase Block Size: 65536 B (64 KiB) Number of Erase Blocks: 63 Primary Vendor-Specific Extended Query: Major version number: 1 Minor version number: 0 Address Sensitive Unlock: Bad value Erase Suspend: Read only Sector Protect: Not supported Sector Temporary Unprotect: Supported Sector Protect/Unprotect Scheme: Bad value Simultaneous Operation: 3 sectors Burst Mode Type: Bad value Page Mode Type: Bad value jtag>
↑E!KIT BF533でdetectflashもできる.
実は6ヶ月以上,悩まされていたネタ.長かった.長かったよ.
想定される原因
Rev.C基板とRev.D基板との間での最大の違いは2つ.JTAGのCLKに対してシュミットトリガなバッファを噛ましたこと.
あともう一つ,FT2232Dに変更したこと.
サイズの小型化といったこともしたけれども,実装密度で挙動が変わる程デリケートではないだろう.
今回の反省
実はgnICEにはCLKのシュミットバッファが入っている.その意味に気づけなかった.かなり前に,id:suikan師から,バッファは入れないの? と質問があったのだけれど,深く考えなかった.不覚.
Blackfinに捕らわれず広くJTAG全体を見渡すと,DWMのSpartan-3基板でCLKがカギになっているというなひたふ師の発表もあり,FPGAのコンフィギュレーションの世界ではCLKに目を光らすのは当然のようだ.MPUの世界ではあまり騒がれない話なので,情報収集に漏れが出た.反省.
次回への教訓
(出荷数がある != 安定している) 当たり前だけれど.
ファーストユーザもメーカも代理店も,そして残念ながら私も,「シェアも実績もそれなりにあるBF533に,まさかこんな基本的な躓きがあるはずがない」と心のどこかで思っていた.
油断大敵.全てを疑え.これに尽きる.