組み込みProgrammerのチラシの裏

Raspberry piのSDカード

| Comments

Raspberry piのSDカードの選び方についてまとめた。

SDカード

raspberrypi.orgのGetting startedの情報を確認した。 推奨SDカードは、通常のRaspberry pi OSで16GB以上。 Raspberry pi OS Liteで4GB以上とのこと。

また、実際の相性情報などはelinux.orgにまとまっているため、確認することをお勧めする。 なお、最近はRaspberry Pi起動動作確認済み Industry用なども売られているため、サーバーなど安定稼働したい場合は、 こちらを選択するのも手である。

参考情報

確認

dmesgで以下のようなメッセージが出るなど、電圧不測を検知することがある。

1
2
3
$ dmesg
[   32.030313] hwmon hwmon1: Voltage normalised
[   34.046320] hwmon hwmon1: Undervoltage detected!

vcgencmdで調べると分かる。

1
2
$ vcgencmd get_throttled
throttled=0x50000

この0x50000の意味は、manで調べることができる。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ man vcgencmd
...
       get_throttled
              Returns  the throttled state of the system. This is a bit pattern - a bit being set indicates the fol‐
              lowing meanings:

              Bit   Meaning
              ────  ────────────────────────────────────
               0    Under-voltage detected
               1    Arm frequency capped
               2    Currently throttled
               3    Soft temperature limit active
              16    Under-voltage has occurred
              17    Arm frequency capping has occurred
              18    Throttling has occurred
              19    Soft temperature limit has occurred

つまり、以下のように明らかに電圧不足を検知していることが分かる。

  • 0x10000 : 電圧不足を検知
  • 0x40000 : CPUクロック低下を検知

対策

  • ACアダプタを変える
  • GPIO経由で給電する
  • メッセージ検知を消す

のようにいくつかの対策があるようだが、無難な対策はACアダプタを変えること。

Comments