pub fn try_init_secondary(
shared_data: &'static MaybeUninit<SharedData>,
) -> Option<Peripherals>Expand description
Try to initialize the embassy-stm32 HAL based on the init done by the other core using init_primary.
This returns the peripheral singletons that can be used for creating drivers if the other core is done with its init.
If the other core is not done yet, this will return None. It never blocks:
call it repeatedly (as init_secondary does) until it returns Some.
The notification from the other core is consumed as a level rather than an event, so this core can be restarted (e.g. under a debugger) while the other core keeps running, and still proceed.
This can only succeed once per boot, otherwise it may panic.
A hardware semaphore is used to coordinate the init with the second core.