From aeb688da9146fe30c2251f3f412036bbf107a3d3 Mon Sep 17 00:00:00 2001 From: James Munns Date: Fri, 14 Jun 2024 11:26:44 +0200 Subject: [PATCH] Add docs to all stm32f4 examples --- examples/stm32f4/src/bin/adc.rs | 18 ++++++++++++ examples/stm32f4/src/bin/blinky.rs | 18 ++++++++++++ examples/stm32f4/src/bin/button.rs | 18 ++++++++++++ examples/stm32f4/src/bin/button_exti.rs | 18 ++++++++++++ examples/stm32f4/src/bin/can.rs | 18 ++++++++++++ examples/stm32f4/src/bin/dac.rs | 18 ++++++++++++ examples/stm32f4/src/bin/eth.rs | 18 ++++++++++++ examples/stm32f4/src/bin/eth_w5500.rs | 18 ++++++++++++ examples/stm32f4/src/bin/flash.rs | 18 ++++++++++++ examples/stm32f4/src/bin/hello.rs | 18 ++++++++++++ examples/stm32f4/src/bin/i2c.rs | 18 ++++++++++++ examples/stm32f4/src/bin/i2c_async.rs | 18 ++++++++++++ examples/stm32f4/src/bin/i2c_comparison.rs | 18 ++++++++++++ examples/stm32f4/src/bin/i2s_dma.rs | 18 ++++++++++++ examples/stm32f4/src/bin/input_capture.rs | 18 ++++++++++++ examples/stm32f4/src/bin/mco.rs | 18 ++++++++++++ examples/stm32f4/src/bin/multiprio.rs | 18 ++++++++++++ examples/stm32f4/src/bin/pwm.rs | 18 ++++++++++++ examples/stm32f4/src/bin/pwm_complementary.rs | 18 ++++++++++++ examples/stm32f4/src/bin/pwm_input.rs | 18 ++++++++++++ examples/stm32f4/src/bin/rtc.rs | 18 ++++++++++++ examples/stm32f4/src/bin/sdmmc.rs | 18 ++++++++++++ examples/stm32f4/src/bin/spi.rs | 18 ++++++++++++ examples/stm32f4/src/bin/spi_dma.rs | 18 ++++++++++++ examples/stm32f4/src/bin/usart.rs | 18 ++++++++++++ examples/stm32f4/src/bin/usart_buffered.rs | 18 ++++++++++++ examples/stm32f4/src/bin/usart_dma.rs | 18 ++++++++++++ examples/stm32f4/src/bin/usb_ethernet.rs | 29 +++++++++++++++---- examples/stm32f4/src/bin/usb_hid_keyboard.rs | 29 +++++++++++++++---- examples/stm32f4/src/bin/usb_hid_mouse.rs | 29 +++++++++++++++---- examples/stm32f4/src/bin/usb_raw.rs | 29 +++++++++++++++---- examples/stm32f4/src/bin/usb_serial.rs | 29 +++++++++++++++---- examples/stm32f4/src/bin/wdt.rs | 18 ++++++++++++ examples/stm32f4/src/bin/ws2812_pwm.rs | 18 ++++++++++++ examples/stm32f4/src/bin/ws2812_spi.rs | 18 ++++++++++++ 35 files changed, 660 insertions(+), 25 deletions(-) diff --git a/examples/stm32f4/src/bin/adc.rs b/examples/stm32f4/src/bin/adc.rs index 9473b7b7f..f3d57bf7d 100644 --- a/examples/stm32f4/src/bin/adc.rs +++ b/examples/stm32f4/src/bin/adc.rs @@ -8,6 +8,24 @@ use embassy_stm32::adc::{Adc, Temperature, VrefInt}; use embassy_time::{Delay, Timer}; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/blinky.rs b/examples/stm32f4/src/bin/blinky.rs index 31cce8225..7e038bf5f 100644 --- a/examples/stm32f4/src/bin/blinky.rs +++ b/examples/stm32f4/src/bin/blinky.rs @@ -7,6 +7,24 @@ use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/button.rs b/examples/stm32f4/src/bin/button.rs index 564908998..26f9c8a50 100644 --- a/examples/stm32f4/src/bin/button.rs +++ b/examples/stm32f4/src/bin/button.rs @@ -6,6 +6,24 @@ use defmt::*; use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[entry] fn main() -> ! { info!("Hello World!"); diff --git a/examples/stm32f4/src/bin/button_exti.rs b/examples/stm32f4/src/bin/button_exti.rs index 2a546dac5..482b4676a 100644 --- a/examples/stm32f4/src/bin/button_exti.rs +++ b/examples/stm32f4/src/bin/button_exti.rs @@ -7,6 +7,24 @@ use embassy_stm32::exti::ExtiInput; use embassy_stm32::gpio::Pull; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/can.rs b/examples/stm32f4/src/bin/can.rs index 8e3beee24..64f7352bd 100644 --- a/examples/stm32f4/src/bin/can.rs +++ b/examples/stm32f4/src/bin/can.rs @@ -20,6 +20,24 @@ bind_interrupts!(struct Irqs { CAN1_TX => TxInterruptHandler; }); +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { info!("Hello World!"); diff --git a/examples/stm32f4/src/bin/dac.rs b/examples/stm32f4/src/bin/dac.rs index dd2a45718..a9db24925 100644 --- a/examples/stm32f4/src/bin/dac.rs +++ b/examples/stm32f4/src/bin/dac.rs @@ -7,6 +7,24 @@ use embassy_stm32::dac::{DacCh1, Value}; use embassy_stm32::dma::NoDma; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) -> ! { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/eth.rs b/examples/stm32f4/src/bin/eth.rs index 648c45bbd..048d99136 100644 --- a/examples/stm32f4/src/bin/eth.rs +++ b/examples/stm32f4/src/bin/eth.rs @@ -28,6 +28,24 @@ async fn net_task(stack: &'static Stack) -> ! { stack.run().await } +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(spawner: Spawner) -> ! { let mut config = Config::default(); diff --git a/examples/stm32f4/src/bin/eth_w5500.rs b/examples/stm32f4/src/bin/eth_w5500.rs index c51111110..1077d71e0 100644 --- a/examples/stm32f4/src/bin/eth_w5500.rs +++ b/examples/stm32f4/src/bin/eth_w5500.rs @@ -35,6 +35,24 @@ async fn net_task(stack: &'static Stack>) -> ! { stack.run().await } +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(spawner: Spawner) -> ! { let mut config = Config::default(); diff --git a/examples/stm32f4/src/bin/flash.rs b/examples/stm32f4/src/bin/flash.rs index 1e8cabab4..8a8fbb8d6 100644 --- a/examples/stm32f4/src/bin/flash.rs +++ b/examples/stm32f4/src/bin/flash.rs @@ -6,6 +6,24 @@ use embassy_executor::Spawner; use embassy_stm32::flash::{Blocking, Flash}; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/hello.rs b/examples/stm32f4/src/bin/hello.rs index 3c295612c..a9da07ae7 100644 --- a/examples/stm32f4/src/bin/hello.rs +++ b/examples/stm32f4/src/bin/hello.rs @@ -7,6 +7,24 @@ use embassy_stm32::Config; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) -> ! { let config = Config::default(); diff --git a/examples/stm32f4/src/bin/i2c.rs b/examples/stm32f4/src/bin/i2c.rs index 4a96357a4..067b09dd3 100644 --- a/examples/stm32f4/src/bin/i2c.rs +++ b/examples/stm32f4/src/bin/i2c.rs @@ -10,6 +10,24 @@ use {defmt_rtt as _, panic_probe as _}; const ADDRESS: u8 = 0x5F; const WHOAMI: u8 = 0x0F; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { info!("Hello world!"); diff --git a/examples/stm32f4/src/bin/i2c_async.rs b/examples/stm32f4/src/bin/i2c_async.rs index 90d11d4b4..7be1afdf9 100644 --- a/examples/stm32f4/src/bin/i2c_async.rs +++ b/examples/stm32f4/src/bin/i2c_async.rs @@ -18,6 +18,24 @@ bind_interrupts!(struct Irqs { I2C1_ER => i2c::ErrorInterruptHandler; }); +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { info!("Hello world!"); diff --git a/examples/stm32f4/src/bin/i2c_comparison.rs b/examples/stm32f4/src/bin/i2c_comparison.rs index 55c4891e3..4887e5f74 100644 --- a/examples/stm32f4/src/bin/i2c_comparison.rs +++ b/examples/stm32f4/src/bin/i2c_comparison.rs @@ -43,6 +43,24 @@ fn a1454_buf_to_i16(buffer: &[u8; 4]) -> i16 { sensor_value } +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { info!("Setting up peripherals."); diff --git a/examples/stm32f4/src/bin/i2s_dma.rs b/examples/stm32f4/src/bin/i2s_dma.rs index 27b165f1b..8612d4b43 100644 --- a/examples/stm32f4/src/bin/i2s_dma.rs +++ b/examples/stm32f4/src/bin/i2s_dma.rs @@ -10,6 +10,24 @@ use embassy_stm32::time::Hertz; use heapless::String; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/input_capture.rs b/examples/stm32f4/src/bin/input_capture.rs index 49de33d2b..aee53b89f 100644 --- a/examples/stm32f4/src/bin/input_capture.rs +++ b/examples/stm32f4/src/bin/input_capture.rs @@ -32,6 +32,24 @@ bind_interrupts!(struct Irqs { TIM2 => timer::CaptureCompareInterruptHandler; }); +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/mco.rs b/examples/stm32f4/src/bin/mco.rs index eb7bb6261..d1c9c45ad 100644 --- a/examples/stm32f4/src/bin/mco.rs +++ b/examples/stm32f4/src/bin/mco.rs @@ -8,6 +8,24 @@ use embassy_stm32::rcc::{Mco, Mco1Source, Mco2Source, McoPrescaler}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/multiprio.rs b/examples/stm32f4/src/bin/multiprio.rs index b4620888f..60285f29b 100644 --- a/examples/stm32f4/src/bin/multiprio.rs +++ b/examples/stm32f4/src/bin/multiprio.rs @@ -121,6 +121,24 @@ unsafe fn UART5() { EXECUTOR_MED.on_interrupt() } +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[entry] fn main() -> ! { info!("Hello World!"); diff --git a/examples/stm32f4/src/bin/pwm.rs b/examples/stm32f4/src/bin/pwm.rs index 8844a9f0e..529b04092 100644 --- a/examples/stm32f4/src/bin/pwm.rs +++ b/examples/stm32f4/src/bin/pwm.rs @@ -10,6 +10,24 @@ use embassy_stm32::timer::Channel; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/pwm_complementary.rs b/examples/stm32f4/src/bin/pwm_complementary.rs index 161f43c48..f2779f13b 100644 --- a/examples/stm32f4/src/bin/pwm_complementary.rs +++ b/examples/stm32f4/src/bin/pwm_complementary.rs @@ -11,6 +11,24 @@ use embassy_stm32::timer::Channel; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/pwm_input.rs b/examples/stm32f4/src/bin/pwm_input.rs index ce200549d..04870b6bc 100644 --- a/examples/stm32f4/src/bin/pwm_input.rs +++ b/examples/stm32f4/src/bin/pwm_input.rs @@ -31,6 +31,24 @@ bind_interrupts!(struct Irqs { TIM2 => timer::CaptureCompareInterruptHandler; }); +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/rtc.rs b/examples/stm32f4/src/bin/rtc.rs index 82d8a37ba..4a485c118 100644 --- a/examples/stm32f4/src/bin/rtc.rs +++ b/examples/stm32f4/src/bin/rtc.rs @@ -9,6 +9,24 @@ use embassy_stm32::Config; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let config = Config::default(); diff --git a/examples/stm32f4/src/bin/sdmmc.rs b/examples/stm32f4/src/bin/sdmmc.rs index 66e4e527c..947e019ad 100644 --- a/examples/stm32f4/src/bin/sdmmc.rs +++ b/examples/stm32f4/src/bin/sdmmc.rs @@ -16,6 +16,24 @@ bind_interrupts!(struct Irqs { SDIO => sdmmc::InterruptHandler; }); +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let mut config = Config::default(); diff --git a/examples/stm32f4/src/bin/spi.rs b/examples/stm32f4/src/bin/spi.rs index 970d819fc..82fb6dc19 100644 --- a/examples/stm32f4/src/bin/spi.rs +++ b/examples/stm32f4/src/bin/spi.rs @@ -8,6 +8,24 @@ use embassy_stm32::spi::{Config, Spi}; use embassy_stm32::time::Hertz; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[entry] fn main() -> ! { info!("Hello World, dude!"); diff --git a/examples/stm32f4/src/bin/spi_dma.rs b/examples/stm32f4/src/bin/spi_dma.rs index 7249c831a..50c7f9a40 100644 --- a/examples/stm32f4/src/bin/spi_dma.rs +++ b/examples/stm32f4/src/bin/spi_dma.rs @@ -11,6 +11,24 @@ use embassy_stm32::time::Hertz; use heapless::String; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/usart.rs b/examples/stm32f4/src/bin/usart.rs index 991bf6673..7f6913423 100644 --- a/examples/stm32f4/src/bin/usart.rs +++ b/examples/stm32f4/src/bin/usart.rs @@ -11,6 +11,24 @@ bind_interrupts!(struct Irqs { USART3 => usart::InterruptHandler; }); +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[entry] fn main() -> ! { info!("Hello World!"); diff --git a/examples/stm32f4/src/bin/usart_buffered.rs b/examples/stm32f4/src/bin/usart_buffered.rs index c99807f11..4b0a83c07 100644 --- a/examples/stm32f4/src/bin/usart_buffered.rs +++ b/examples/stm32f4/src/bin/usart_buffered.rs @@ -12,6 +12,24 @@ bind_interrupts!(struct Irqs { USART3 => usart::BufferedInterruptHandler; }); +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/usart_dma.rs b/examples/stm32f4/src/bin/usart_dma.rs index aaf8d6c4f..bc41525dd 100644 --- a/examples/stm32f4/src/bin/usart_dma.rs +++ b/examples/stm32f4/src/bin/usart_dma.rs @@ -14,6 +14,24 @@ bind_interrupts!(struct Irqs { USART3 => usart::InterruptHandler; }); +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/usb_ethernet.rs b/examples/stm32f4/src/bin/usb_ethernet.rs index b398c35da..f5356c30e 100644 --- a/examples/stm32f4/src/bin/usb_ethernet.rs +++ b/examples/stm32f4/src/bin/usb_ethernet.rs @@ -40,11 +40,30 @@ bind_interrupts!(struct Irqs { HASH_RNG => rng::InterruptHandler; }); -// If you are trying this and your USB device doesn't connect, the most -// common issues are the RCC config and vbus_detection -// -// See https://embassy.dev/book/#_the_usb_examples_are_not_working_on_my_board_is_there_anything_else_i_need_to_configure -// for more information. +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org +/// +/// If you are trying this and your USB device doesn't connect, the most +/// common issues are the RCC config and vbus_detection +/// +/// See https://embassy.dev/book/#_the_usb_examples_are_not_working_on_my_board_is_there_anything_else_i_need_to_configure +/// for more information. #[embassy_executor::main] async fn main(spawner: Spawner) { info!("Hello World!"); diff --git a/examples/stm32f4/src/bin/usb_hid_keyboard.rs b/examples/stm32f4/src/bin/usb_hid_keyboard.rs index 1270995c4..8c8a21e13 100644 --- a/examples/stm32f4/src/bin/usb_hid_keyboard.rs +++ b/examples/stm32f4/src/bin/usb_hid_keyboard.rs @@ -21,11 +21,30 @@ bind_interrupts!(struct Irqs { OTG_FS => usb::InterruptHandler; }); -// If you are trying this and your USB device doesn't connect, the most -// common issues are the RCC config and vbus_detection -// -// See https://embassy.dev/book/#_the_usb_examples_are_not_working_on_my_board_is_there_anything_else_i_need_to_configure -// for more information. +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org +/// +/// If you are trying this and your USB device doesn't connect, the most +/// common issues are the RCC config and vbus_detection +/// +/// See https://embassy.dev/book/#_the_usb_examples_are_not_working_on_my_board_is_there_anything_else_i_need_to_configure +/// for more information. #[embassy_executor::main] async fn main(_spawner: Spawner) { let mut config = Config::default(); diff --git a/examples/stm32f4/src/bin/usb_hid_mouse.rs b/examples/stm32f4/src/bin/usb_hid_mouse.rs index 45136f965..153280c1c 100644 --- a/examples/stm32f4/src/bin/usb_hid_mouse.rs +++ b/examples/stm32f4/src/bin/usb_hid_mouse.rs @@ -18,11 +18,30 @@ bind_interrupts!(struct Irqs { OTG_FS => usb::InterruptHandler; }); -// If you are trying this and your USB device doesn't connect, the most -// common issues are the RCC config and vbus_detection -// -// See https://embassy.dev/book/#_the_usb_examples_are_not_working_on_my_board_is_there_anything_else_i_need_to_configure -// for more information. +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org +/// +/// If you are trying this and your USB device doesn't connect, the most +/// common issues are the RCC config and vbus_detection +/// +/// See https://embassy.dev/book/#_the_usb_examples_are_not_working_on_my_board_is_there_anything_else_i_need_to_configure +/// for more information. #[embassy_executor::main] async fn main(_spawner: Spawner) { let mut config = Config::default(); diff --git a/examples/stm32f4/src/bin/usb_raw.rs b/examples/stm32f4/src/bin/usb_raw.rs index b2d706208..eda533da5 100644 --- a/examples/stm32f4/src/bin/usb_raw.rs +++ b/examples/stm32f4/src/bin/usb_raw.rs @@ -69,11 +69,30 @@ bind_interrupts!(struct Irqs { OTG_FS => usb::InterruptHandler; }); -// If you are trying this and your USB device doesn't connect, the most -// common issues are the RCC config and vbus_detection -// -// See https://embassy.dev/book/#_the_usb_examples_are_not_working_on_my_board_is_there_anything_else_i_need_to_configure -// for more information. +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org +/// +/// If you are trying this and your USB device doesn't connect, the most +/// common issues are the RCC config and vbus_detection +/// +/// See https://embassy.dev/book/#_the_usb_examples_are_not_working_on_my_board_is_there_anything_else_i_need_to_configure +/// for more information. #[embassy_executor::main] async fn main(_spawner: Spawner) { info!("Hello World!"); diff --git a/examples/stm32f4/src/bin/usb_serial.rs b/examples/stm32f4/src/bin/usb_serial.rs index 328b5effe..9ecf83789 100644 --- a/examples/stm32f4/src/bin/usb_serial.rs +++ b/examples/stm32f4/src/bin/usb_serial.rs @@ -16,11 +16,30 @@ bind_interrupts!(struct Irqs { OTG_FS => usb::InterruptHandler; }); -// If you are trying this and your USB device doesn't connect, the most -// common issues are the RCC config and vbus_detection -// -// See https://embassy.dev/book/#_the_usb_examples_are_not_working_on_my_board_is_there_anything_else_i_need_to_configure -// for more information. +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org +/// +/// If you are trying this and your USB device doesn't connect, the most +/// common issues are the RCC config and vbus_detection +/// +/// See https://embassy.dev/book/#_the_usb_examples_are_not_working_on_my_board_is_there_anything_else_i_need_to_configure +/// for more information. #[embassy_executor::main] async fn main(_spawner: Spawner) { info!("Hello World!"); diff --git a/examples/stm32f4/src/bin/wdt.rs b/examples/stm32f4/src/bin/wdt.rs index ea27ebce0..35bf77448 100644 --- a/examples/stm32f4/src/bin/wdt.rs +++ b/examples/stm32f4/src/bin/wdt.rs @@ -8,6 +8,24 @@ use embassy_stm32::wdg::IndependentWatchdog; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); diff --git a/examples/stm32f4/src/bin/ws2812_pwm.rs b/examples/stm32f4/src/bin/ws2812_pwm.rs index cbaff75fc..189f1d8bf 100644 --- a/examples/stm32f4/src/bin/ws2812_pwm.rs +++ b/examples/stm32f4/src/bin/ws2812_pwm.rs @@ -21,6 +21,24 @@ use embassy_stm32::timer::Channel; use embassy_time::{Duration, Ticker, Timer}; use {defmt_rtt as _, panic_probe as _}; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: Spawner) { let mut device_config = embassy_stm32::Config::default(); diff --git a/examples/stm32f4/src/bin/ws2812_spi.rs b/examples/stm32f4/src/bin/ws2812_spi.rs index e00d14327..ec2da973e 100644 --- a/examples/stm32f4/src/bin/ws2812_spi.rs +++ b/examples/stm32f4/src/bin/ws2812_spi.rs @@ -42,6 +42,24 @@ static DIM_WHITE: [u16; 25] = [ static COLOR_LIST: &[&[u16]] = &[&TURN_OFF, &DIM_WHITE]; +/// This example is written for the nucleo-stm32f429zi, with a stm32f429zi chip. +/// +/// If you are using a different board or chip, make sure you update the following: +/// +/// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx`chip name. +/// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is +/// currently `stm32f429zi`. +/// * [ ] If your board has a special clock or power configuration, make sure that it is +/// set up appropriately. +/// * [ ] If your board has different pin mapping, update any pin numbers or peripherals +/// to match your schematic +/// +/// If you are unsure, please drop by the Embassy Matrix chat for support, and let us know: +/// +/// * Which example you are trying to run +/// * Which chip and board you are using +/// +/// Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org #[embassy_executor::main] async fn main(_spawner: embassy_executor::Spawner) { let mut device_config = embassy_stm32::Config::default();