diff --git a/Documentation/platforms/arm/rp2040/boards/adafruit-feather-rp2040/README.txt b/Documentation/platforms/arm/rp2040/boards/adafruit-feather-rp2040/README.txt deleted file mode 100644 index 713a9ece2f1..00000000000 --- a/Documentation/platforms/arm/rp2040/boards/adafruit-feather-rp2040/README.txt +++ /dev/null @@ -1,191 +0,0 @@ -README -====== - -This directory contains the port of NuttX to the Adafruit Feather RP2040. -See https://www.adafruit.com/product/4884 for information -about Adafruit Feather RP2040. - -NuttX supports the following RP2040 capabilities: - - UART (console port) - - GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. - - I2C - - SPI (master only) - - DMAC - - PWM - - ADC - - Watchdog - - USB device - - MSC, CDC/ACM serial and these composite device are supported. - - CDC/ACM serial device can be used for the console. - - PIO (RP2040 Programmable I/O) - - Flash ROM Boot - - SRAM Boot - - If Pico SDK is available, nuttx.uf2 file which can be used in - BOOTSEL mode will be created. - - Persistent flash filesystem in unused flash ROM - -NuttX also provide support for these external devices: - - - BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - Pico Display Pack (ST7789 LCD) - - RGB leds and buttons are not supported yet. - - Pico Audio Pack (PCM5100A I2S DAC) - - I2S interface is realized by PIO. - - WS2812 smart pixel support - -There is currently no direct user mode access to these RP2040 hardware features: - - SPI Slave Mode - - SSI - - RTC - - Timers - -Installation -============ - -1. Download Raspberry Pi Pico SDK - - $ git clone -b 1.1.2 https://github.com/raspberrypi/pico-sdk.git - -2. Set PICO_SDK_PATH environment variable - - $ export PICO_SDK_PATH= - -3. Configure and build NuttX - - $ git clone https://github.com/apache/nuttx.git nuttx - $ git clone https://github.com/apache/nuttx-apps.git apps - $ cd nuttx - $ make distclean - $ ./tools/configure.sh raspberrypi-pico:nsh - $ make V=1 - -4. Connect Adafruit Feather RP2040 board to USB port while pressing BOOTSEL. - The board will be detected as USB Mass Storage Device. - Then copy "nuttx.uf2" into the device. - (Same manner as the standard Pico SDK applications installation.) - -5. To access the console, GPIO 0 and 1 pins must be connected to the - device such as USB-serial converter. - - `usbnsh` configuration provides the console access by USB CDC/ACM serial - devcice. The console is available by using a terminal software on the USB - host. - -Defconfigs -========== - -- nsh - Minimum configuration with NuttShell - -- nsh-flash - NuttX shell with SMART flash filesystem. - -- nshsram - Load NuttX binary to SRAM - -- smp - Enable SMP mode. Both Core 0 and Core 1 are used by NuttX. - -- ssd1306 - SSD1306 OLED display (I2C) test configuration - Connection: - SSD1306 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 3V3 OUT (Pin 36) - SDA ----- GP4 (I2C0 SDA) (Pin 6) - SCL ----- GP5 (I2C0 SCL) (Pin 7) - -- lcd1602 - LCD 1602 Segment LCD Disaply (I2C) - Connection: - PCF8574 BackPack Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 5V Vbus (Pin 40) - SDA ----- GP4 (I2C0 SDA) (Pin 6) - SCL ----- GP5 (I2C0 SCL) (Pin 7) -- spisd - SD card support (SPI connection) - Connection: - SD card slot Raspberry Pi Pico - DAT2 (NC) - DAT3/CS ----- GP17 (SPI0 CSn) (Pin 22) - CMD /DI ----- GP19 (SPI0 TX) (Pin 25) - VDD ----- 3V3 OUT (Pin 36) - CLK/SCK ----- GP18 (SPI0 SCK) (Pin 24) - VSS ----- GND (Pin 3 or 38 or ...) - DAT0/DO ----- GP16 (SPI0 RX) (Pin 21) - DAT1 (NC) - * Card hot swapping is not supported. - -- st7735 - st7735 SPI LCD support - Connection: - st7735 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 5V Vbus (Pin 40) - SDA ----- GP15 (SPI1 TX) (Pin 20) - SCK ----- GP14 (SPI1 SCK) (Pin 19) - CS ----- GP13 (SPI1 CSn) (Pin 17) - AO(D/C) ----- GP12 (SPI1 RX) (Pin 16) - BL ----- GP11 (Pin 15) - RESET ----- GP10 (Pin 14) - -- enc28j60 - ENC28J60 SPI ethernet controller support - - IP address is configured by DHCP. - - DNS address is 8.8.8.8 (CONFIG_NETINIT_DNSIPADDR) - - NTP client is enabled. - Connection: - ENC28J60 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - 3.3 ----- 3V3 OUT (Pin 36) - SI ----- GP15 (SPI1 TX) (Pin 20) - SCK ----- GP14 (SPI1 SCK) (Pin 19) - CS ----- GP13 (SPI1 CSn) (Pin 17) - SO ----- GP12 (SPI1 RX) (Pin 16) - INT ----- GP11 (Pin 15) - RESET ----- GP10 (Pin 14) - -- displaypack - Pico Display Pack support - See the following page for connection: - https://shop.pimoroni.com/products/pico-display-pack - -- audiopack - Pico Audio Pack support - See the following page for connection: - https://shop.pimoroni.com/products/pico-audio-pack - SD card interface is also enabled. - -- usbnsh - USB CDC/ACM serial console with NuttShell - -- usbmsc - USB MSC and CDC/ACM support - `msconn` and `sercon` commands enable the MSC and CDC/ACM devices. - The MSC support provides the interface to the SD card with SPI, - so the SD card slot connection like spisd configuration is required. - -- composite - USB composite device (MSC + CDC/ACM) support - `conn` command enables the composite device. - -License exceptions -================== - -The following files are originated from the files in Pico SDK. -So, the files are licensed under 3-Clause BSD same as Pico SDK. - -- arch/arm/src/rp2040/rp2040_clock.c -- arch/arm/src/rp2040/rp2040_pll.c -- arch/arm/src/rp2040/rp2040_xosc.c - - These are created by referring the Pico SDK clock initialization. - -- arch/arm/src/rp2040/rp2040_pio.c -- arch/arm/src/rp2040/rp2040_pio.h -- arch/arm/src/rp2040/rp2040_pio_instructions.h - - These provide the similar APIs to Pico SDK's hardware_pio APIs. - -- arch/arm/src/rp2040/hardware/*.h - - These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/adafruit-feather-rp2040/index.rst b/Documentation/platforms/arm/rp2040/boards/adafruit-feather-rp2040/index.rst index fb7656d541b..c5febadec2e 100644 --- a/Documentation/platforms/arm/rp2040/boards/adafruit-feather-rp2040/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/adafruit-feather-rp2040/index.rst @@ -8,6 +8,9 @@ Adafruit. .. figure:: Feather.png :align: center +See the `Adafruit website `_ for +information about Adafruit Feather RP2040. + Features ======== @@ -73,7 +76,7 @@ Pad Signal Notes 11 GPIO18 12 GPIO19 13 GPIO20 -14 GPIO1 Default RX for UART1 serial console +14 GPIO1 Default RX for UART0 serial console 15 GPIO0 Default TX for UART0 serial console 16 GPIO6 17 GPIO2 @@ -117,6 +120,105 @@ in PFM mode which provides the best efficiency, but may be switched to PWM mode for improved ripple by outputting a one on GPIO23. +Supported Capabilities +====================== + +NuttX supports the following RP2040 capabilities: + +* UART (console port) + + * GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. + +* I2C +* SPI (master only) +* DMAC +* PWM +* ADC +* Watchdog +* USB device + + * MSC, CDC/ACM serial and these composite device are supported. + * CDC/ACM serial device can be used for the console. + +* PIO (RP2040 Programmable I/O) +* Flash ROM Boot +* SRAM Boot + + * If Pico SDK is available, nuttx.uf2 file which can be used in BOOTSEL mode will be created. + +* Persistent flash filesystem in unused flash ROM +* WiFi wireless communication + +There is currently no direct user mode access to these RP2040 hardware features: + +* SPI Slave Mode +* SSI +* RTC +* Timers + +NuttX also provide support for these external devices: + +* BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) +* INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) +* SHT4X sensor at I2C0 +* Pico Display Pack (ST7789 LCD) + + * RGB leds and buttons are not supported yet. + +* Pico Audio Pack (PCM5100A I2S DAC) + + * I2S interface is realized by PIO. + +* WS2812 smart pixel support + +Installation +============ + +1. Download Raspberry Pi Pico SDK. + +.. code-block:: console + + $ git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git + +2. Download and install picotool + + Instructions can be found here: https://github.com/raspberrypi/picotool + + If you are on Arch Linux, you can install the picotool through the AUR: + +.. code-block:: console + + $ yay -S picotool + +3. Set PICO_SDK_PATH environment variable + +.. code-block:: console + + $ export PICO_SDK_PATH= + +4. Configure and build NuttX + +.. code-block:: console + + $ git clone https://github.com/apache/nuttx.git nuttx + $ git clone https://github.com/apache/nuttx-apps.git apps + $ cd nuttx + $ make distclean + $ ./tools/configure.sh raspberrypi-pico-w:nsh + $ make V=1 + +5. Connect the Adafruit Feather RP2040 board to the USB port while pressing + BOOTSEL. + The board will be detected as USB Mass Storage Device. + Then copy "nuttx.uf2" into the device. + (Same manner as the standard Pico SDK applications installation.) + +6. To access the console, GPIO 0 and 1 pins must be connected to the + device such as USB-serial converter. + + `usbnsh` configuration provides the console access by USB CDC/ACM serial + device. The console is available by using a terminal software on the USB + host. Configurations ============== @@ -127,11 +229,17 @@ audiopack NuttShell configuration (console enabled in UART0, at 115200 bps) with support for NXPlayer audio player. +Pico Audio Pack support. +See the following page for connection: +https://shop.pimoroni.com/products/pico-audio-pack +SD card interface is also enabled. + composite --------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -CDC/ACM with MSC USB composite driver. +CDC/ACM with MSC USB composite driver. ``conn`` command enables the composite +device. displaypack ----------- @@ -139,17 +247,64 @@ displaypack NuttShell configuration (console enabled in USB Port, at 115200 bps) supporting ST7789 video display. +See the following page for connection: +https://shop.pimoroni.com/products/pico-display-pack + enc28j60 -------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -NC28J60. +ENC28J60. + +ENC28J60 SPI ethernet controller supports: + + - IP address is configured by DHCP. + - DNS address is 8.8.8.8 (CONFIG_NETINIT_DNSIPADDR) + - NTP client is enabled. + +.. list-table:: ENC28J60 connections + :widths: auto + :header-rows: 1 + + * - ENC28J60 + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - 3.3V + - 3V3 OUT (Pin 36) + * - SI + - GP15 (SPI1 TX) (Pin 20) + * - SCK + - GP14 (SPI1 SCK) (Pin 19) + * - CS + - GP13 (SPI1 CSn) (Pin 17) + * - SO + - GP12 (SPI1 RX) (Pin 16) + * - INT + - GP11 (Pin 15) + * - RESET + - GP10 (Pin 14) lcd1602 ------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -LCD1602. +LCD1602 Segment LCD Display (I2C). + +.. list-table:: LCD1602 connections + :widths: auto + :header-rows: 1 + + * - PCF8574 BackPack + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 5V Vbus (Pin 40) + * - SDA + - GP4 (I2C0 SDA) (Pin 6) + * - SCL + - GP5 (I2C0 SCL) (Pin 7) nsh --- @@ -177,30 +332,100 @@ both ARM cores enabled. spisd ----- -NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI configured. +NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI SD +card support enabled. + +.. list-table:: spisd connections + :widths: auto + :header-rows: 1 + + * - SD card slot + - Raspberry Pi Pico W + * - DAT2 + - Not connected + * - DAT3/CS + - GP17 (SPI0 CSn) (Pin 22) + * - CMD /DI + - GP19 (SPI0 TX) (Pin 25) + * - VDD + - 3V3 OUT (Pin 36) + * - CLK/SCK + - GP18 (SPI0 SCK) (Pin 24) + * - VSS + - GND (Pin 3 or 38 or ...) + * - DAT0/DO + - GP16 (SPI0 RX) (Pin 21) + * - DAT1 + - Not connected + +Card hot swapping is not supported. ssd1306 ------- -NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -ssd1306. +NuttShell configuration (console enabled in UART0, at 115200 bps) with support +for SSD1306 OLED display (I2C) test configuration. + +.. list-table:: SSD1306 connections + :widths: auto + :header-rows: 1 + + * - SSD1306 + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 3V3 OUT (Pin 36) + * - SDA + - GP4 (I2C0 SDA) (Pin 6) + * - SCL + - GP5 (I2C0 SCL) (Pin 7) st7735 ------ NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -st7735. +ST7735 SPI LCD. + +.. list-table:: ST7735 connections + :widths: auto + :header-rows: 1 + + * - st7735 + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 5V Vbus (Pin 40) + * - SDA + - GP15 (SPI1 TX) (Pin 20) + * - SCK + - GP14 (SPI1 SCK) (Pin 19) + * - CS + - GP13 (SPI1 CSn) (Pin 17) + * - AO(D/C) + - GP12 (SPI1 RX) (Pin 16) + * - BL + - GP11 (Pin 15) + * - RESET + - GP10 (Pin 14) + usbmsc ------ NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -usbmsc. +USB MSC and CDC/ACM. + +``msconn`` and ``sercon`` commands enable the MSC and CDC/ACM devices. The MSC +support provides the interface to the SD card with SPI, so the SD card slot +connection like spisd configuration is required. usbnsh ------ -Basic NuttShell configuration (console enabled in USB Port, at 115200 bps). +Basic NuttShell configuration using CDC/ACM serial (console enabled in USB Port, +at 115200 bps). waveshare-lcd-1.14 ------------------ @@ -214,8 +439,24 @@ waveshare-lcd-1.3 NuttShell configuration (console enabled in UART0, at 115200 bps) with support for usbmsc. -README.txt -========== +License exceptions +================== -.. include:: README.txt - :literal: +The following files are originated from the files in Pico SDK. +So, the files are licensed under 3-Clause BSD same as Pico SDK. + +* arch/arm/src/rp2040/rp2040_clock.c +* arch/arm/src/rp2040/rp2040_pll.c +* arch/arm/src/rp2040/rp2040_xosc.c + + * These are created by referring the Pico SDK clock initialization. + +* arch/arm/src/rp2040/rp2040_pio.c +* arch/arm/src/rp2040/rp2040_pio.h +* arch/arm/src/rp2040/rp2040_pio_instructions.h + + * These provide the similar APIs to Pico SDK's hardware_pio APIs. + +* arch/arm/src/rp2040/hardware/\*.h + + * These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/adafruit-kb2040/README.txt b/Documentation/platforms/arm/rp2040/boards/adafruit-kb2040/README.txt deleted file mode 100644 index b7a2adf81e7..00000000000 --- a/Documentation/platforms/arm/rp2040/boards/adafruit-kb2040/README.txt +++ /dev/null @@ -1,190 +0,0 @@ -README -====== - -This directory contains the port of NuttX to the Adafruit KB2040. -See https://www.adafruit.com/product/5302 for information about Adafruit KB2040. - -NuttX supports the following RP2040 capabilities: - - UART (console port) - - GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. - - I2C - - SPI (master only) - - DMAC - - PWM - - ADC - - Watchdog - - USB device - - MSC, CDC/ACM serial and these composite device are supported. - - CDC/ACM serial device can be used for the console. - - PIO (RP2040 Programmable I/O) - - Flash ROM Boot - - SRAM Boot - - If Pico SDK is available, nuttx.uf2 file which can be used in - BOOTSEL mode will be created. - - Persistent flash filesystem in unused flash ROM - -NuttX also provide support for these external devices: - - - BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - Pico Display Pack (ST7789 LCD) - - RGB leds and buttons are not supported yet. - - Pico Audio Pack (PCM5100A I2S DAC) - - I2S interface is realized by PIO. - - WS2812 smart pixel support - -There is currently no direct user mode access to these RP2040 hardware features: - - SPI Slave Mode - - SSI - - RTC - - Timers - -Installation -============ - -1. Download Raspberry Pi Pico SDK - - $ git clone -b 1.1.2 https://github.com/raspberrypi/pico-sdk.git - -2. Set PICO_SDK_PATH environment variable - - $ export PICO_SDK_PATH= - -3. Configure and build NuttX - - $ git clone https://github.com/apache/nuttx.git nuttx - $ git clone https://github.com/apache/nuttx-apps.git apps - $ cd nuttx - $ make distclean - $ ./tools/configure.sh raspberrypi-pico:nsh - $ make V=1 - -4. Connect Adafruit KB2040 board to USB port while pressing BOOTSEL. - The board will be detected as USB Mass Storage Device. - Then copy "nuttx.uf2" into the device. - (Same manner as the standard Pico SDK applications installation.) - -5. To access the console, GPIO 0 and 1 pins must be connected to the - device such as USB-serial converter. - - `usbnsh` configuration provides the console access by USB CDC/ACM serial - devcice. The console is available by using a terminal software on the USB - host. - -Defconfigs -========== - -- nsh - Minimum configuration with NuttShell - -- nsh-flash - NuttX shell with SMART flash filesystem. - -- nshsram - Load NuttX binary to SRAM - -- smp - Enable SMP mode. Both Core 0 and Core 1 are used by NuttX. - -- ssd1306 - SSD1306 OLED display (I2C) test configuration - Connection: - SSD1306 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 3V3 OUT (Pin 36) - SDA ----- GP4 (I2C0 SDA) (Pin 6) - SCL ----- GP5 (I2C0 SCL) (Pin 7) - -- lcd1602 - LCD 1602 Segment LCD Disaply (I2C) - Connection: - PCF8574 BackPack Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 5V Vbus (Pin 40) - SDA ----- GP4 (I2C0 SDA) (Pin 6) - SCL ----- GP5 (I2C0 SCL) (Pin 7) -- spisd - SD card support (SPI connection) - Connection: - SD card slot Raspberry Pi Pico - DAT2 (NC) - DAT3/CS ----- GP17 (SPI0 CSn) (Pin 22) - CMD /DI ----- GP19 (SPI0 TX) (Pin 25) - VDD ----- 3V3 OUT (Pin 36) - CLK/SCK ----- GP18 (SPI0 SCK) (Pin 24) - VSS ----- GND (Pin 3 or 38 or ...) - DAT0/DO ----- GP16 (SPI0 RX) (Pin 21) - DAT1 (NC) - * Card hot swapping is not supported. - -- st7735 - st7735 SPI LCD support - Connection: - st7735 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 5V Vbus (Pin 40) - SDA ----- GP15 (SPI1 TX) (Pin 20) - SCK ----- GP14 (SPI1 SCK) (Pin 19) - CS ----- GP13 (SPI1 CSn) (Pin 17) - AO(D/C) ----- GP12 (SPI1 RX) (Pin 16) - BL ----- GP11 (Pin 15) - RESET ----- GP10 (Pin 14) - -- enc28j60 - ENC28J60 SPI ethernet controller support - - IP address is configured by DHCP. - - DNS address is 8.8.8.8 (CONFIG_NETINIT_DNSIPADDR) - - NTP client is enabled. - Connection: - ENC28J60 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - 3.3 ----- 3V3 OUT (Pin 36) - SI ----- GP15 (SPI1 TX) (Pin 20) - SCK ----- GP14 (SPI1 SCK) (Pin 19) - CS ----- GP13 (SPI1 CSn) (Pin 17) - SO ----- GP12 (SPI1 RX) (Pin 16) - INT ----- GP11 (Pin 15) - RESET ----- GP10 (Pin 14) - -- displaypack - Pico Display Pack support - See the following page for connection: - https://shop.pimoroni.com/products/pico-display-pack - -- audiopack - Pico Audio Pack support - See the following page for connection: - https://shop.pimoroni.com/products/pico-audio-pack - SD card interface is also enabled. - -- usbnsh - USB CDC/ACM serial console with NuttShell - -- usbmsc - USB MSC and CDC/ACM support - `msconn` and `sercon` commands enable the MSC and CDC/ACM devices. - The MSC support provides the interface to the SD card with SPI, - so the SD card slot connection like spisd configuration is required. - -- composite - USB composite device (MSC + CDC/ACM) support - `conn` command enables the composite device. - -License exceptions -================== - -The following files are originated from the files in Pico SDK. -So, the files are licensed under 3-Clause BSD same as Pico SDK. - -- arch/arm/src/rp2040/rp2040_clock.c -- arch/arm/src/rp2040/rp2040_pll.c -- arch/arm/src/rp2040/rp2040_xosc.c - - These are created by referring the Pico SDK clock initialization. - -- arch/arm/src/rp2040/rp2040_pio.c -- arch/arm/src/rp2040/rp2040_pio.h -- arch/arm/src/rp2040/rp2040_pio_instructions.h - - These provide the similar APIs to Pico SDK's hardware_pio APIs. - -- arch/arm/src/rp2040/hardware/*.h - - These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/adafruit-kb2040/index.rst b/Documentation/platforms/arm/rp2040/boards/adafruit-kb2040/index.rst index 199abe088fa..d8a74812819 100644 --- a/Documentation/platforms/arm/rp2040/boards/adafruit-kb2040/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/adafruit-kb2040/index.rst @@ -1,13 +1,16 @@ ======================== -Adafruit KB2040 Key Boar +Adafruit KB2040 Kee Boar ======================== -The KB2040 Key Boar is a general purpose RP2040 board supplied by +The KB2040 Kee Boar is a general purpose RP2040 board supplied by Adafruit. .. figure:: KB2040.png :align: center +See the `Adafruit website `_ for +information about Adafruit KB2040. + Features ======== @@ -57,7 +60,7 @@ Pad Signal Notes ===== ========== ========== 1 D+ Alternate USB data connection. 2 GPIO0 Default TX for UART0 serial console -3 GPIO1 Default RX for UART1 serial console +3 GPIO1 Default RX for UART0 serial console 4 Ground 5 Ground 6 GPIO2 @@ -94,6 +97,105 @@ or by supplying +5V to pin 23. The Raspberry Pi Pico chip run on 3.3 volts. This is supplied by an onboard voltage regulator. +Supported Capabilities +====================== + +NuttX supports the following RP2040 capabilities: + +* UART (console port) + + * GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. + +* I2C +* SPI (master only) +* DMAC +* PWM +* ADC +* Watchdog +* USB device + + * MSC, CDC/ACM serial and these composite device are supported. + * CDC/ACM serial device can be used for the console. + +* PIO (RP2040 Programmable I/O) +* Flash ROM Boot +* SRAM Boot + + * If Pico SDK is available, nuttx.uf2 file which can be used in BOOTSEL mode will be created. + +* Persistent flash filesystem in unused flash ROM +* WiFi wireless communication + +There is currently no direct user mode access to these RP2040 hardware features: + +* SPI Slave Mode +* SSI +* RTC +* Timers + +NuttX also provide support for these external devices: + +* BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) +* INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) +* SHT4X sensor at I2C0 +* Pico Display Pack (ST7789 LCD) + + * RGB leds and buttons are not supported yet. + +* Pico Audio Pack (PCM5100A I2S DAC) + + * I2S interface is realized by PIO. + +* WS2812 smart pixel support + +Installation +============ + +1. Download Raspberry Pi Pico SDK. + +.. code-block:: console + + $ git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git + +2. Download and install picotool + + Instructions can be found here: https://github.com/raspberrypi/picotool + + If you are on Arch Linux, you can install the picotool through the AUR: + +.. code-block:: console + + $ yay -S picotool + +3. Set PICO_SDK_PATH environment variable + +.. code-block:: console + + $ export PICO_SDK_PATH= + +4. Configure and build NuttX + +.. code-block:: console + + $ git clone https://github.com/apache/nuttx.git nuttx + $ git clone https://github.com/apache/nuttx-apps.git apps + $ cd nuttx + $ make distclean + $ ./tools/configure.sh adafruit-kb2040:nsh + $ make V=1 + +5. Connect the Adafruit KB2040 board to USB port while pressing BOOT. + The board will be detected as USB Mass Storage Device. Then copy "nuttx.uf2" + into the device (Same manner as the standard Pico SDK applications + installation). + +6. To access the console, GPIO 0 (TX) and GPIO 1 (RX) pins must be connected to + the device such as USB-serial converter. + + `usbnsh` configuration provides the console access by USB CDC/ACM serial + decive. The console is available by using a terminal software on the USB + host. + Configurations ============== @@ -103,11 +205,17 @@ audiopack NuttShell configuration (console enabled in UART0, at 115200 bps) with support for NXPlayer audio player. +Pico Audio Pack support. +See the following page for connection: +https://shop.pimoroni.com/products/pico-audio-pack +SD card interface is also enabled. + composite --------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -CDC/ACM with MSC USB composite driver. +CDC/ACM with MSC USB composite driver. ``conn`` command enables the composite +device. displaypack ----------- @@ -115,17 +223,65 @@ displaypack NuttShell configuration (console enabled in USB Port, at 115200 bps) supporting ST7789 video display. +See the following page for connection: +https://shop.pimoroni.com/products/pico-display-pack + enc28j60 -------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -NC28J60. +ENC28J60. + +ENC28J60 SPI ethernet controller supports: + + - IP address is configured by DHCP. + - DNS address is 8.8.8.8 (CONFIG_NETINIT_DNSIPADDR) + - NTP client is enabled. + +.. list-table:: ENC28J60 connections + :widths: auto + :header-rows: 1 + + * - ENC28J60 + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - 3.3V + - 3V3 OUT (Pin 36) + * - SI + - GP15 (SPI1 TX) (Pin 20) + * - SCK + - GP14 (SPI1 SCK) (Pin 19) + * - CS + - GP13 (SPI1 CSn) (Pin 17) + * - SO + - GP12 (SPI1 RX) (Pin 16) + * - INT + - GP11 (Pin 15) + * - RESET + - GP10 (Pin 14) lcd1602 ------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -LCD1602. +LCD1602 Segment LCD Display (I2C). + +.. list-table:: LCD1602 connections + :widths: auto + :header-rows: 1 + + * - PCF8574 BackPack + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 5V Vbus (Pin 40) + * - SDA + - GP4 (I2C0 SDA) (Pin 6) + * - SCL + - GP5 (I2C0 SCL) (Pin 7) + nsh --- @@ -153,30 +309,101 @@ both ARM cores enabled. spisd ----- -NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI configured. +NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI SD +card support enabled. + +.. list-table:: spisd connections + :widths: auto + :header-rows: 1 + + * - SD card slot + - Raspberry Pi Pico W + * - DAT2 + - Not connected + * - DAT3/CS + - GP17 (SPI0 CSn) (Pin 22) + * - CMD /DI + - GP19 (SPI0 TX) (Pin 25) + * - VDD + - 3V3 OUT (Pin 36) + * - CLK/SCK + - GP18 (SPI0 SCK) (Pin 24) + * - VSS + - GND (Pin 3 or 38 or ...) + * - DAT0/DO + - GP16 (SPI0 RX) (Pin 21) + * - DAT1 + - Not connected + +Card hot swapping is not supported. ssd1306 ------- -NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -ssd1306. +NuttShell configuration (console enabled in UART0, at 115200 bps) with support +for SSD1306 OLED display (I2C) test configuration. + +.. list-table:: SSD1306 connections + :widths: auto + :header-rows: 1 + + * - SSD1306 + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 3V3 OUT (Pin 36) + * - SDA + - GP4 (I2C0 SDA) (Pin 6) + * - SCL + - GP5 (I2C0 SCL) (Pin 7) + st7735 ------ NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -st7735. +ST7735 SPI LCD. + +.. list-table:: ST7735 connections + :widths: auto + :header-rows: 1 + + * - st7735 + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 5V Vbus (Pin 40) + * - SDA + - GP15 (SPI1 TX) (Pin 20) + * - SCK + - GP14 (SPI1 SCK) (Pin 19) + * - CS + - GP13 (SPI1 CSn) (Pin 17) + * - AO(D/C) + - GP12 (SPI1 RX) (Pin 16) + * - BL + - GP11 (Pin 15) + * - RESET + - GP10 (Pin 14) + usbmsc ------ NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -usbmsc. +USB MSC and CDC/ACM. + +``msconn`` and ``sercon`` commands enable the MSC and CDC/ACM devices. The MSC +support provides the interface to the SD card with SPI, so the SD card slot +connection like spisd configuration is required. usbnsh ------ -Basic NuttShell configuration (console enabled in USB Port, at 115200 bps). +Basic NuttShell configuration using CDC/ACM serial (console enabled in USB Port, +at 115200 bps). waveshare-lcd-1.14 ------------------ @@ -190,8 +417,24 @@ waveshare-lcd-1.3 NuttShell configuration (console enabled in UART0, at 115200 bps) with support for usbmsc. -README.txt -========== +License exceptions +================== -.. include:: README.txt - :literal: +The following files are originated from the files in Pico SDK. +So, the files are licensed under 3-Clause BSD same as Pico SDK. + +* arch/arm/src/rp2040/rp2040_clock.c +* arch/arm/src/rp2040/rp2040_pll.c +* arch/arm/src/rp2040/rp2040_xosc.c + + * These are created by referring the Pico SDK clock initialization. + +* arch/arm/src/rp2040/rp2040_pio.c +* arch/arm/src/rp2040/rp2040_pio.h +* arch/arm/src/rp2040/rp2040_pio_instructions.h + + * These provide the similar APIs to Pico SDK's hardware_pio APIs. + +* arch/arm/src/rp2040/hardware/\*.h + + * These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/adafruit-qt-py-rp2040/README.txt b/Documentation/platforms/arm/rp2040/boards/adafruit-qt-py-rp2040/README.txt deleted file mode 100644 index 5dccebf539f..00000000000 --- a/Documentation/platforms/arm/rp2040/boards/adafruit-qt-py-rp2040/README.txt +++ /dev/null @@ -1,108 +0,0 @@ -README -====== - -This directory contains the port of NuttX to the Adafruit QT Py RP2040. -See https://learn.adafruit.com/adafruit-qt-py-2040 for information -about Adafruit QT Py RP2040. - -NuttX supports the following RP2040 capabilities: - - UART (console port) - - GPIO 5 (UART1 RX) and GPIO 20 (UART1 TX) are used for the console. - - I2C - - SPI (master only) - - DMAC - - PWM - - ADC - - Watchdog - - USB device - - MSC, CDC/ACM serial and these composite device are supported. - - CDC/ACM serial device can be used for the console. - - PIO (RP2040 Programmable I/O) - - Flash ROM Boot - - SRAM Boot - - If Pico SDK is available, nuttx.uf2 file which can be used in - BOOTSEL mode will be created. - - Persistent flash filesystem in unused flash ROM - -NuttX also provide support for these external devices: - - - WS2812 smart pixel support - -There is currently no direct user mode access to these RP2040 hardware features: - - SPI Slave Mode - - SSI - - RTC - - Timers - -Installation -============ - -1. Download Raspberry Pi Pico SDK - - $ git clone -b 1.1.2 https://github.com/raspberrypi/pico-sdk.git - -2. Set PICO_SDK_PATH environment variable - - $ export PICO_SDK_PATH= - -3. Configure and build NuttX - - $ git clone https://github.com/apache/nuttx.git nuttx - $ git clone https://github.com/apache/nuttx-apps.git apps - $ cd nuttx - $ make distclean - $ ./tools/configure.sh raspberrypi-pico:nsh - $ make V=1 - -4. Connect Adafruit KB2040 board to USB port while pressing BOOTSEL. - The board will be detected as USB Mass Storage Device. - Then copy "nuttx.uf2" into the device. - (Same manner as the standard Pico SDK applications installation.) - -5. To access the console, GPIO 20 (TX) and 5 (RX) pins must be connected to a - device such as USB-serial converter. - - `usbnsh` configuration provides the console access by USB CDC/ACM serial - devcice. The console is available by using a terminal software on the USB - host. - -Defconfigs -========== - -- nsh - Minimum configuration with NuttShell - -- nsh-flash - NuttX shell with SMART flash filesystem. - -- nshsram - Load NuttX binary to SRAM - -- smp - Enable SMP mode. Both Core 0 and Core 1 are used by NuttX. - -- usbnsh - USB CDC/ACM serial console with NuttShell - -- composite - USB composite device (MSC + CDC/ACM) support - `conn` command enables the composite device. - -License exceptions -================== - -The following files are originated from the files in Pico SDK. -So, the files are licensed under 3-Clause BSD same as Pico SDK. - -- arch/arm/src/rp2040/rp2040_clock.c -- arch/arm/src/rp2040/rp2040_pll.c -- arch/arm/src/rp2040/rp2040_xosc.c - - These are created by referring the Pico SDK clock initialization. - -- arch/arm/src/rp2040/rp2040_pio.c -- arch/arm/src/rp2040/rp2040_pio.h -- arch/arm/src/rp2040/rp2040_pio_instructions.h - - These provide the similar APIs to Pico SDK's hardware_pio APIs. - -- arch/arm/src/rp2040/hardware/*.h - - These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/adafruit-qt-py-rp2040/index.rst b/Documentation/platforms/arm/rp2040/boards/adafruit-qt-py-rp2040/index.rst index 40504b2bb31..cf4d62ec5a3 100644 --- a/Documentation/platforms/arm/rp2040/boards/adafruit-qt-py-rp2040/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/adafruit-qt-py-rp2040/index.rst @@ -8,6 +8,9 @@ Adafruit. .. figure:: QT-Py.png :align: center +See the `Adafruit website `_ +for information about the Adafruit QT Py RP2040. + Features ======== @@ -86,6 +89,93 @@ is need to run as a usb host. The Raspberry Pi Pico chip run on 3.3 volts which is supplied by an on board regulator. +Supported Capabilities +====================== + +NuttX supports the following RP2040 capabilities: + +* UART (console port) + + * GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. + +* I2C +* SPI (master only) +* DMAC +* PWM +* ADC +* Watchdog +* USB device + + * MSC, CDC/ACM serial and these composite device are supported. + * CDC/ACM serial device can be used for the console. + +* PIO (RP2040 Programmable I/O) +* Flash ROM Boot +* SRAM Boot + + * If Pico SDK is available, nuttx.uf2 file which can be used in BOOTSEL mode will be created. + +* Persistent flash filesystem in unused flash ROM +* WiFi wireless communication + +There is currently no direct user mode access to these RP2040 hardware features: + +* SPI Slave Mode +* SSI +* RTC +* Timers + +NuttX also provide support for these external devices: + +* WS2812 smart pixel support + +Installation +============ + +1. Download Raspberry Pi Pico SDK. + +.. code-block:: console + + $ git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git + +2. Download and install picotool + + Instructions can be found here: https://github.com/raspberrypi/picotool + + If you are on Arch Linux, you can install the picotool through the AUR: + +.. code-block:: console + + $ yay -S picotool + +3. Set PICO_SDK_PATH environment variable + +.. code-block:: console + + $ export PICO_SDK_PATH= + +4. Configure and build NuttX + +.. code-block:: console + + $ git clone https://github.com/apache/nuttx.git nuttx + $ git clone https://github.com/apache/nuttx-apps.git apps + $ cd nuttx + $ make distclean + $ ./tools/configure.sh adafruit-qt-py-rp2040:nsh + $ make V=1 + +5. Connect the Adafruit QT Py RP2040 board to USB port while pressing BOOT. + The board will be detected as USB Mass Storage Device. Then copy "nuttx.uf2" + into the device (Same manner as the standard Pico SDK applications + installation). + +6. To access the console, GPIO 20 (TX) and GPIO 5 (RX) pins must be connected to + the device such as USB-serial converter. + + `usbnsh` configuration provides the console access by USB CDC/ACM serial + decive. The console is available by using a terminal software on the USB + host. Configurations ============== @@ -121,10 +211,27 @@ both ARM cores enabled. usbnsh ------ -Basic NuttShell configuration (console enabled in USB Port, at 115200 bps). +Basic NuttShell configuration using CDC/ACM serial (console enabled in USB Port, +at 115200 bps). -README.txt -========== +License exceptions +================== -.. include:: README.txt - :literal: +The following files are originated from the files in Pico SDK. +So, the files are licensed under 3-Clause BSD same as Pico SDK. + +* arch/arm/src/rp2040/rp2040_clock.c +* arch/arm/src/rp2040/rp2040_pll.c +* arch/arm/src/rp2040/rp2040_xosc.c + + * These are created by referring the Pico SDK clock initialization. + +* arch/arm/src/rp2040/rp2040_pio.c +* arch/arm/src/rp2040/rp2040_pio.h +* arch/arm/src/rp2040/rp2040_pio_instructions.h + + * These provide the similar APIs to Pico SDK's hardware_pio APIs. + +* arch/arm/src/rp2040/hardware/\*.h + + * These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/pimoroni-tiny2040/README.txt b/Documentation/platforms/arm/rp2040/boards/pimoroni-tiny2040/README.txt deleted file mode 100644 index 91f05776c8c..00000000000 --- a/Documentation/platforms/arm/rp2040/boards/pimoroni-tiny2040/README.txt +++ /dev/null @@ -1,142 +0,0 @@ -README -====== - -This directory contains the port of NuttX to the Pimoroni Tiny 2040. -See https://shop.pimoroni.com/products/tiny-2040?variant=39560012234835 -for information about Pimoroni Tiny 2040. - -The Pimoroni Tiny 2040 has two buttons (RESET and BOOT) allowing to boot -from ROM without disconnecting the device. - -NuttX supports the following RP2040 capabilities: - - UART (console port) - - GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. - - I2C (not tested on Tiny 2040) - - SPI (master only) - - DMAC - - PWM - - ADC - - Watchdog - - USB device - - MSC, CDC/ACM serial and these composite device are supported. - - CDC/ACM serial device can be used for the console. - - PIO (RP2040 Programmable I/O) - - Flash ROM Boot - - SRAM Boot - - If Pico SDK is available, nuttx.uf2 file which can be used in - BOOTSEL mode will be created. - - Persistent flash filesystem in unused flash ROM - -NuttX also provide support for these external devices: - - - WS2812 smart pixel support - -There is currently no direct user mode access to these RP2040 hardware features: - - SPI Slave Mode - - SSI - - RTC - - Timers - -Installation -============ - -1. Download Raspberry Pi Pico SDK - - $ git clone -b 1.1.2 https://github.com/raspberrypi/pico-sdk.git - -2. Set PICO_SDK_PATH environment variable - - $ export PICO_SDK_PATH= - -3. Configure and build NuttX - - $ git clone https://github.com/apache/nuttx.git nuttx - $ git clone https://github.com/apache/nuttx-apps.git apps - $ cd nuttx - $ make distclean - $ ./tools/configure.sh pimoroni-tiny2040:nsh - $ make V=1 - -4. Connect Pimoroni Tiny 2040 board to USB port. While pressing the - BOOT button, shortly press the RESET button. On releasing the BOOT - button the board boots from internal ROM and will be detected as - USB Mass Storage Device. Then copy "nuttx.uf2" into the device. - (Same manner as the standard Pico SDK applications installation.) - -5. To access the console, GPIO 0 and 1 pins must be connected to the - device such as USB-serial converter. - - `usbnsh` configuration provides the console access by USB CDC/ACM serial - devcice. The console is available by using a terminal software on the USB - host. - -Defconfigs -========== - -- nsh - Minimum configuration with NuttShell - -- nsh-flash - NuttX shell with SMART flash filesystem. - -- nshsram - Load NuttX binary to SRAM - -- smp - Enable SMP mode. Both Core 0 and Core 1 are used by NuttX. - -- spisd - SD card support (SPI connection) - Connection: - SD card slot ----- Pimoroni Tiny 2040 - (Pin 9) DAT2 (NC) - (Pin 1) DAT3/CS ----- GP5 (SPI0 CSn) (Pin 11) - (Pin 2) CMD /DI ----- GP7 (SPI0 TX) (Pin 9) - (Pin 3) VSS ----- GND (Pin 2 or 8) - (Pin 4) VDD ----- 3V3 OUT (Pin 3) - (Pin 5) CLK/SCK ----- GP6 (SPI0 SCK) (Pin 10) - (Pin 6) VSS ----- GND (Pin 2 or 8) - (Pin 7) DAT0/DO ----- GP4 (SPI0 RX) (Pin 12) - (Pin 8) DAT1 (NC) - * Card hot swapping is not supported. - -- usbnsh - USB CDC/ACM serial console with NuttShell - -- usbmsc - USB MSC and CDC/ACM support - `msconn` and `sercon` commands enable the MSC and CDC/ACM devices. - The MSC support provides the interface to the SD card with SPI, - so the SD card slot connection like spisd configuration is required. - -- composite - USB composite device (MSC + CDC/ACM) support - `conn` command enables the composite device. - -- gpio - GPIO driver and example application 'gpio' based on nsh configuration. - Following GPIO are configured in include/board.h: - GPIO18 (out): onboard RGB LED (red) - GPIO19 (out): onboard RGB LED (green) - GPIO20 (out): onboard RGB LED (blue) - GPIO23 (in) : onboard BOOT (USER) button - * No interrupt pin configured. - -License exceptions -================== - -The following files are originated from the files in Pico SDK. -So, the files are licensed under 3-Clause BSD same as Pico SDK. - -- arch/arm/src/rp2040/rp2040_clock.c -- arch/arm/src/rp2040/rp2040_pll.c -- arch/arm/src/rp2040/rp2040_xosc.c - - These are created by referring the Pico SDK clock initialization. - -- arch/arm/src/rp2040/rp2040_pio.c -- arch/arm/src/rp2040/rp2040_pio.h -- arch/arm/src/rp2040/rp2040_pio_instructions.h - - These provide the similar APIs to Pico SDK's hardware_pio APIs. - -- arch/arm/src/rp2040/hardware/*.h - - These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/pimoroni-tiny2040/index.rst b/Documentation/platforms/arm/rp2040/boards/pimoroni-tiny2040/index.rst index 138b7cd882c..76162580348 100644 --- a/Documentation/platforms/arm/rp2040/boards/pimoroni-tiny2040/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/pimoroni-tiny2040/index.rst @@ -7,6 +7,13 @@ The Tiny2040 is a general purpose RP2040 board supplied by Pimoroni. .. figure:: Tiny2040.png :align: center +The Pimoroni Tiny 2040 has two buttons (RESET and BOOT) allowing to boot +from ROM without disconnecting the device. + +See the `Pimoroni website +`_ for +information about the Pimoroni Tiny 2040. + Features ======== @@ -78,6 +85,95 @@ or by supplying +5V to pin 1. The Raspberry Pi Pico chip run on 3.3 volts. This is supplied by an onboard voltage regulator. +Supported Capabilities +====================== + +NuttX supports the following RP2040 capabilities: + +* UART (console port) + + * GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. + +* I2C +* SPI (master only) +* DMAC +* PWM +* ADC +* Watchdog +* USB device + + * MSC, CDC/ACM serial and these composite device are supported. + * CDC/ACM serial device can be used for the console. + +* PIO (RP2040 Programmable I/O) +* Flash ROM Boot +* SRAM Boot + + * If Pico SDK is available, nuttx.uf2 file which can be used in BOOTSEL mode will be created. + +* Persistent flash filesystem in unused flash ROM +* WiFi wireless communication + +There is currently no direct user mode access to these RP2040 hardware features: + +* SPI Slave Mode +* SSI +* RTC +* Timers + +NuttX also provide support for these external devices: + +* WS2812 smart pixel support + +Installation +============ + +1. Download Raspberry Pi Pico SDK + +.. code-block:: console + + $ git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git + +2. Download and install picotool + + Instructions can be found here: https://github.com/raspberrypi/picotool + + If you are on Arch Linux, you can install the picotool through the AUR: + +.. code-block:: console + + $ yay -S picotool + +3. Set PICO_SDK_PATH environment variable + +.. code-block:: console + + $ export PICO_SDK_PATH= + +4. Configure and build NuttX + +.. code-block:: console + + $ git clone https://github.com/apache/nuttx.git nuttx + $ git clone https://github.com/apache/nuttx-apps.git apps + $ cd nuttx + $ make distclean + $ ./tools/configure.sh pimoroni-tiny2040:nsh + $ make V=1 + +5. Connect Pimoroni Tiny 2040 board to USB port. While pressing the + BOOT button, shortly press the RESET button. On releasing the BOOT + button the board boots from internal ROM and will be detected as + USB Mass Storage Device. Then copy "nuttx.uf2" into the device. + (Same manner as the standard Pico SDK applications installation.) + +6. To access the console, GPIO 0 and 1 pins must be connected to the + device such as USB-serial converter. + + `usbnsh` configuration provides the console access by USB CDC/ACM serial + decive. The console is available by using a terminal software on the USB + host. + Configurations ============== @@ -85,13 +181,31 @@ composite --------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -CDC/ACM with MSC USB composite driver. +CDC/ACM with MSC USB composite driver. ``conn`` command enables the composite +device. gpio -------- NuttShell configuration (console enabled in UART0, at 115200 bps) with GPIO examples. +.. list-table:: GPIO pin options + :widths: auto + :header-rows: 1 + + * - GPIO + - Function + * - GPIO18 + - Onboard RGB LED (red, out) + * - GPIO19 + - Onboard RGB LED (green, out) + * - GPIO20 + - Onboard RGB LED (blue, out) + * - GPIO23 + - Onboard BOOT button (user) + +No interrupt pin configured. + nsh --- @@ -118,21 +232,68 @@ both ARM cores enabled. spisd ----- -NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI configured. +NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI SD +card support enabled. + +.. list-table:: spisd connections + :widths: auto + :header-rows: 1 + + * - SD card slot + - Pimoroni Tiny 2040 + * - DAT2 + - Not connected + * - DAT3/CS + - GP5 (SPI0 CSn) (Pin 11) + * - CMD /DI + - GP7 (SPI0 TX) (Pin 9) + * - VDD + - 3V3 OUT (Pin 3) + * - CLK/SCK + - GP6 (SPI0 SCK) (Pin 10) + * - VSS + - GND (Pin 2 or 8) + * - DAT0/DO + - GP4 (SPI0 RX) (Pin 12) + * - DAT1 + - Not connected + +Card hot swapping is not supported. usbmsc ------ NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -usbmsc. +USB MSC and CDC/ACM. + +``msconn`` and ``sercon`` commands enable the MSC and CDC/ACM devices. The MSC +support provides the interface to the SD card with SPI, so the SD card slot +connection like spisd configuration is required. usbnsh ------ -Basic NuttShell configuration (console enabled in USB Port, at 115200 bps). +Basic NuttShell configuration using CDC/ACM serial (console enabled in USB Port, +at 115200 bps). -README.txt -========== +License exceptions +================== -.. include:: README.txt - :literal: +The following files are originated from the files in Pico SDK. +So, the files are licensed under 3-Clause BSD same as Pico SDK. + +* arch/arm/src/rp2040/rp2040_clock.c +* arch/arm/src/rp2040/rp2040_pll.c +* arch/arm/src/rp2040/rp2040_xosc.c + + * These are created by referring the Pico SDK clock initialization. + +* arch/arm/src/rp2040/rp2040_pio.c +* arch/arm/src/rp2040/rp2040_pio.h +* arch/arm/src/rp2040/rp2040_pio_instructions.h + + * These provide the similar APIs to Pico SDK's hardware_pio APIs. + +* arch/arm/src/rp2040/hardware/\*.h + + * These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico-w/README.txt b/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico-w/README.txt deleted file mode 100644 index f56681d409d..00000000000 --- a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico-w/README.txt +++ /dev/null @@ -1,216 +0,0 @@ -README -====== - -This directory contains the port of NuttX to the Raspberry Pi Pico. -See https://www.raspberrypi.org/products/raspberry-pi-pico/ for information -about Raspberry Pi Pico W - -NuttX supports the following RP2040 capabilities: - - UART (console port) - - GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. - - I2C - - SPI (master only) - - DMAC - - PWM - - ADC - - Watchdog - - USB device - - MSC, CDC/ACM serial and these composite device are supported. - - CDC/ACM serial device can be used for the console. - - PIO (RP2040 Programmable I/O) - - Flash ROM Boot - - SRAM Boot - - If Pico SDK is available, nuttx.uf2 file which can be used in - BOOTSEL mode will be created. - - Persistent flash filesystem in unused flash ROM - - WiFi wireless communication - -NuttX also provide support for these external devices: - - - BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - Pico Display Pack (ST7789 LCD) - - RGB leds and buttons are not supported yet. - - Pico Audio Pack (PCM5100A I2S DAC) - - I2S interface is realized by PIO. - - WS2812 smart pixel support - -There is currently no direct user mode access to these RP2040 hardware features: - - SPI Slave Mode - - SSI - - RTC - - Timers - -Installation -============ - -1. Download Raspberry Pi Pico SDK and update submodule(cyw43-driver) - - $ git clone -b 1.4.0 https://github.com/raspberrypi/pico-sdk.git - $ cd pico-sdk - $ git submodule update --init --recursive lib/cyw43-driver - -2. Download and install picotool - - Instructions can be found here: https://github.com/raspberrypi/picotool - - If you are on Arch Linux, you can install the picotool through the AUR: - $ yay -S picotool - - -3. Set PICO_SDK_PATH environment variable - - $ export PICO_SDK_PATH= - -4. Configure and build NuttX - - $ git clone https://github.com/apache/nuttx.git nuttx - $ git clone https://github.com/apache/nuttx-apps.git apps - $ cd nuttx - $ make distclean - $ ./tools/configure.sh raspberrypi-pico:nsh - $ make V=1 - -5. Connect Raspberry Pi Pico board to USB port while pressing BOOTSEL. - The board will be detected as USB Mass Storage Device. - Then copy "nuttx.uf2" into the device. - (Same manner as the standard Pico SDK applications installation.) - -6. To access the console, GPIO 0 and 1 pins must be connected to the - device such as USB-serial converter. - - `usbnsh` configuration provides the console access by USB CDC/ACM serial - devcice. The console is available by using a terminal software on the USB - host. - -Defconfigs -========== - -- nsh - Minimum configuration with NuttShell - -- nsh-flash - NuttX shell with SMART flash filesystem. - -- nshsram - Load NuttX binary to SRAM - -- smp - Enable SMP mode. Both Core 0 and Core 1 are used by NuttX. - -- telnet - NuttShell configuration (console enabled in UART0, at 115200 bps) with - WiFi client mode and both telnet server and client enabled. - - In order to use this configuration you must have RaspberryPi's pico-sdk - on your build system and have the PICO-SDK-PATH environment variable - set with the location of pico-sdk. - - After loading this configuration use make menuconfig to change the - country code in Device Drivers->Wireless Device Support->IEEE 802.11 - Device Support and the wireless configuration in Application - Configuration->Network Utilities->Network initialization->WAPI - Configuration to match your wireless network. - -- ssd1306 - SSD1306 OLED display (I2C) test configuration - Connection: - SSD1306 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 3V3 OUT (Pin 36) - SDA ----- GP4 (I2C0 SDA) (Pin 6) - SCL ----- GP5 (I2C0 SCL) (Pin 7) - -- lcd1602 - LCD 1602 Segment LCD Disaply (I2C) - Connection: - PCF8574 BackPack Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 5V Vbus (Pin 40) - SDA ----- GP4 (I2C0 SDA) (Pin 6) - SCL ----- GP5 (I2C0 SCL) (Pin 7) -- spisd - SD card support (SPI connection) - Connection: - SD card slot Raspberry Pi Pico - DAT2 (NC) - DAT3/CS ----- GP17 (SPI0 CSn) (Pin 22) - CMD /DI ----- GP19 (SPI0 TX) (Pin 25) - VDD ----- 3V3 OUT (Pin 36) - CLK/SCK ----- GP18 (SPI0 SCK) (Pin 24) - VSS ----- GND (Pin 3 or 38 or ...) - DAT0/DO ----- GP16 (SPI0 RX) (Pin 21) - DAT1 (NC) - * Card hot swapping is not supported. - -- st7735 - st7735 SPI LCD support - Connection: - st7735 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 5V Vbus (Pin 40) - SDA ----- GP15 (SPI1 TX) (Pin 20) - SCK ----- GP14 (SPI1 SCK) (Pin 19) - CS ----- GP13 (SPI1 CSn) (Pin 17) - AO(D/C) ----- GP12 (SPI1 RX) (Pin 16) - BL ----- GP11 (Pin 15) - RESET ----- GP10 (Pin 14) - -- enc28j60 - ENC28J60 SPI ethernet controller support - - IP address is configured by DHCP. - - DNS address is 8.8.8.8 (CONFIG_NETINIT_DNSIPADDR) - - NTP client is enabled. - Connection: - ENC28J60 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - 3.3 ----- 3V3 OUT (Pin 36) - SI ----- GP15 (SPI1 TX) (Pin 20) - SCK ----- GP14 (SPI1 SCK) (Pin 19) - CS ----- GP13 (SPI1 CSn) (Pin 17) - SO ----- GP12 (SPI1 RX) (Pin 16) - INT ----- GP11 (Pin 15) - RESET ----- GP10 (Pin 14) - -- displaypack - Pico Display Pack support - See the following page for connection: - https://shop.pimoroni.com/products/pico-display-pack - -- audiopack - Pico Audio Pack support - See the following page for connection: - https://shop.pimoroni.com/products/pico-audio-pack - SD card interface is also enabled. - -- usbnsh - USB CDC/ACM serial console with NuttShell - -- usbmsc - USB MSC and CDC/ACM support - `msconn` and `sercon` commands enable the MSC and CDC/ACM devices. - The MSC support provides the interface to the SD card with SPI, - so the SD card slot connection like spisd configuration is required. - -- composite - USB composite device (MSC + CDC/ACM) support - `conn` command enables the composite device. - -License exceptions -================== - -The following files are originated from the files in Pico SDK. -So, the files are licensed under 3-Clause BSD same as Pico SDK. - -- arch/arm/src/rp2040/rp2040_clock.c -- arch/arm/src/rp2040/rp2040_pll.c -- arch/arm/src/rp2040/rp2040_xosc.c - - These are created by referring the Pico SDK clock initialization. - -- arch/arm/src/rp2040/rp2040_pio.c -- arch/arm/src/rp2040/rp2040_pio.h -- arch/arm/src/rp2040/rp2040_pio_instructions.h - - These provide the similar APIs to Pico SDK's hardware_pio APIs. - -- arch/arm/src/rp2040/hardware/*.h - - These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico-w/index.rst b/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico-w/index.rst index 10df77037cc..db526ebf3ae 100644 --- a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico-w/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico-w/index.rst @@ -3,7 +3,7 @@ Raspberry Pi Pico W =============================== The `Raspberry Pi Pico `_ is a general purpose board supplied by -the Raspberry Pi Foundation. The W variant adds built in WiFi communications. +the Raspberry Pi Foundation. The W variant adds built in WiFi communications. .. figure:: RaspberryPiPicoW.png :align: center @@ -59,32 +59,32 @@ Pin Mapping Pin Signal Notes ===== ========== ========== 1 GPIO0 Default TX for UART0 serial console -2 GPIO1 Default RX for UART1 serial console +2 GPIO1 Default RX for UART0 serial console 3 Ground 4 GPIO2 5 GPIO3 -6 GPIO4 -7 GPIO5 +6 GPIO4 Default SDA for I2C0 +7 GPIO5 Default SCL for I2C0 8 Ground -9 GPIO6 -10 GPIO7 -11 GPIO8 -12 GPIO9 +9 GPIO6 Default SDA for I2C1 +10 GPIO7 Default SCL for I2C1 +11 GPIO8 Default RX for SPI1 +12 GPIO9 Default CSn for SPI1 13 Ground -14 GPIO10 -15 GPIO11 +14 GPIO10 Default SCK for SPI1 +15 GPIO11 Default TX for SPI1 16 GPIO12 17 GPIO13 18 Ground 19 GPIO14 20 GPIO15 -21 GPIO16 -22 GPIO17 +21 GPIO16 Default RX for SPI0 +22 GPIO17 Default CSn for SPI0 23 Ground -24 GPIO18 -25 GPIO19 -26 GPIO20 -27 GPIO21 +24 GPIO18 Default SCK for SPI0 +25 GPIO19 Default TX for SPI0 +26 GPIO20 Default TX for UART1 serial console +27 GPIO21 Default RX for UART1 serial console 28 Ground 29 GPIO22 30 Run @@ -92,7 +92,7 @@ Pin Signal Notes 32 GPIO27 ADC1 33 AGND Analog Ground 34 GPIO28 ADC2 -35 ADC_VREF +35 ADC_VREF Analog reference voltage 36 3V3 Power output to peripherals 37 3V3_EN Pull to ground to turn off. 38 Ground @@ -121,9 +121,9 @@ Separate pins for the Serial Debug Port (SDB) are available WiFi Controller GPIO ==================== -GPIO0 - Output - On board LED. -GPIO1 - Output - Power supply control. -GPIO2 - Input - High if USB port or Pad 40 supplying power. +* GPIO0 - Output - On board LED. +* GPIO1 - Output - Power supply control. +* GPIO2 - Input - High if USB port or Pad 40 supplying power. Power Supply ============ @@ -142,6 +142,107 @@ in PFM mode which provides the best efficiency, but may be switched to PWM mode for improved ripple by outputting a one on the wireless chip's GPIO1 (not the RP2040's GPIO1). +Supported Capabilities +====================== + +NuttX supports the following RP2040 capabilities: + +* UART (console port) + + * GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. + +* I2C +* SPI (master only) +* DMAC +* PWM +* ADC +* Watchdog +* USB device + + * MSC, CDC/ACM serial and these composite device are supported. + * CDC/ACM serial device can be used for the console. + +* PIO (RP2040 Programmable I/O) +* Flash ROM Boot +* SRAM Boot + + * If Pico SDK is available, nuttx.uf2 file which can be used in BOOTSEL mode will be created. + +* Persistent flash filesystem in unused flash ROM +* WiFi wireless communication + +There is currently no direct user mode access to these RP2040 hardware features: + +* SPI Slave Mode +* SSI +* RTC +* Timers + +NuttX also provide support for these external devices: + +* BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) +* INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) +* SHT4X sensor at I2C0 +* Pico Display Pack (ST7789 LCD) + + * RGB leds and buttons are not supported yet. + +* Pico Audio Pack (PCM5100A I2S DAC) + + * I2S interface is realized by PIO. + +* WS2812 smart pixel support + +Installation +============ + +1. Download Raspberry Pi Pico SDK and update submodule (cyw43-driver) + +.. code-block:: console + + $ git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git + $ cd pico-sdk + $ git submodule update --init --recursive lib/cyw43-driver + +2. Download and install picotool + + Instructions can be found here: https://github.com/raspberrypi/picotool + + If you are on Arch Linux, you can install the picotool through the AUR: + +.. code-block:: console + + $ yay -S picotool + +3. Set PICO_SDK_PATH environment variable + +.. code-block:: console + + $ export PICO_SDK_PATH= + +4. Configure and build NuttX + +.. code-block:: console + + $ git clone https://github.com/apache/nuttx.git nuttx + $ git clone https://github.com/apache/nuttx-apps.git apps + $ cd nuttx + $ make distclean + $ ./tools/configure.sh raspberrypi-pico-w:nsh + $ make V=1 + +5. Connect Raspberry Pi Pico board to USB port while pressing BOOTSEL. + The board will be detected as USB Mass Storage Device. + Then copy "nuttx.uf2" into the device. + (Same manner as the standard Pico SDK applications installation.) + +6. To access the console, GPIO 0 and 1 pins must be connected to the + device such as USB-serial converter. + + `usbnsh` configuration provides the console access by USB CDC/ACM serial + device. The console is available by using a terminal software on the USB + host. + Configurations ============== @@ -151,11 +252,17 @@ audiopack NuttShell configuration (console enabled in UART0, at 115200 bps) with support for NXPlayer audio player. +Pico Audio Pack support. +See the following page for connection: +https://shop.pimoroni.com/products/pico-audio-pack +SD card interface is also enabled. + composite --------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -CDC/ACM with MSC USB composite driver. +CDC/ACM with MSC USB composite driver. ``conn`` command enables the composite +device. displaypack ----------- @@ -163,17 +270,64 @@ displaypack NuttShell configuration (console enabled in USB Port, at 115200 bps) supporting ST7789 video display. +See the following page for connection: +https://shop.pimoroni.com/products/pico-display-pack + enc28j60 -------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -NC28J60. +ENC28J60. + +ENC28J60 SPI ethernet controller supports: + + - IP address is configured by DHCP. + - DNS address is 8.8.8.8 (CONFIG_NETINIT_DNSIPADDR) + - NTP client is enabled. + +.. list-table:: ENC28J60 connections + :widths: auto + :header-rows: 1 + + * - ENC28J60 + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - 3.3V + - 3V3 OUT (Pin 36) + * - SI + - GP15 (SPI1 TX) (Pin 20) + * - SCK + - GP14 (SPI1 SCK) (Pin 19) + * - CS + - GP13 (SPI1 CSn) (Pin 17) + * - SO + - GP12 (SPI1 RX) (Pin 16) + * - INT + - GP11 (Pin 15) + * - RESET + - GP10 (Pin 14) lcd1602 ------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -LCD1602. +LCD1602 Segment LCD Display (I2C). + +.. list-table:: LCD1602 connections + :widths: auto + :header-rows: 1 + + * - PCF8574 BackPack + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 5V Vbus (Pin 40) + * - SDA + - GP4 (I2C0 SDA) (Pin 6) + * - SCL + - GP5 (I2C0 SCL) (Pin 7) nsh --- @@ -201,19 +355,83 @@ both ARM cores enabled. spisd ----- -NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI configured. +NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI SD +card support enabled. + +.. list-table:: spisd connections + :widths: auto + :header-rows: 1 + + * - SD card slot + - Raspberry Pi Pico W + * - DAT2 + - Not connected + * - DAT3/CS + - GP17 (SPI0 CSn) (Pin 22) + * - CMD /DI + - GP19 (SPI0 TX) (Pin 25) + * - VDD + - 3V3 OUT (Pin 36) + * - CLK/SCK + - GP18 (SPI0 SCK) (Pin 24) + * - VSS + - GND (Pin 3 or 38 or ...) + * - DAT0/DO + - GP16 (SPI0 RX) (Pin 21) + * - DAT1 + - Not connected + +Card hot swapping is not supported. ssd1306 ------- -NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -ssd1306. +NuttShell configuration (console enabled in UART0, at 115200 bps) with support +for SSD1306 OLED display (I2C) test configuration. + +.. list-table:: SSD1306 connections + :widths: auto + :header-rows: 1 + + * - SSD1306 + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 3V3 OUT (Pin 36) + * - SDA + - GP4 (I2C0 SDA) (Pin 6) + * - SCL + - GP5 (I2C0 SCL) (Pin 7) st7735 ------ NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -st7735. +ST7735 SPI LCD. + +.. list-table:: ST7735 connections + :widths: auto + :header-rows: 1 + + * - st7735 + - Raspberry Pi Pico W + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 5V Vbus (Pin 40) + * - SDA + - GP15 (SPI1 TX) (Pin 20) + * - SCK + - GP14 (SPI1 SCK) (Pin 19) + * - CS + - GP13 (SPI1 CSn) (Pin 17) + * - AO(D/C) + - GP12 (SPI1 RX) (Pin 16) + * - BL + - GP11 (Pin 15) + * - RESET + - GP10 (Pin 14) telnet ------ @@ -230,12 +448,17 @@ usbmsc ------ NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -usbmsc. +USB MSC and CDC/ACM. + +``msconn`` and ``sercon`` commands enable the MSC and CDC/ACM devices. The MSC +support provides the interface to the SD card with SPI, so the SD card slot +connection like spisd configuration is required. usbnsh ------ -Basic NuttShell configuration (console enabled in USB Port, at 115200 bps). +Basic NuttShell configuration using CDC/ACM serial (console enabled in USB Port, +at 115200 bps). waveshare-lcd-1.14 ------------------ @@ -249,9 +472,24 @@ waveshare-lcd-1.3 NuttShell configuration (console enabled in UART0, at 115200 bps) with support for usbmsc. +License exceptions +================== -README.txt -========== +The following files are originated from the files in Pico SDK. +So, the files are licensed under 3-Clause BSD same as Pico SDK. -.. include:: README.txt - :literal: +* arch/arm/src/rp2040/rp2040_clock.c +* arch/arm/src/rp2040/rp2040_pll.c +* arch/arm/src/rp2040/rp2040_xosc.c + + * These are created by referring the Pico SDK clock initialization. + +* arch/arm/src/rp2040/rp2040_pio.c +* arch/arm/src/rp2040/rp2040_pio.h +* arch/arm/src/rp2040/rp2040_pio_instructions.h + + * These provide the similar APIs to Pico SDK's hardware_pio APIs. + +* arch/arm/src/rp2040/hardware/\*.h + + * These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico/README.txt b/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico/README.txt deleted file mode 100644 index 5a180cd0dc3..00000000000 --- a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico/README.txt +++ /dev/null @@ -1,198 +0,0 @@ -README -====== - -This directory contains the port of NuttX to the Raspberry Pi Pico. -See https://www.raspberrypi.org/products/raspberry-pi-pico/ for information -about Raspberry Pi Pico. - -NuttX supports the following RP2040 capabilities: - - UART (console port) - - GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. - - I2C - - SPI (master only) - - DMAC - - PWM - - ADC - - Watchdog - - USB device - - MSC, CDC/ACM serial and these composite device are supported. - - CDC/ACM serial device can be used for the console. - - PIO (RP2040 Programmable I/O) - - Flash ROM Boot - - SRAM Boot - - If Pico SDK is available, nuttx.uf2 file which can be used in - BOOTSEL mode will be created. - - Persistent flash filesystem in unused flash ROM - -NuttX also provide support for these external devices: - - - BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - Pico Display Pack (ST7789 LCD) - - RGB leds and buttons are not supported yet. - - Pico Audio Pack (PCM5100A I2S DAC) - - I2S interface is realized by PIO. - - WS2812 smart pixel support - -There is currently no direct user mode access to these RP2040 hardware features: - - SPI Slave Mode - - SSI - - RTC - - Timers - -Installation -============ - -1. Download Raspberry Pi Pico SDK - - $ git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git - -2. Download and install picotool - - Instructions can be found here: https://github.com/raspberrypi/picotool - - If you are on Arch Linux, you can install the picotool through the AUR: - $ yay -S picotool - -3. Set PICO_SDK_PATH environment variable - - $ export PICO_SDK_PATH= - -4. Configure and build NuttX - - $ git clone https://github.com/apache/nuttx.git nuttx - $ git clone https://github.com/apache/nuttx-apps.git apps - $ cd nuttx - $ make distclean - $ ./tools/configure.sh raspberrypi-pico:nsh - $ make V=1 - -5. Connect Raspberry Pi Pico board to USB port while pressing BOOTSEL. - The board will be detected as USB Mass Storage Device. - Then copy "nuttx.uf2" into the device. - (Same manner as the standard Pico SDK applications installation.) - -6. To access the console, GPIO 0 and 1 pins must be connected to the - device such as USB-serial converter. - - `usbnsh` configuration provides the console access by USB CDC/ACM serial - devcice. The console is available by using a terminal software on the USB - host. - -Defconfigs -========== - -- nsh - Minimum configuration with NuttShell - -- nsh-flash - NuttX shell with SMART flash filesystem. - -- nshsram - Load NuttX binary to SRAM - -- smp - Enable SMP mode. Both Core 0 and Core 1 are used by NuttX. - -- ssd1306 - SSD1306 OLED display (I2C) test configuration - Connection: - SSD1306 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 3V3 OUT (Pin 36) - SDA ----- GP4 (I2C0 SDA) (Pin 6) - SCL ----- GP5 (I2C0 SCL) (Pin 7) - -- lcd1602 - LCD 1602 Segment LCD Disaply (I2C) - Connection: - PCF8574 BackPack Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 5V Vbus (Pin 40) - SDA ----- GP4 (I2C0 SDA) (Pin 6) - SCL ----- GP5 (I2C0 SCL) (Pin 7) -- spisd - SD card support (SPI connection) - Connection: - SD card slot Raspberry Pi Pico - DAT2 (NC) - DAT3/CS ----- GP17 (SPI0 CSn) (Pin 22) - CMD /DI ----- GP19 (SPI0 TX) (Pin 25) - VDD ----- 3V3 OUT (Pin 36) - CLK/SCK ----- GP18 (SPI0 SCK) (Pin 24) - VSS ----- GND (Pin 3 or 38 or ...) - DAT0/DO ----- GP16 (SPI0 RX) (Pin 21) - DAT1 (NC) - * Card hot swapping is not supported. - -- st7735 - st7735 SPI LCD support - Connection: - st7735 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 5V Vbus (Pin 40) - SDA ----- GP15 (SPI1 TX) (Pin 20) - SCK ----- GP14 (SPI1 SCK) (Pin 19) - CS ----- GP13 (SPI1 CSn) (Pin 17) - AO(D/C) ----- GP12 (SPI1 RX) (Pin 16) - BL ----- GP11 (Pin 15) - RESET ----- GP10 (Pin 14) - -- enc28j60 - ENC28J60 SPI ethernet controller support - - IP address is configured by DHCP. - - DNS address is 8.8.8.8 (CONFIG_NETINIT_DNSIPADDR) - - NTP client is enabled. - Connection: - ENC28J60 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - 3.3 ----- 3V3 OUT (Pin 36) - SI ----- GP15 (SPI1 TX) (Pin 20) - SCK ----- GP14 (SPI1 SCK) (Pin 19) - CS ----- GP13 (SPI1 CSn) (Pin 17) - SO ----- GP12 (SPI1 RX) (Pin 16) - INT ----- GP11 (Pin 15) - RESET ----- GP10 (Pin 14) - -- displaypack - Pico Display Pack support - See the following page for connection: - https://shop.pimoroni.com/products/pico-display-pack - -- audiopack - Pico Audio Pack support - See the following page for connection: - https://shop.pimoroni.com/products/pico-audio-pack - SD card interface is also enabled. - -- usbnsh - USB CDC/ACM serial console with NuttShell - -- usbmsc - USB MSC and CDC/ACM support - `msconn` and `sercon` commands enable the MSC and CDC/ACM devices. - The MSC support provides the interface to the SD card with SPI, - so the SD card slot connection like spisd configuration is required. - -- composite - USB composite device (MSC + CDC/ACM) support - `conn` command enables the composite device. - -License exceptions -================== - -The following files are originated from the files in Pico SDK. -So, the files are licensed under 3-Clause BSD same as Pico SDK. - -- arch/arm/src/rp2040/rp2040_clock.c -- arch/arm/src/rp2040/rp2040_pll.c -- arch/arm/src/rp2040/rp2040_xosc.c - - These are created by referring the Pico SDK clock initialization. - -- arch/arm/src/rp2040/rp2040_pio.c -- arch/arm/src/rp2040/rp2040_pio.h -- arch/arm/src/rp2040/rp2040_pio_instructions.h - - These provide the similar APIs to Pico SDK's hardware_pio APIs. - -- arch/arm/src/rp2040/hardware/*.h - - These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico/index.rst b/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico/index.rst index e25db55f909..c8413fe9d30 100644 --- a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico/index.rst @@ -52,43 +52,43 @@ Pads numbered anticlockwise from USB connector. Pad Signal Notes ===== ========== ========== 1 GPIO0 Default TX for UART0 serial console -2 GPIO1 Default RX for UART1 serial console -3 Ground -4 GPIO2 -5 GPIO3 -6 GPIO4 -7 GPIO5 -8 Ground -9 GPIO6 -10 GPIO7 -11 GPIO8 -12 GPIO9 -13 Ground -14 GPIO10 -15 GPIO11 -16 GPIO12 -17 GPIO13 -18 Ground -19 GPIO14 -20 GPIO15 -21 GPIO16 -22 GPIO17 -23 Ground -24 GPIO18 -25 GPIO19 -26 GPIO20 -27 GPIO21 -28 Ground -29 GPIO22 -30 Run +2 GPIO1 Default RX for UART0 serial console +3 Ground +4 GPIO2 +5 GPIO3 +6 GPIO4 Default SDA for I2C0 +7 GPIO5 Default SCL for I2C0 +8 Ground +9 GPIO6 Default SDA for I2C1 +10 GPIO7 Default SCL for I2C1 +11 GPIO8 Default RX for SPI1 +12 GPIO9 Default CSn for SPI1 +13 Ground +14 GPIO10 Default SCK for SPI1 +15 GPIO11 Default TX for SPI1 +16 GPIO12 +17 GPIO13 +18 Ground +19 GPIO14 +20 GPIO15 +21 GPIO16 Default RX for SPI0 +22 GPIO17 Default CSn for SPI0 +23 Ground +24 GPIO18 Default SCK for SPI0 +25 GPIO19 Default TX for SPI0 +26 GPIO20 Default TX for UART1 serial console +27 GPIO21 Default RX for UART1 serial console +28 Ground +29 GPIO22 +30 Run 31 GPIO26 ADC0 32 GPIO27 ADC1 33 AGND Analog Ground 34 GPIO28 ADC2 -35 ADC_VREF +35 ADC_VREF Analog reference voltage 36 3V3 Power output to peripherals 37 3V3_EN Pull to ground to turn off. -38 Ground +38 Ground 39 VSYS +5V Supply to board 40 VBUS Connected to USB +5V ===== ========== ========== @@ -120,6 +120,106 @@ in PFM mode which provides the best efficiency, but may be switched to PWM mode for improved ripple by outputting a one on GPIO23. +Supported Capabilities +====================== + +NuttX supports the following RP2040 capabilities: + +* UART (console port) + + * GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. + +* I2C +* SPI (master only) +* DMAC +* PWM +* ADC +* Watchdog +* USB device + + * MSC, CDC/ACM serial and these composite device are supported. + * CDC/ACM serial device can be used for the console. + +* PIO (RP2040 Programmable I/O) +* Flash ROM Boot +* SRAM Boot + + * If Pico SDK is available, nuttx.uf2 file which can be used in BOOTSEL mode will be created. + +* Persistent flash filesystem in unused flash ROM +* WiFi wireless communication + +There is currently no direct user mode access to these RP2040 hardware features: + +* SPI Slave Mode +* SSI +* RTC +* Timers + +NuttX also provide support for these external devices: + +* BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) +* INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) +* SHT4X sensor at I2C0 +* Pico Display Pack (ST7789 LCD) + + * RGB leds and buttons are not supported yet. + +* Pico Audio Pack (PCM5100A I2S DAC) + + * I2S interface is realized by PIO. + +* WS2812 smart pixel support + +Installation +============ + +1. Download Raspberry Pi Pico SDK + +.. code-block:: console + + $ git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git + +2. Download and install picotool + + Instructions can be found here: https://github.com/raspberrypi/picotool + + If you are on Arch Linux, you can install the picotool through the AUR: + +.. code-block:: console + + $ yay -S picotool + +3. Set PICO_SDK_PATH environment variable + +.. code-block:: console + + $ export PICO_SDK_PATH= + +4. Configure and build NuttX + +.. code-block:: console + + $ git clone https://github.com/apache/nuttx.git nuttx + $ git clone https://github.com/apache/nuttx-apps.git apps + $ cd nuttx + $ make distclean + $ ./tools/configure.sh raspberrypi-pico:nsh + $ make V=1 + +5. Connect Raspberry Pi Pico board to USB port while pressing BOOTSEL. + The board will be detected as USB Mass Storage Device. + Then copy "nuttx.uf2" into the device. + (Same manner as the standard Pico SDK applications installation.) + +6. To access the console, GPIO 0 and 1 pins must be connected to the + device such as USB-serial converter. + + `usbnsh` configuration provides the console access by USB CDC/ACM serial + device. The console is available by using a terminal software on the USB + host. + + Configurations ============== @@ -129,6 +229,11 @@ audiopack NuttShell configuration (console enabled in UART0, at 115200 bps) with support for NXPlayer audio player. +Pico Audio Pack support. +See the following page for connection: +https://shop.pimoroni.com/products/pico-audio-pack +SD card interface is also enabled. + bmp280 ------ @@ -145,7 +250,8 @@ composite --------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -CDC/ACM with MSC USB composite driver. +CDC/ACM with MSC USB composite driver. ``conn`` command enables the composite +device. displaypack ----------- @@ -153,17 +259,64 @@ displaypack NuttShell configuration (console enabled in USB Port, at 115200 bps) supporting ST7789 video display. +See the following page for connection: +https://shop.pimoroni.com/products/pico-display-pack + enc28j60 -------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -NC28J60. +ENC28J60. + +ENC28J60 SPI ethernet controller supports: + + - IP address is configured by DHCP. + - DNS address is 8.8.8.8 (CONFIG_NETINIT_DNSIPADDR) + - NTP client is enabled. + +.. list-table:: ENC28J60 connections + :widths: auto + :header-rows: 1 + + * - ENC28J60 + - Raspberry Pi Pico + * - GND + - GND (Pin 3 or 38 or ...) + * - 3.3V + - 3V3 OUT (Pin 36) + * - SI + - GP15 (SPI1 TX) (Pin 20) + * - SCK + - GP14 (SPI1 SCK) (Pin 19) + * - CS + - GP13 (SPI1 CSn) (Pin 17) + * - SO + - GP12 (SPI1 RX) (Pin 16) + * - INT + - GP11 (Pin 15) + * - RESET + - GP10 (Pin 14) lcd1602 ------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -LCD1602. +LCD1602 Segment LCD Display (I2C). + +.. list-table:: LCD1602 connections + :widths: auto + :header-rows: 1 + + * - PCF8574 BackPack + - Raspberry Pi Pico + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 5V Vbus (Pin 40) + * - SDA + - GP4 (I2C0 SDA) (Pin 6) + * - SCL + - GP5 (I2C0 SCL) (Pin 7) nsh --- @@ -191,30 +344,99 @@ both ARM cores enabled. spisd ----- -NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI configured. +NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI SD +card support enabled. + +.. list-table:: spisd connections + :widths: auto + :header-rows: 1 + + * - SD card slot + - Raspberry Pi Pico + * - DAT2 + - Not connected + * - DAT3/CS + - GP17 (SPI0 CSn) (Pin 22) + * - CMD /DI + - GP19 (SPI0 TX) (Pin 25) + * - VDD + - 3V3 OUT (Pin 36) + * - CLK/SCK + - GP18 (SPI0 SCK) (Pin 24) + * - VSS + - GND (Pin 3 or 38 or ...) + * - DAT0/DO + - GP16 (SPI0 RX) (Pin 21) + * - DAT1 + - Not connected + +Card hot swapping is not supported. ssd1306 ------- -NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -ssd1306. +NuttShell configuration (console enabled in UART0, at 115200 bps) with support +for SSD1306 OLED display (I2C) test configuration. + +.. list-table:: SSD1306 connections + :widths: auto + :header-rows: 1 + + * - SSD1306 + - Raspberry Pi Pico + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 3V3 OUT (Pin 36) + * - SDA + - GP4 (I2C0 SDA) (Pin 6) + * - SCL + - GP5 (I2C0 SCL) (Pin 7) st7735 ------ NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -st7735. +ST7735 SPI LCD. + +.. list-table:: ST7735 connections + :widths: auto + :header-rows: 1 + + * - st7735 + - Raspberry Pi Pico + * - GND + - GND (Pin 3 or 38 or ...) + * - VCC + - 5V Vbus (Pin 40) + * - SDA + - GP15 (SPI1 TX) (Pin 20) + * - SCK + - GP14 (SPI1 SCK) (Pin 19) + * - CS + - GP13 (SPI1 CSn) (Pin 17) + * - AO(D/C) + - GP12 (SPI1 RX) (Pin 16) + * - BL + - GP11 (Pin 15) + * - RESET + - GP10 (Pin 14) usbmsc ------ NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -usbmsc. +USB MSC and CDC/ACM. + +``msconn`` and ``sercon`` commands enable the MSC and CDC/ACM devices. The MSC +support provides the interface to the SD card with SPI, so the SD card slot +connection like spisd configuration is required. usbnsh ------ -Basic NuttShell configuration (console enabled in USB Port, at 115200 bps). +Basic NuttShell configuration using CDC/ACM serial (console enabled in USB Port, +at 115200 bps). waveshare-lcd-1.14 ------------------ @@ -228,9 +450,24 @@ waveshare-lcd-1.3 NuttShell configuration (console enabled in UART0, at 115200 bps) with support for usbmsc. +License exceptions +================== -README.txt -========== +The following files are originated from the files in Pico SDK. +So, the files are licensed under 3-Clause BSD same as Pico SDK. -.. include:: README.txt - :literal: +* arch/arm/src/rp2040/rp2040_clock.c +* arch/arm/src/rp2040/rp2040_pll.c +* arch/arm/src/rp2040/rp2040_xosc.c + + * These are created by referring the Pico SDK clock initialization. + +* arch/arm/src/rp2040/rp2040_pio.c +* arch/arm/src/rp2040/rp2040_pio.h +* arch/arm/src/rp2040/rp2040_pio_instructions.h + + * These provide the similar APIs to Pico SDK's hardware_pio APIs. + +* arch/arm/src/rp2040/hardware/\*.h + + * These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/seeed-xiao-rp2040/README.txt b/Documentation/platforms/arm/rp2040/boards/seeed-xiao-rp2040/README.txt deleted file mode 100644 index c48969f3464..00000000000 --- a/Documentation/platforms/arm/rp2040/boards/seeed-xiao-rp2040/README.txt +++ /dev/null @@ -1,96 +0,0 @@ -README -====== - -This directory contains the port of NuttX to the Seeed Studio Xiao RP2040. -See https://wiki.seeedstudio.com/XIAO-RP2040/ for information about Seeed -Studio Xiao RP2040. - -NuttX supports the following RP2040 capabilities: - - UART (console port) - - GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. - - I2C - - SPI (master only) - - DMAC - - PWM - - ADC - - Watchdog - - USB device - - MSC, CDC/ACM serial and these composite device are supported. - - CDC/ACM serial device can be used for the console. - - PIO (RP2040 Programmable I/O) - - Flash ROM Boot - - SRAM Boot - - If Pico SDK is available, nuttx.uf2 file which can be used in - BOOTSEL mode will be created. - - Persistent flash filesystem in unused flash ROM - -NuttX also provides support for these external devices: - - - BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - WS2812 smart pixel support - -There is currently no direct user mode access to these RP2040 hardware features: - - SPI Slave Mode - - SSI - - RTC - - Timers - -Installation -============ - -1. Download Raspberry Pi Pico SDK and update submodule(cyw43-driver) - - $ git clone -b 1.4.0 https://github.com/raspberrypi/pico-sdk.git - $ cd pico-sdk - $ git submodule update --init --recursive lib/cyw43-driver - -2. Set PICO_SDK_PATH environment variable - - $ export PICO_SDK_PATH= - -3. Configure and build NuttX - - $ git clone https://github.com/apache/nuttx.git nuttx - $ git clone https://github.com/apache/nuttx-apps.git apps - $ cd nuttx - $ make distclean - $ ./tools/configure.sh seeed-xiao-rp2040:nsh - $ make V=1 - -4. Connect Seeed Studio Xiao RP2040 board to USB port while pressing BOOTSEL. - The board will be detected as USB Mass Storage Device. - Then copy "nuttx.uf2" into the device. - (Same manner as the standard Pico SDK applications installation.) - -5. To access the console, GPIO 0 and 1 pins must be connected to the - device such as USB-serial converter. - - `usbnsh` configuration provides the console access by USB CDC/ACM serial - devcice. The console is available by using a terminal software on the USB - host. - -Defconfigs -========== - -- nsh - Minimum configuration with NuttShell - -License exceptions -================== - -The following files are originated from the files in Pico SDK. -So, the files are licensed under 3-Clause BSD same as Pico SDK. - -- arch/arm/src/rp2040/rp2040_clock.c -- arch/arm/src/rp2040/rp2040_pll.c -- arch/arm/src/rp2040/rp2040_xosc.c - - These are created by referring the Pico SDK clock initialization. - -- arch/arm/src/rp2040/rp2040_pio.c -- arch/arm/src/rp2040/rp2040_pio.h -- arch/arm/src/rp2040/rp2040_pio_instructions.h - - These provide the similar APIs to Pico SDK's hardware_pio APIs. - -- arch/arm/src/rp2040/hardware/*.h - - These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/seeed-xiao-rp2040/index.rst b/Documentation/platforms/arm/rp2040/boards/seeed-xiao-rp2040/index.rst index 2250a178397..d5e0202a026 100644 --- a/Documentation/platforms/arm/rp2040/boards/seeed-xiao-rp2040/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/seeed-xiao-rp2040/index.rst @@ -82,6 +82,54 @@ For power supply pins: The built-in DC-DC converter circuit able to change 5V voltage into 3.3V allows to power the device with a 5V supply via VIN-PIN and via the USB connector. +Installation +============ + +1. Download Raspberry Pi Pico SDK. + +.. code-block:: console + + $ git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git + +2. Download and install picotool + + Instructions can be found here: https://github.com/raspberrypi/picotool + + If you are on Arch Linux, you can install the picotool through the AUR: + +.. code-block:: console + + $ yay -S picotool + +3. Set PICO_SDK_PATH environment variable + +.. code-block:: console + + $ export PICO_SDK_PATH= + +4. Configure and build NuttX + +.. code-block:: console + + $ git clone https://github.com/apache/nuttx.git nuttx + $ git clone https://github.com/apache/nuttx-apps.git apps + $ cd nuttx + $ make distclean + $ ./tools/configure.sh seeed-xiao-rp2040:nsh + $ make V=1 + +5. Connect the Seeed Studio Xiao RP2040 board to USB port while pressing BOOTSEL + (small button marked "B"). The board will be detected as USB Mass Storage + Device. Then copy "nuttx.uf2" into the device. (Same manner as the standard + Pico SDK applications installation) + +6. To access the console, GPIO 0 and 1 pins must be connected to the + device such as USB-serial converter. + + `usbnsh` configuration provides the console access by USB CDC/ACM serial + device. The console is available by using a terminal software on the USB + host. + Configurations ============== @@ -91,17 +139,34 @@ nsh Basic NuttShell configuration (console enabled in UART0, at 115200 bps). userled ---- +------- This is an nsh configuration with added support for user LEDs. usbnsh ------ -Basic NuttShell configuration (console enabled in USB Port, at 115200 bps). +Basic NuttShell configuration using CDC/ACM serial (console enabled in USB Port, +at 115200 bps). -README.txt -========== +License exceptions +================== -.. include:: README.txt - :literal: +The following files are originated from the files in Pico SDK. +So, the files are licensed under 3-Clause BSD same as Pico SDK. + +* arch/arm/src/rp2040/rp2040_clock.c +* arch/arm/src/rp2040/rp2040_pll.c +* arch/arm/src/rp2040/rp2040_xosc.c + + * These are created by referring the Pico SDK clock initialization. + +* arch/arm/src/rp2040/rp2040_pio.c +* arch/arm/src/rp2040/rp2040_pio.h +* arch/arm/src/rp2040/rp2040_pio_instructions.h + + * These provide the similar APIs to Pico SDK's hardware_pio APIs. + +* arch/arm/src/rp2040/hardware/\*.h + + * These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/w5500-evb-pico/index.rst b/Documentation/platforms/arm/rp2040/boards/w5500-evb-pico/index.rst index 7e3b4f1a7cb..ba6dc9c0fbb 100644 --- a/Documentation/platforms/arm/rp2040/boards/w5500-evb-pico/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/w5500-evb-pico/index.rst @@ -165,7 +165,7 @@ Installation :: - $ git clone -b 1.1.2 https://github.com/raspberrypi/pico-sdk.git + $ git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git 2. Set PICO_SDK_PATH environment variable diff --git a/Documentation/platforms/arm/rp2040/boards/waveshare-rp2040-lcd-1.28/README.txt b/Documentation/platforms/arm/rp2040/boards/waveshare-rp2040-lcd-1.28/README.txt deleted file mode 100644 index 3e6f5ad6362..00000000000 --- a/Documentation/platforms/arm/rp2040/boards/waveshare-rp2040-lcd-1.28/README.txt +++ /dev/null @@ -1,191 +0,0 @@ -README -====== - -This directory contains the port of NuttX to the Waveshare RP2040 LCD 1.28. -See https://www.waveshare.com/wiki/RP2040-LCD-1.28 for information -about Waveshare RP2040 LCD 1.28. - -NuttX supports the following RP2040 capabilities: - - UART (console port) - - GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. - - I2C - - SPI (master only) - - DMAC - - PWM - - ADC - - Watchdog - - USB device - - MSC, CDC/ACM serial and these composite device are supported. - - CDC/ACM serial device can be used for the console. - - PIO (RP2040 Programmable I/O) - - Flash ROM Boot - - SRAM Boot - - If Pico SDK is available, nuttx.uf2 file which can be used in - BOOTSEL mode will be created. - - Persistent flash filesystem in unused flash ROM - -NuttX also provide support for these external devices: - - - BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) - - Pico Display Pack (ST7789 LCD) - - RGB leds and buttons are not supported yet. - - Pico Audio Pack (PCM5100A I2S DAC) - - I2S interface is realized by PIO. - - WS2812 smart pixel support - -There is currently no direct user mode access to these RP2040 hardware features: - - SPI Slave Mode - - SSI - - RTC - - Timers - -Installation -============ - -1. Download Raspberry Pi Pico SDK - - $ git clone -b 1.1.2 https://github.com/raspberrypi/pico-sdk.git - -2. Set PICO_SDK_PATH environment variable - - $ export PICO_SDK_PATH= - -3. Configure and build NuttX - - $ git clone https://github.com/apache/nuttx.git nuttx - $ git clone https://github.com/apache/nuttx-apps.git apps - $ cd nuttx - $ make distclean - $ ./tools/configure.sh raspberrypi-pico:nsh - $ make V=1 - -4. Connect Raspberry Pi Pico board to USB port while pressing BOOTSEL. - The board will be detected as USB Mass Storage Device. - Then copy "nuttx.uf2" into the device. - (Same manner as the standard Pico SDK applications installation.) - -5. To access the console, GPIO 0 and 1 pins must be connected to the - device such as USB-serial converter. - - `usbnsh` configuration provides the console access by USB CDC/ACM serial - devcice. The console is available by using a terminal software on the USB - host. - -Defconfigs -========== - -- nsh - Minimum configuration with NuttShell - -- nsh-flash - NuttX shell with SMART flash filesystem. - -- nshsram - Load NuttX binary to SRAM - -- smp - Enable SMP mode. Both Core 0 and Core 1 are used by NuttX. - -- ssd1306 - SSD1306 OLED display (I2C) test configuration - Connection: - SSD1306 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 3V3 OUT (Pin 36) - SDA ----- GP4 (I2C0 SDA) (Pin 6) - SCL ----- GP5 (I2C0 SCL) (Pin 7) - -- lcd1602 - LCD 1602 Segment LCD Disaply (I2C) - Connection: - PCF8574 BackPack Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 5V Vbus (Pin 40) - SDA ----- GP4 (I2C0 SDA) (Pin 6) - SCL ----- GP5 (I2C0 SCL) (Pin 7) -- spisd - SD card support (SPI connection) - Connection: - SD card slot Raspberry Pi Pico - DAT2 (NC) - DAT3/CS ----- GP17 (SPI0 CSn) (Pin 22) - CMD /DI ----- GP19 (SPI0 TX) (Pin 25) - VDD ----- 3V3 OUT (Pin 36) - CLK/SCK ----- GP18 (SPI0 SCK) (Pin 24) - VSS ----- GND (Pin 3 or 38 or ...) - DAT0/DO ----- GP16 (SPI0 RX) (Pin 21) - DAT1 (NC) - * Card hot swapping is not supported. - -- st7735 - st7735 SPI LCD support - Connection: - st7735 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - VCC ----- 5V Vbus (Pin 40) - SDA ----- GP15 (SPI1 TX) (Pin 20) - SCK ----- GP14 (SPI1 SCK) (Pin 19) - CS ----- GP13 (SPI1 CSn) (Pin 17) - AO(D/C) ----- GP12 (SPI1 RX) (Pin 16) - BL ----- GP11 (Pin 15) - RESET ----- GP10 (Pin 14) - -- enc28j60 - ENC28J60 SPI ethernet controller support - - IP address is configured by DHCP. - - DNS address is 8.8.8.8 (CONFIG_NETINIT_DNSIPADDR) - - NTP client is enabled. - Connection: - ENC28J60 Raspberry Pi Pico - GND ----- GND (Pin 3 or 38 or ...) - 3.3 ----- 3V3 OUT (Pin 36) - SI ----- GP15 (SPI1 TX) (Pin 20) - SCK ----- GP14 (SPI1 SCK) (Pin 19) - CS ----- GP13 (SPI1 CSn) (Pin 17) - SO ----- GP12 (SPI1 RX) (Pin 16) - INT ----- GP11 (Pin 15) - RESET ----- GP10 (Pin 14) - -- displaypack - Pico Display Pack support - See the following page for connection: - https://shop.pimoroni.com/products/pico-display-pack - -- audiopack - Pico Audio Pack support - See the following page for connection: - https://shop.pimoroni.com/products/pico-audio-pack - SD card interface is also enabled. - -- usbnsh - USB CDC/ACM serial console with NuttShell - -- usbmsc - USB MSC and CDC/ACM support - `msconn` and `sercon` commands enable the MSC and CDC/ACM devices. - The MSC support provides the interface to the SD card with SPI, - so the SD card slot connection like spisd configuration is required. - -- composite - USB composite device (MSC + CDC/ACM) support - `conn` command enables the composite device. - -License exceptions -================== - -The following files are originated from the files in Pico SDK. -So, the files are licensed under 3-Clause BSD same as Pico SDK. - -- arch/arm/src/rp2040/rp2040_clock.c -- arch/arm/src/rp2040/rp2040_pll.c -- arch/arm/src/rp2040/rp2040_xosc.c - - These are created by referring the Pico SDK clock initialization. - -- arch/arm/src/rp2040/rp2040_pio.c -- arch/arm/src/rp2040/rp2040_pio.h -- arch/arm/src/rp2040/rp2040_pio_instructions.h - - These provide the similar APIs to Pico SDK's hardware_pio APIs. - -- arch/arm/src/rp2040/hardware/*.h - - These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/boards/waveshare-rp2040-lcd-1.28/index.rst b/Documentation/platforms/arm/rp2040/boards/waveshare-rp2040-lcd-1.28/index.rst index eee43bd1ead..ed6a8a98e95 100644 --- a/Documentation/platforms/arm/rp2040/boards/waveshare-rp2040-lcd-1.28/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/waveshare-rp2040-lcd-1.28/index.rst @@ -68,6 +68,97 @@ The board had a diode that prevents power from pin 18 from flowing back to the USB socket. Power through USB or VSYS will be charging the battery if connected. The schematic is available at `RP2040-LCD-1.28-sch.pdf `_ +Supported Capabilities +====================== + +NuttX supports the following RP2040 capabilities: + +* UART (console port) + + * GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console. + +* I2C +* SPI (master only) +* DMAC +* PWM +* ADC +* Watchdog +* USB device + + * MSC, CDC/ACM serial and these composite device are supported. + * CDC/ACM serial device can be used for the console. + +* PIO (RP2040 Programmable I/O) +* Flash ROM Boot +* SRAM Boot + + * If Pico SDK is available, nuttx.uf2 file which can be used in BOOTSEL mode will be created. + +* Persistent flash filesystem in unused flash ROM +* WiFi wireless communication + +There is currently no direct user mode access to these RP2040 hardware features: + +* SPI Slave Mode +* SSI +* RTC +* Timers + +NuttX also provide support for these external devices: + +* BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) +* INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu) +* SHT4X sensor at I2C0 +* WS2812 smart pixel support + +Installation +============ + +1. Download Raspberry Pi Pico SDK + +.. code-block:: console + + $ git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git + +2. Download and install picotool + + Instructions can be found here: https://github.com/raspberrypi/picotool + + If you are on Arch Linux, you can install the picotool through the AUR: + +.. code-block:: console + + $ yay -S picotool + +3. Set PICO_SDK_PATH environment variable + +.. code-block:: console + + $ export PICO_SDK_PATH= + +4. Configure and build NuttX + +.. code-block:: console + + $ git clone https://github.com/apache/nuttx.git nuttx + $ git clone https://github.com/apache/nuttx-apps.git apps + $ cd nuttx + $ make distclean + $ ./tools/configure.sh waveshare-rp2040-lcd-1.28:nsh + $ make V=1 + +5. Connect the Waveshare RP2040 board to USB port while pressing BOOT. + The board will be detected as USB Mass Storage Device. + Then copy "nuttx.uf2" into the device. + (Same manner as the standard Pico SDK applications installation.) + +6. To access the console, GPIO 0 and 1 pins must be connected to the + device such as USB-serial converter. + + `usbnsh` configuration provides the console access by USB CDC/ACM serial + decive. The console is available by using a terminal software on the USB + host. + Configurations ============== @@ -75,7 +166,8 @@ composite --------- NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -CDC/ACM with MSC USB composite driver. +CDC/ACM with MSC USB composite driver. ``conn`` command enables the composite +device. nsh --- @@ -103,18 +195,49 @@ both ARM cores enabled. spisd ----- -NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI configured. +NuttShell configuration (console enabled in UART0, at 115200 bps) with SPI SD +card support enabled. + +.. list-table:: spisd connections + :widths: auto + :header-rows: 1 + + * - SD card slot + - Waveshare RP2040 + * - DAT2 + - Not connected + * - DAT3/CS + - GP17 (SPI0 CSn) (Pin 22) + * - CMD /DI + - GP19 (SPI0 TX) (Pin 25) + * - VDD + - 3V3 OUT (Pin 36) + * - CLK/SCK + - GP18 (SPI0 SCK) (Pin 24) + * - VSS + - GND (Pin 3 or 38 or ...) + * - DAT0/DO + - GP16 (SPI0 RX) (Pin 21) + * - DAT1 + - Not connected + +Card hot swapping is not supported. usbmsc ------ NuttShell configuration (console enabled in UART0, at 115200 bps) with support for -usbmsc. +USB MSC and CDC/ACM. + +``msconn`` and ``sercon`` commands enable the MSC and CDC/ACM devices. The MSC +support provides the interface to the SD card with SPI, so the SD card slot +connection like spisd configuration is required. usbnsh ------ -Basic NuttShell configuration (console enabled in USB Port, at 115200 bps). +Basic NuttShell configuration using CDC/ACM serial (console enabled in USB Port, +at 115200 bps). fb ------------------ @@ -128,9 +251,24 @@ lvgl NuttShell configuration (console enabled in USB Port, at 115200 bps) with support for gc9a01 and LVGL demo (using lcd_dev). +License exceptions +================== -README.txt -========== +The following files are originated from the files in Pico SDK. +So, the files are licensed under 3-Clause BSD same as Pico SDK. -.. include:: README.txt - :literal: +* arch/arm/src/rp2040/rp2040_clock.c +* arch/arm/src/rp2040/rp2040_pll.c +* arch/arm/src/rp2040/rp2040_xosc.c + + * These are created by referring the Pico SDK clock initialization. + +* arch/arm/src/rp2040/rp2040_pio.c +* arch/arm/src/rp2040/rp2040_pio.h +* arch/arm/src/rp2040/rp2040_pio_instructions.h + + * These provide the similar APIs to Pico SDK's hardware_pio APIs. + +* arch/arm/src/rp2040/hardware/\*.h + + * These are generated from rp2040.svd originally provided in Pico SDK. diff --git a/Documentation/platforms/arm/rp2040/index.rst b/Documentation/platforms/arm/rp2040/index.rst index 4ff293b480f..09136a96796 100644 --- a/Documentation/platforms/arm/rp2040/index.rst +++ b/Documentation/platforms/arm/rp2040/index.rst @@ -37,9 +37,9 @@ also available. Installation ============ -1. Download Raspberry Pi Pico SDK:: +1. Download Raspberry Pi Pico SDK: - git clone -b 1.1.2 https://github.com/raspberrypi/pico-sdk.git + git clone -b 2.0.0 https://github.com/raspberrypi/pico-sdk.git 2. Set PICO_SDK_PATH environment variable::