Merge pull request #2785 from barnabywalters/stm32-multiprio

[embassy-stm32] added comments explaining multiprio interrupts
This commit is contained in:
Dario Nieuwenhuis 2024-04-07 16:16:13 +00:00 committed by GitHub
commit a4eebdcc68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 0 deletions

View File

@ -126,6 +126,11 @@ fn main() -> ! {
// Initialize and create handle for devicer peripherals
let _p = embassy_stm32::init(Default::default());
// STM32s dont have any interrupts exclusively for software use, but they can all be triggered by software as well as
// by the peripheral, so we can just use any free interrupt vectors which arent used by the rest of your application.
// In this case were using UART1 and UART2, but theres nothing special about them. Any otherwise unused interrupt
// vector would work exactly the same.
// High-priority executor: USART1, priority level 6
interrupt::USART1.set_priority(Priority::P6);
let spawner = EXECUTOR_HIGH.start(interrupt::USART1);

View File

@ -127,6 +127,11 @@ fn main() -> ! {
let _p = embassy_stm32::init(Default::default());
// STM32s dont have any interrupts exclusively for software use, but they can all be triggered by software as well as
// by the peripheral, so we can just use any free interrupt vectors which arent used by the rest of your application.
// In this case were using UART4 and UART5, but theres nothing special about them. Any otherwise unused interrupt
// vector would work exactly the same.
// High-priority executor: UART4, priority level 6
interrupt::UART4.set_priority(Priority::P6);
let spawner = EXECUTOR_HIGH.start(interrupt::UART4);

View File

@ -127,6 +127,11 @@ fn main() -> ! {
let _p = embassy_stm32::init(Default::default());
// STM32s dont have any interrupts exclusively for software use, but they can all be triggered by software as well as
// by the peripheral, so we can just use any free interrupt vectors which arent used by the rest of your application.
// In this case were using UART4 and UART5, but theres nothing special about them. Any otherwise unused interrupt
// vector would work exactly the same.
// High-priority executor: UART4, priority level 6
interrupt::UART4.set_priority(Priority::P6);
let spawner = EXECUTOR_HIGH.start(interrupt::UART4);

View File

@ -127,6 +127,11 @@ fn main() -> ! {
let _p = embassy_stm32::init(Default::default());
// STM32s dont have any interrupts exclusively for software use, but they can all be triggered by software as well as
// by the peripheral, so we can just use any free interrupt vectors which arent used by the rest of your application.
// In this case were using UART4 and UART5, but theres nothing special about them. Any otherwise unused interrupt
// vector would work exactly the same.
// High-priority executor: UART4, priority level 6
interrupt::UART4.set_priority(Priority::P6);
let spawner = EXECUTOR_HIGH.start(interrupt::UART4);