diff --git a/dma_gpio/Cargo.toml b/dma_gpio/Cargo.toml index 2aec6cd..a13e99c 100644 --- a/dma_gpio/Cargo.toml +++ b/dma_gpio/Cargo.toml @@ -16,7 +16,7 @@ embassy-sync = { git = "https://github.com/embassy-rs/embassy.git", branch = embassy-time = { git = "https://github.com/embassy-rs/embassy.git", branch = "main", features = ["tick-hz-32_768"] } embassy-hal-internal = { git = "https://github.com/embassy-rs/embassy.git", branch = "main" } embassy-usb = { git = "https://github.com/embassy-rs/embassy.git", branch = "main" } -embassy-stm32 = { git = "https://github.com/embassy-rs/embassy.git", branch = "main", features = ["unstable-pac", "stm32u575zi", "time-driver-any", "memory-x", "defmt"] } +embassy-stm32 = { git = "https://github.com/embassy-rs/embassy.git", branch = "main", features = ["unstable-pac", "stm32u575zi", "time-driver-tim2", "memory-x", "defmt"] } embedded-hal = "1.0.0" embedded-graphics = "0.8.1" diff --git a/dma_gpio/src/software_uart/gpio_dma_uart_rx.rs b/dma_gpio/src/software_uart/gpio_dma_uart_rx.rs index d1d1723..b8170cc 100644 --- a/dma_gpio/src/software_uart/gpio_dma_uart_rx.rs +++ b/dma_gpio/src/software_uart/gpio_dma_uart_rx.rs @@ -12,6 +12,7 @@ use embassy_stm32::dma::{ use crate::config::{RX_OVERSAMPLE, UART_CFG}; use crate::software_uart::decode_uart_samples; use embassy_sync::{blocking_mutex::raw::CriticalSectionRawMutex, pipe::Pipe}; +use embassy_futures::yield_now; // datasheet tabulka 137 pub const TIM7_UP_REQ: Request = 5; @@ -38,5 +39,6 @@ pub async fn rx_dma_task( let _ = rx.read_exact(&mut chunk).await; let decoded = decode_uart_samples(&chunk, RX_OVERSAMPLE, &UART_CFG); pipe_rx.write(&decoded).await; + yield_now().await; } }