BeagleV-Fire に USB-Serial 変換器が必要な場合
正常動作中の BeagleV-Fire を使うだけなら、外付けの USB-Serial 変換器は必要ない。
しかし、ブートプロセスを確認したり、新しいOSイメージをフラッシュするには外付けの USB-Serial 変換器をつなぐ必要がある。
BeagleV-Fire につなぐ USB-Serial 変換器の選定
BeagleV-Fireのシリアルポート端子は、信号入出力電圧が 3.3V なので、これがUSB-Serial 変換器を選定する制約条件になる。
さらに、個人的な好みで、USB側の端子はUSB-Cであることをもう一つの制約条件とした。microB端子はもげやすいし、ケーブルもUSB-Cに統一したいのがその理由である。
条件に見合う製品たち
FTDI USBシリアル変換アダプター Type-C版 (3.3/2.5/1.8V対応)www.switch-science.com
Switch SCIENCE の製品で、ジャンパ設定によって信号入出力電圧を1.8V, 2.5V, 3.3Vの三種類から選べる。5Vに対応しなくなったのは、マイコンの低電圧化の流れを考慮した結果だろう。機能的に優れているが価格がちょっと高い。
www.sengoku.co.jp
SparkFunの製品で、デフォルトで3.3Vロジック、ジャンパ設定で5Vにも対応できる。ジャンパ設定はパターンの切断とハンダによるブリッジが必要なのでちょっと面倒である。3.3Vで使う分には問題ない。そこそこ安いのでこちらを選定した。
そのままでは刺さらなかった
SparkFun Serial Basic Breakout - CH340C and USB-C を入手して BeagleV-Fire に刺そうとしたら、Cape Expansion Header と Breakoutのボード面が干渉して刺さらなかった。逆向きにすれば刺さるには刺さるが、信号線が対応しないので無意味である。
なお、SWITCH SCIENCE の製品の方も同様の構成なので直接は刺さらないと考えられる。
仕方なく、ジャンパー線を購入することにした。
入手したジャンパー線
Amazon | DiyStudio 10CM ジャンパー線多色デュポンワイヤー120pcs、用28AWGケーブル ブレッドボード・ジャンパーワイヤー、オス-メス・オス-オス・メス-メスピッチ2.54mm * 40Pin【2021人気限定】 | ジャンプワイヤ | 産業・研究開発用品 通販
たぶんこのリンクはすぐ機能しなくなるだろうから、画像を以下に示す。
こういう、リボン状にまとまったジャンパー線が便利である。
結線
BeagleV-Fire (シリアル端子) ↔ ジャンパー線 ↔ SparkFun Serial Basic Breakout ↔ USBケーブル ↔ WindowsPC
の順でつないだ。ジャンパー線は6本分を切り離して使ったが、ちょうどワイヤーの色が黒から緑の配列になっており、Breakoutボードのシルク印刷のBLKとGRNに対応していた。
この接続では、USBC ケーブルに力がかかっても、ジャンパー線がその力をいなしてボードに力が掛からなくできるという利点がある。
デバイスマネージャーで見ると以下のように表示された。
windows10では、このボードのドライバは自動的に適用された。
リブートプロセスが見えた
$ sudo reboot
[sudo] password for beagle:
Broadcast message from root@BeagleV on pts/0 (Sun 2024-03-10 15:59:57 UTC):
The system will reboot now!
beagle@BeagleV:~
Stopping session-1.scope - Session 1 of User beagle...
Stopping session-3.scope - Session 3 of User beagle...
[ OK ] Removed slice system-cockp…/cockpit-wsinstance-https-factory.
[ OK ] Removed slice system-modpr…lice - Slice /system/modprobe.
[ OK ] Stopped target graphical.target - Graphical Interface.
[ OK ] Stopped target multi-user.target - Multi-User System.
[ OK ] Stopped target getty.target - Login Prompts.
[ OK ] Stopped target timers.target - Timer Units.
[ OK ] Stopped dpkg-db-backup.tim… Daily dpkg database backup timer.
[ OK ] Stopped e2scrub_all.timer▒▒etadata Check for All Filesystems.
[ OK ] Stopped fstrim.timer - Discard unused blocks once a week.
[ OK ] Stopped logrotate.timer - Daily rotation of log files.
[ OK ] Stopped motd-news.timer - Message of the Day.
[ OK ] Stopped plocate-updatedb.t…Update the plocate database daily.
[ OK ] Stopped systemd-tmpfiles-c… Cleanup of Temporary Directories.
[ OK ] Stopped target time-set.target - System Time Set.
[ OK ] Stopped target usb-gadget.…m - Hardware activated USB gadget.
[ OK ] Closed systemd-rfkill.sock…l Switch Status /dev/rfkill Watch.
Stopping avahi-daemon.serv…e - Avahi mDNS/DNS-SD Stack...
Stopping cockpit-wsinstanc…7ae41e4649b934ca495991b7852b855...
Stopping cockpit.service - Cockpit Web Service...
Stopping cron.service …round program processing daemon...
こんな感じで見えるようになった。
ブートが80%で止まる
リブートするとほぼ毎回、ブートプロセスが80%で止まってしまう。
HSS: decompressing from eNVM to L2 Scratch ... Passed
DDR training ...
80% [ ..........]
どうもこれは既知の問題のようである。
正常にブートできるときのパターンは以下の通りである。
HSS: decompressing from eNVM to L2 Scratch ... Passed
DDR training ... Passed ( 5969 ms)
---------------------------------
-- BeagleV-Fire --
---------------------------------
[6.32354] PolarFire(R) SoC Hart Software Services (HSS) - version 0.99.36-BVF-0.3.0
MPFS HAL version 2.2.104 / DDR Driver version 0.4.023 / Mi-V IHC version 0.1.1 / BOARD=bvf
(c) Copyright 2017-2022 Microchip FPGA Embedded Systems Solutions.
incorporating OpenSBI - version 1.2
(c) Copyright 2019-2022 Western Digital Corporation.
[6.63254] Build ID: 13e69d23781e38eff4e9d2aa52db92d1f0352ac1
[6.70025] Built with the following tools:
- riscv64-unknown-elf-gcc (xPack GNU RISC-V Embedded GCC (Microsemi SoftConsole build), 64-bit) 8.3.0
まとめ
- BeagleV-Fire を使い倒すためには、外付けの USB-Serial 変換器が必要である。
- 変換器によっては、そのままでは刺さらないものもある。その場合はジャンパー線で中継すれば良い。
- ジャンパー線で中継すると、USBケーブルの動きによる力が BeagleV-Fire に直接かからなくなる利点がある。