-
I need to use mulththreaded embassy using two cores on ESP32, so I started by trying out the simplest program that loops and logs from two embassy threads. Same as the examle at https://github.com/esp-rs/esp-hal/blob/main/esp32-hal/examples/embassy_multicore.rs except that its simpler, just trying to loop with a Timer. It doesn't work. The Timer on the 2nd executor doesn't function, it just waits forever. Edit: Adding to the above, I continued to add wifi to the 2nd executor, and at some point suddenly Timer also started working. Here is the program:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Opting into the generic-queue feature of embassy-time should fix this. The TIMG time driver on the esp32 only has two timer slots, the generic queue can do more. |
Beta Was this translation helpful? Give feedback.
-
When I add this feature to embassy-time 0.2.0, I get this linker error:
Which points to macro_rules! timer_queue_impl {
(static $name:ident: $t: ty = $val:expr) => {
static $name: $t = $val;
#[no_mangle]
fn _embassy_time_schedule_wake(at: $crate::Instant, waker: &core::task::Waker) {
<$t as $crate::queue::TimerQueue>::schedule_wake(&$name, at, waker);
}
};
} The issue still exists in 0.3.0
|
Beta Was this translation helpful? Give feedback.
-
I also have |
Beta Was this translation helpful? Give feedback.
Opting into the generic-queue feature of embassy-time should fix this. The TIMG time driver on the esp32 only has two timer slots, the generic queue can do more.