fix F103 example

This commit is contained in:
Bruno Bousquet 2024-05-29 00:33:35 -04:00
parent 521332bdd1
commit 50039b17a7
2 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,7 @@
"executable": "./target/thumbv7m-none-eabi/debug/pwm_input",
/* Run `cargo build --example itm` and uncomment this line to run itm example */
// "executable": "./target/thumbv7em-none-eabihf/debug/examples/itm",
"device": "STM32F103TB",
"device": "STM32F103T8",
"configFiles": [
"interface/stlink.cfg",
"target/stm32f1x.cfg"

View File

@ -1,6 +1,7 @@
#![no_std]
#![no_main]
use cortex_m::asm;
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::gpio::{Level, Output, Pull, Speed};
@ -38,7 +39,8 @@ async fn main(spawner: Spawner) {
unwrap!(spawner.spawn(blinky(p.PC13)));
let pwm_input = PwmInput::new(p.TIM2, p.PA0, Pull::None, khz(1000));
let mut pwm_input = PwmInput::new(p.TIM2, p.PA0, Pull::None, khz(10));
pwm_input.enable();
loop {
Timer::after_millis(500).await;