mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
fix F103 example
This commit is contained in:
parent
521332bdd1
commit
50039b17a7
2
examples/stm32f1/.vscode/launch.json
vendored
2
examples/stm32f1/.vscode/launch.json
vendored
@ -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"
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user