Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use higher priority tasks on STM32G030 with Embassy HAL #957

Closed
andresv opened this issue Jun 30, 2024 · 1 comment
Closed

Cannot use higher priority tasks on STM32G030 with Embassy HAL #957

andresv opened this issue Jun 30, 2024 · 1 comment

Comments

@andresv
Copy link
Contributor

andresv commented Jun 30, 2024

rt flag is enabled for embassy-stm32.

--> src/main.rs:30:1
 |
30 | #[app(device = embassy_stm32, peripherals = true, dispatchers = [TIM16, TIM17])]
 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `Interrupt` in `embassy_stm32`
 |
 = note: this error originates in the attribute macro `app` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing one of these items
 |
32 +     use crate::app::you_must_enable_the_rt_feature_for_the_pac_in_your_cargo_toml::interrupt::Interrupt;
 |
32 +     use crate::app::you_must_enable_the_rt_feature_for_the_pac_in_your_cargo_toml::interrupt::typelevel::Interrupt;
 |
32 +     use embassy_stm32::interrupt::Interrupt;
 |
32 +     use embassy_stm32::interrupt::typelevel::Interrupt;

Here is an example to try it out: https://github.com/andresv/stm32g030-rtic.
Maybe I am missing something obvious.

@andresv
Copy link
Contributor Author

andresv commented Oct 28, 2024

This can be resolved like this:

pub mod pac {
    pub const NVIC_PRIO_BITS: u8 = 2;
    pub use cortex_m_rt::interrupt;
    pub use embassy_stm32::pac::Interrupt as interrupt;
    pub use embassy_stm32::pac::*;
    pub use embassy_stm32::Peripherals;
}

#[app(device = pac, peripherals = true, dispatchers = [TIM16, TIM17])]
mod app {
...
}

@andresv andresv closed this as completed Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant