There is currently no support for working in privileged mode.
There should at least be
- a way to call the svc instruction
- This can be implemented by
cortex_m::asm::svc(num: u32)
- a way to write thread mode privilege level
- This can be implemented by
cortex_m::register::control::write(Control) and perhaps also something in the lines of cortex_m::register::control::modify(f: F) where f: FnOnce(Control) -> Control
The cortex_m_rt crate seem to already implement the possibility for overriding the SVC handler. So with these changed it should be possible to:
- Execute the work in need of privileged mode from the svc handler
- Set the thread mode from the SVC handler and then execute the work after returning from the handler.
There is currently no support for working in privileged mode.
There should at least be
cortex_m::asm::svc(num: u32)cortex_m::register::control::write(Control)and perhaps also something in the lines ofcortex_m::register::control::modify(f: F) where f: FnOnce(Control) -> ControlThe cortex_m_rt crate seem to already implement the possibility for overriding the SVC handler. So with these changed it should be possible to: