diff options
| -rw-r--r-- | examples/stm32f0/src/bin/multiprio.rs | 4 | ||||
| -rw-r--r-- | examples/stm32f3/src/bin/multiprio.rs | 4 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/multiprio.rs | 4 | ||||
| -rw-r--r-- | examples/stm32h7/src/bin/multiprio.rs | 4 |
4 files changed, 16 insertions, 0 deletions
diff --git a/examples/stm32f0/src/bin/multiprio.rs b/examples/stm32f0/src/bin/multiprio.rs index e49951726..e36c0d6c2 100644 --- a/examples/stm32f0/src/bin/multiprio.rs +++ b/examples/stm32f0/src/bin/multiprio.rs | |||
| @@ -126,6 +126,10 @@ fn main() -> ! { | |||
| 126 | // Initialize and create handle for devicer peripherals | 126 | // Initialize and create handle for devicer peripherals |
| 127 | let _p = embassy_stm32::init(Default::default()); | 127 | let _p = embassy_stm32::init(Default::default()); |
| 128 | 128 | ||
| 129 | // STM32s don’t have software-defined interrupts, so just use any free interrupt vectors which aren’t used | ||
| 130 | // by the rest of your application. In this case we’re using UART1 and UART2, but there’s nothing special | ||
| 131 | // about them. Any otherwise unused interrupt vector would work exactly the same. | ||
| 132 | |||
| 129 | // High-priority executor: USART1, priority level 6 | 133 | // High-priority executor: USART1, priority level 6 |
| 130 | interrupt::USART1.set_priority(Priority::P6); | 134 | interrupt::USART1.set_priority(Priority::P6); |
| 131 | let spawner = EXECUTOR_HIGH.start(interrupt::USART1); | 135 | let spawner = EXECUTOR_HIGH.start(interrupt::USART1); |
diff --git a/examples/stm32f3/src/bin/multiprio.rs b/examples/stm32f3/src/bin/multiprio.rs index 328447210..3a3059db1 100644 --- a/examples/stm32f3/src/bin/multiprio.rs +++ b/examples/stm32f3/src/bin/multiprio.rs | |||
| @@ -127,6 +127,10 @@ fn main() -> ! { | |||
| 127 | 127 | ||
| 128 | let _p = embassy_stm32::init(Default::default()); | 128 | let _p = embassy_stm32::init(Default::default()); |
| 129 | 129 | ||
| 130 | // STM32s don’t have software-defined interrupts, so just use any free interrupt vectors which aren’t used | ||
| 131 | // by the rest of your application. In this case we’re using UART4 and UART5, but there’s nothing special | ||
| 132 | // about them. Any otherwise unused interrupt vector would work exactly the same. | ||
| 133 | |||
| 130 | // High-priority executor: UART4, priority level 6 | 134 | // High-priority executor: UART4, priority level 6 |
| 131 | interrupt::UART4.set_priority(Priority::P6); | 135 | interrupt::UART4.set_priority(Priority::P6); |
| 132 | let spawner = EXECUTOR_HIGH.start(interrupt::UART4); | 136 | let spawner = EXECUTOR_HIGH.start(interrupt::UART4); |
diff --git a/examples/stm32f4/src/bin/multiprio.rs b/examples/stm32f4/src/bin/multiprio.rs index 328447210..5a55cd291 100644 --- a/examples/stm32f4/src/bin/multiprio.rs +++ b/examples/stm32f4/src/bin/multiprio.rs | |||
| @@ -127,6 +127,10 @@ fn main() -> ! { | |||
| 127 | 127 | ||
| 128 | let _p = embassy_stm32::init(Default::default()); | 128 | let _p = embassy_stm32::init(Default::default()); |
| 129 | 129 | ||
| 130 | // STM32s don’t have software-defined interrupts, so just use any free interrupt vectors which aren’t used | ||
| 131 | // by the rest of your application. In this case we’re using UART6 and UART7, but there’s nothing special | ||
| 132 | // about them. Any otherwise unused interrupt vector would work exactly the same. | ||
| 133 | |||
| 130 | // High-priority executor: UART4, priority level 6 | 134 | // High-priority executor: UART4, priority level 6 |
| 131 | interrupt::UART4.set_priority(Priority::P6); | 135 | interrupt::UART4.set_priority(Priority::P6); |
| 132 | let spawner = EXECUTOR_HIGH.start(interrupt::UART4); | 136 | let spawner = EXECUTOR_HIGH.start(interrupt::UART4); |
diff --git a/examples/stm32h7/src/bin/multiprio.rs b/examples/stm32h7/src/bin/multiprio.rs index 73f8dd092..f9a00f806 100644 --- a/examples/stm32h7/src/bin/multiprio.rs +++ b/examples/stm32h7/src/bin/multiprio.rs | |||
| @@ -127,6 +127,10 @@ fn main() -> ! { | |||
| 127 | 127 | ||
| 128 | let _p = embassy_stm32::init(Default::default()); | 128 | let _p = embassy_stm32::init(Default::default()); |
| 129 | 129 | ||
| 130 | // STM32s don’t have software-defined interrupts, so just use any free interrupt vectors which aren’t used | ||
| 131 | // by the rest of your application. In this case we’re using UART6 and UART7, but there’s nothing special | ||
| 132 | // about them. Any otherwise unused interrupt vector would work exactly the same. | ||
| 133 | |||
| 130 | // High-priority executor: UART4, priority level 6 | 134 | // High-priority executor: UART4, priority level 6 |
| 131 | interrupt::UART4.set_priority(Priority::P6); | 135 | interrupt::UART4.set_priority(Priority::P6); |
| 132 | let spawner = EXECUTOR_HIGH.start(interrupt::UART4); | 136 | let spawner = EXECUTOR_HIGH.start(interrupt::UART4); |
