mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-26 20:00:27 +00:00
update documentation and examples to mention RP235x
This commit is contained in:
parent
dd3ae39d42
commit
6719e13059
@ -4,7 +4,7 @@ These are a list of unsorted, commonly asked questions and answers.
|
||||
|
||||
Please feel free to add items to link:https://github.com/embassy-rs/embassy/edit/main/docs/pages/faq.adoc[this page], especially if someone in the chat answered a question for you!
|
||||
|
||||
== How to deploy to RP2040 without a debugging probe.
|
||||
== How to deploy to RP2040 or RP235x without a debugging probe.
|
||||
|
||||
Install link:https://github.com/JoNil/elf2uf2-rs[elf2uf2-rs] for converting the generated elf binary into a uf2 file.
|
||||
|
||||
|
@ -4,7 +4,7 @@ Embassy provides HALs for several microcontroller families:
|
||||
|
||||
* `embassy-nrf` for the nRF microcontrollers from Nordic Semiconductor
|
||||
* `embassy-stm32` for STM32 microcontrollers from ST Microelectronics
|
||||
* `embassy-rp` for the Raspberry Pi RP2040 microcontrollers
|
||||
* `embassy-rp` for the Raspberry Pi RP2040 and RP235x microcontrollers
|
||||
|
||||
These HALs implement async/await functionality for most peripherals while also implementing the
|
||||
async traits in `embedded-hal` and `embedded-hal-async`. You can also use these HALs with another executor.
|
||||
|
@ -28,7 +28,7 @@ The Embassy project maintains HALs for select hardware, but you can still use HA
|
||||
|
||||
* link:https://docs.embassy.dev/embassy-stm32/[embassy-stm32], for all STM32 microcontroller families.
|
||||
* link:https://docs.embassy.dev/embassy-nrf/[embassy-nrf], for the Nordic Semiconductor nRF52, nRF53, nRF91 series.
|
||||
* link:https://docs.embassy.dev/embassy-rp/[embassy-rp], for the Raspberry Pi RP2040 microcontroller.
|
||||
* link:https://docs.embassy.dev/embassy-rp/[embassy-rp], for the Raspberry Pi RP2040 as well as RP235x microcontroller.
|
||||
* link:https://docs.embassy.dev/embassy-mspm0/[embassy-mspm0], for the Texas Instruments MSPM0 microcontrollers.
|
||||
* link:https://github.com/esp-rs[esp-rs], for the Espressif Systems ESP32 series of chips.
|
||||
* link:https://github.com/ch32-rs/ch32-hal[ch32-hal], for the WCH 32-bit RISC-V(CH32V) series of chips.
|
||||
|
@ -3,8 +3,8 @@ name = "embassy-rp"
|
||||
version = "0.4.0"
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Embassy Hardware Abstraction Layer (HAL) for the Raspberry Pi RP2040 microcontroller"
|
||||
keywords = ["embedded", "async", "raspberry-pi", "rp2040", "embedded-hal"]
|
||||
description = "Embassy Hardware Abstraction Layer (HAL) for the Raspberry Pi RP2040 or RP235x microcontroller"
|
||||
keywords = ["embedded", "async", "rp235x", "rp2040", "embedded-hal"]
|
||||
categories = ["embedded", "hardware-support", "no-std", "asynchronous"]
|
||||
repository = "https://github.com/embassy-rs/embassy"
|
||||
documentation = "https://docs.embassy.dev/embassy-rp"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
HALs implement safe, idiomatic Rust APIs to use the hardware capabilities, so raw register manipulation is not needed.
|
||||
|
||||
The embassy-rp HAL targets the Raspberry Pi RP2040 microcontroller. The HAL implements both blocking and async APIs
|
||||
The embassy-rp HAL targets the Raspberry Pi RP2040 as well as RP235x microcontroller. The HAL implements both blocking and async APIs
|
||||
for many peripherals. The benefit of using the async APIs is that the HAL takes care of waiting for peripherals to
|
||||
complete operations in low power mode and handling interrupts, so that applications can focus on more important matters.
|
||||
|
||||
|
@ -40,8 +40,8 @@ async fn main(_spawner: Spawner) {
|
||||
}
|
||||
|
||||
fn convert_to_celsius(raw_temp: u16) -> f32 {
|
||||
// According to chapter 4.9.5. Temperature Sensor in RP2040 datasheet
|
||||
let temp = 27.0 - (raw_temp as f32 * 3.3 / 4096.0 - 0.706) / 0.001721;
|
||||
// According to chapter 12.4.6 Temperature Sensor in RP235x datasheet
|
||||
let temp = 27.0 - (raw_temp as f32 * 3.3 / 4096.0 - ..0.706) / 0.0..01721;
|
||||
let sign = if temp < 0.0 { -1.0 } else { 1.0 };
|
||||
let rounded_temp_x10: i16 = ((temp * 10.0) + 0.5 * sign) as i16;
|
||||
(rounded_temp_x10 as f32) / 10.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to use the RP2040 ADC with DMA, both single- and multichannel reads.
|
||||
//! This example shows how to use the RP235x ADC with DMA, both single- and multichannel reads.
|
||||
//! For multichannel, the samples are interleaved in the buffer:
|
||||
//! `[ch1, ch2, ch3, ch4, ch1, ch2, ch3, ch4, ...]`
|
||||
#![no_std]
|
||||
|
@ -47,8 +47,8 @@ async fn main(spawner: Spawner) {
|
||||
|
||||
// To make flashing faster for development, you may want to flash the firmwares independently
|
||||
// at hardcoded addresses, instead of baking them into the program with `include_bytes!`:
|
||||
// probe-rs download ../../cyw43-firmware/43439A0.bin --binary-format bin --chip RP2040 --base-address 0x10100000
|
||||
// probe-rs download ../../cyw43-firmware/43439A0_clm.bin --binary-format bin --chip RP2040 --base-address 0x10140000
|
||||
// probe-rs download ../../cyw43-firmware/43439A0.bin --binary-format bin --chip RP235x --base-address 0x10100000
|
||||
// probe-rs download ../../cyw43-firmware/43439A0_clm.bin --binary-format bin --chip RP235x --base-address 0x10140000
|
||||
//let fw = unsafe { core::slice::from_raw_parts(0x10100000 as *const u8, 230321) };
|
||||
//let clm = unsafe { core::slice::from_raw_parts(0x10140000 as *const u8, 4752) };
|
||||
|
||||
|
@ -46,8 +46,8 @@ async fn main(spawner: Spawner) {
|
||||
|
||||
// To make flashing faster for development, you may want to flash the firmwares independently
|
||||
// at hardcoded addresses, instead of baking them into the program with `include_bytes!`:
|
||||
// probe-rs download ../../cyw43-firmware/43439A0.bin --binary-format bin --chip RP2040 --base-address 0x10100000
|
||||
// probe-rs download ../../cyw43-firmware/43439A0_clm.bin --binary-format bin --chip RP2040 --base-address 0x10140000
|
||||
// probe-rs download ../../cyw43-firmware/43439A0.bin --binary-format bin --chip RP235x --base-address 0x10100000
|
||||
// probe-rs download ../../cyw43-firmware/43439A0_clm.bin --binary-format bin --chip RP235x --base-address 0x10140000
|
||||
//let fw = unsafe { core::slice::from_raw_parts(0x10100000 as *const u8, 230321) };
|
||||
//let clm = unsafe { core::slice::from_raw_parts(0x10140000 as *const u8, 4752) };
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how async gpio can be used with a RP2040.
|
||||
//! This example shows how async gpio can be used with a RP235x.
|
||||
//!
|
||||
//! The LED on the RP Pico W board is connected differently. See wifi_blinky.rs.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to send messages between the two cores in the RP2040 chip.
|
||||
//! This example shows how to send messages between the two cores in the RP235x chip.
|
||||
//!
|
||||
//! The LED on the RP Pico W board is connected differently. See wifi_blinky.rs.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows powerful PIO module in the RP2040 chip.
|
||||
//! This example shows powerful PIO module in the RP235x chip.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows powerful PIO module in the RP2040 chip.
|
||||
//! This example shows powerful PIO module in the RP235x chip.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows powerful PIO module in the RP2040 chip to communicate with a HD44780 display.
|
||||
//! This example shows powerful PIO module in the RP235x chip to communicate with a HD44780 display.
|
||||
//! See (https://www.sparkfun.com/datasheets/LCD/HD44780.pdf)
|
||||
|
||||
#![no_std]
|
||||
@ -30,7 +30,7 @@ async fn main(_spawner: Spawner) {
|
||||
// db6 = PIN5
|
||||
// db7 = PIN6
|
||||
// additionally a pwm signal for a bias voltage charge pump is provided on pin 15,
|
||||
// allowing direct connection of the display to the RP2040 without level shifters.
|
||||
// allowing direct connection of the display to the RP235x without level shifters.
|
||||
let p = embassy_rp::init(Default::default());
|
||||
|
||||
let _pwm = Pwm::new_output_b(p.PWM_SLICE7, p.PIN_15, {
|
||||
|
@ -1,5 +1,5 @@
|
||||
//! This example shows generating audio and sending it to a connected i2s DAC using the PIO
|
||||
//! module of the RP2040.
|
||||
//! module of the RP235x.
|
||||
//!
|
||||
//! Connect the i2s DAC as follows:
|
||||
//! bclk : GPIO 18
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to create a pwm using the PIO module in the RP2040 chip.
|
||||
//! This example shows how to create a pwm using the PIO module in the RP235x chip.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to use the PIO module in the RP2040 to read a quadrature rotary encoder.
|
||||
//! This example shows how to use the PIO module in the RP235x to read a quadrature rotary encoder.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to create a pwm using the PIO module in the RP2040 chip.
|
||||
//! This example shows how to create a pwm using the PIO module in the RP235x chip.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to use the PIO module in the RP2040 to implement a stepper motor driver
|
||||
//! This example shows how to use the PIO module in the RP235x to implement a stepper motor driver
|
||||
//! for a 5-wire stepper such as the 28BYJ-48. You can halt an ongoing rotation by dropping the future.
|
||||
|
||||
#![no_std]
|
||||
|
@ -1,10 +1,10 @@
|
||||
//! This example shows how to use the PIO module in the RP2040 chip to implement a duplex UART.
|
||||
//! This example shows how to use the PIO module in the RP235x chip to implement a duplex UART.
|
||||
//! The PIO module is a very powerful peripheral that can be used to implement many different
|
||||
//! protocols. It is a very flexible state machine that can be programmed to do almost anything.
|
||||
//!
|
||||
//! This example opens up a USB device that implements a CDC ACM serial port. It then uses the
|
||||
//! PIO module to implement a UART that is connected to the USB serial port. This allows you to
|
||||
//! communicate with a device connected to the RP2040 over USB serial.
|
||||
//! communicate with a device connected to the RP235x over USB serial.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows powerful PIO module in the RP2040 chip to communicate with WS2812 LED modules.
|
||||
//! This example shows powerful PIO module in the RP235x chip to communicate with WS2812 LED modules.
|
||||
//! See (https://www.sparkfun.com/categories/tags/ws2812)
|
||||
|
||||
#![no_std]
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to use SPI (Serial Peripheral Interface) in the RP2040 chip.
|
||||
//! This example shows how to use SPI (Serial Peripheral Interface) in the RP235x chip.
|
||||
//!
|
||||
//! Example for resistive touch sensor in Waveshare Pico-ResTouch
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to use SPI (Serial Peripheral Interface) in the RP2040 chip.
|
||||
//! This example shows how to use SPI (Serial Peripheral Interface) in the RP235x chip.
|
||||
//! No specific hardware is specified in this example. If you connect pin 11 and 12 you should get the same data back.
|
||||
|
||||
#![no_std]
|
||||
|
@ -95,7 +95,7 @@ async fn main(_spawner: Spawner) {
|
||||
|
||||
let style = MonoTextStyle::new(&FONT_10X20, Rgb565::GREEN);
|
||||
Text::new(
|
||||
"Hello embedded_graphics \n + embassy + RP2040!",
|
||||
"Hello embedded_graphics \n + embassy + RP235x!",
|
||||
Point::new(20, 200),
|
||||
style,
|
||||
)
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to use `embedded-sdmmc` with the RP2040 chip, over SPI.
|
||||
//! This example shows how to use `embedded-sdmmc` with the RP235x chip, over SPI.
|
||||
//!
|
||||
//! The example will attempt to read a file `MY_FILE.TXT` from the root directory
|
||||
//! of the SD card and print its contents.
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP2040 chip.
|
||||
//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP235x chip.
|
||||
//!
|
||||
//! No specific hardware is specified in this example. Only output on pin 0 is tested.
|
||||
//! The Raspberry Pi Debug Probe (https://www.raspberrypi.com/products/debug-probe/) could be used
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP2040 chip.
|
||||
//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP235x chip.
|
||||
//!
|
||||
//! No specific hardware is specified in this example. If you connect pin 0 and 1 you should get the same data back.
|
||||
//! The Raspberry Pi Debug Probe (https://www.raspberrypi.com/products/debug-probe/) could be used
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP2040 chip.
|
||||
//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP235x chip.
|
||||
//!
|
||||
//! Test TX-only and RX-only on two different UARTs. You need to connect GPIO0 to GPIO5 for
|
||||
//! this to work
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to use USB (Universal Serial Bus) in the RP2040 chip.
|
||||
//! This example shows how to use USB (Universal Serial Bus) in the RP235x chip.
|
||||
//!
|
||||
//! This creates a WebUSB capable device that echoes data back to the host.
|
||||
//!
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! This example shows how to use Watchdog in the RP2040 chip.
|
||||
//! This example shows how to use Watchdog in the RP235x chip.
|
||||
//!
|
||||
//! It does not work with the RP Pico W board. See wifi_blinky.rs or connect external LED and resistor.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//! This example shows how to use `zerocopy_channel` from `embassy_sync` for
|
||||
//! sending large values between two tasks without copying.
|
||||
//! The example also shows how to use the RP2040 ADC with DMA.
|
||||
//! The example also shows how to use the RP235x ADC with DMA.
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user