LoginSignup
19

More than 5 years have passed since last update.

Raspberry Pi3 のシリアルコンソールで通信速度が合わない

Posted at

Raspberry Pi3 でシリアルコンソールを使おうとすると、bps をどのように設定しても速度が合わず、文字化けの嵐になります。

Raspberry Pi 3 UART baud rate workaround で詳しい解説がされているので、詳細はこちらを読んでもらえればよいのですが、結論から述べると、config.txt

core_freq=250

を追加することで、問題は解消します。

Raspberry Pi 3 UART baud rate workaround に書かれていることの要旨だけ挙げておきます。

Raspberry Pi 3 になって、Bluetooth のサポートのために、GPIO の UART の割り当てが変更され、uart1 を使うようになった。
uart0 は Bluetooth が使うようになっている。
uart0 はコアクロックに影響されないが、uart1 の速度はコアクロックに依存する。
コアクロックが変わるとシリアルの通信速度も変わる。
回避策として、コアクロックを 250MHz に設定する、つまり /boot/config.txtcore_freq=250 を指定することで、適切な速度が設定される。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19