public_notes/content/20240419200327 raspi pico.md

73 lines
No EOL
4.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 20240419200327 raspi pico
#moc #tech #embedded #raspi_pico
## とは?
Raspberry pi pico とは、 Raspberry Pi財団が開発したマイクロコントローラ、 [RP2040 Raspberry Pi](https://www.raspberrypi.com/products/rp2040/) と、その他必要な部品を実装してある開発用ボード。
## RP2040について
ボードにのっている主要なマイコン。
[RP2040 Raspberry Pi](https://www.raspberrypi.com/products/rp2040/)
### 基本的な性能
- ARM Cortex-M0 133MHz デュアルコア
- SRAM 264k
- Flash ROM無し(QSPI外付けで16MBまでサポート)
- UART x 2
- SPI x 2
- I2C x 2
- PWM x 16(?bit)
- USB 1.1コントローラ phy(picoでは使われている)
- ADC 4ch(500ksps, 12bit)
- 特徴的な PIO(programmable input-output) x 8
- [Raspberry Pi Documentation - RP2040](https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html)
- データシート: [rp2040-datasheet.pdf](https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf)
開発ボードによって搭載されているFlash ROMの容量が異なるので、その点注意。
## ハードウェアの種類
公式サイト(全部まとめてざっくり説明してある。細かはここに書かれていない) [Buy a Raspberry Pi Pico Raspberry Pi](https://www.raspberrypi.com/products/raspberry-pi-pico/)
### 公式のボード
Flashはいずれも2MB。
- Raspberry Pi Pico:
基本。 ピンヘッダ未実装。デバッグポートも2.54mmの通常のピンヘッダ/ピンソケットを取りつける仕様。USB MicroB。 [Raspberry Pi Pico — スイッチサイエンス](https://www.switch-science.com/products/6900)
- Raspberry Pi Pico H:
ピンヘッダ実装済み、 デバッグ用SWDはJST SHがマウントされており、デバッグプローブ付属のケーブルが直接挿せるようになっている。Flash 2MB。USBはMicroB。 [Raspberry Pi Pico H — スイッチサイエンス](https://www.switch-science.com/products/8170?src=raspberrypi)
- Raspberry Pi Pico W:
Raspberry Pi PicoにWiFi機能を追加したもの。WiFiは[CYW43439](https://www.infineon.com/cms/jp/product/wireless-connectivity/airoc-wi-fi-plus-bluetooth-combos/wi-fi-4-802.11n/cyw43439/)で実装されていて、SPIを使用している。 下記GPIOが使用できないので注意。
GPIO29 OP/IP wireless SPI CLK/ADC mode (ADC3) to measure VSYS/3
GPIO25 OP wireless SPI CS - when high also enables GPIO29 ADC pin to read VSYS
GPIO24 OP/IP wireless SPI data/IRQ
GPIO23 OP wireless power on signal
- Raspberry Pi Pico WH:
Raspberry Pi Pico Wのピンヘッダを実装したもの。
こちらも、デバッグ用SWDにはJST SHがマウントされている。
seeed, adafruitなどからもRP2040搭載のボードが発売されている。(微妙にPicoでは無いが、違いに注意して同じように使えるはず)
- [Seeed XIAO RP2040 - Supports Arduino, MicroPython and CircuitPython - Seeed Studio](https://www.seeedstudio.com/XIAO-RP2040-v1-0-p-5026.html)
- [Wio RP2040 WIFI Module - Build-in RP2040 + ESP8285 WIFI chip - Wireless 2.4G & IoT Platform Pico W-Seeed Studio - Seeed Studio](https://www.seeedstudio.com/Wio-RP2040-Module-p-4932.html)
- [Overview | Adafruit KB2040 | Adafruit Learning System](https://learn.adafruit.com/adafruit-kb2040) pro micro互換の形状。Flashがさりげに8MBある
- [Adafruit ItsyBitsy RP2040 : ID 4888 : Adafruit Industries, Unique & fun DIY electronics and kits](https://www.adafruit.com/product/4888) これもSPI Flashが8MB
秋月も独自のボードを販売している: [AE-RP2040](https://akizukidenshi.com/catalog/g/g117542/) Flash:2MB。 これは他では買えない、独自のものなので注意。
aliexpressなどには非公式のボードがいくらでもある。 USB TypeC、 Flash 16MBなどが選べる。
[https://ja.aliexpress.com/w/wholesale-rp2040.html?spm=a2g0o.home.search.0](https://ja.aliexpress.com/w/wholesale-rp2040.html?spm=a2g0o.home.search.0)
- 例: [TypeC, 16MB(謎のLED無し)](https://ja.aliexpress.com/item/1005005174412188.htm)
## デバッグプローブ
- [Raspberry Pi PicoをRaspberry Pi デバッグプローブとPlatform IOを使ってデバッグする | 豆蔵デベロッパーサイト](https://developer.mamezou-tech.com/blogs/2024/01/07/raspberry-pi-pico-debug-by-debug-probe/)
- デバッグプローブ [【Arduino】Raspberry Pi Pico/W をデバッグするPicoprobeの作り方、Arduinoプログラミング ](https://karakuri-musha.com/inside-technology/arduino-raspberrypi-picow-tips-picoprobe01/)
## マザーボード
これを買ってみた。[EP-0140 - 52Pi Wiki](https://wiki.52pi.com/index.php?title=EP-0140)
その他には、 ロボティクス向けの[Maker Pi RP2040](https://www.cytron.io/p-maker-pi-rp2040-simplifying-robotics-with-raspberry-pi-rp2040) などがある。