embassy/embassy-executor/src/arch
Dummyc0m 9e6e09a8d7 executor/spin: introduce an architecture agnostic executor
Spin polls the raw executor and never sleeps. It is useful for disabling
any power features associated with wfi/wfe-like instructions.

When implementing support for the CH32V30x MCU, the wfi instruction
had issues interacting with the USB OTG peripheral and appeared to be
non-spec-compliant.

1. When sending a USB Data-in packet, the USB peripheral appears to be
unable to read the system main memory while in WFI. This manifests in
the USB peripheral sending all or partially zeroed DATA packets.
Disabling WFI works around this issue.

2. The WFI instruction does not wake up the processor when MIE is
disabled. The MCU provides a WFITOWFE bit to emulate the WFE instruction
on arm, which, when enabled, ignores the MIE and allows the processor to
wake up. This works around the non-compliant WFI implementation.

Co-authored-by: Codetector <codetector@codetector.org>
Co-authored-by: Dummyc0m <y@types.moe>
2024-10-06 23:33:34 -07:00
..
avr.rs fix 2024-01-03 12:35:07 +09:00
cortex_m.rs executor: rename macro crate to embassy-executor-macros, bump it. 2023-12-07 00:48:30 +01:00
riscv32.rs executor: remove portable-atomic for riscv. 2024-03-02 00:21:56 +01:00
spin.rs executor/spin: introduce an architecture agnostic executor 2024-10-06 23:33:34 -07:00
std.rs executor: rename macro crate to embassy-executor-macros, bump it. 2023-12-07 00:48:30 +01:00
wasm.rs executor: rename macro crate to embassy-executor-macros, bump it. 2023-12-07 00:48:30 +01:00