Delay should sleep the CPU
Rather than busy-wait the CPU, the delay implementation should set the systick to generate an interrupt on overflow, and sleep with a wfi. This would reduce power consumption.
You might need to put it behind a flag because you'd have to replace DefaultHandler_ for systick with something that didn't loop forever...
SysTick can not be an option because user can use it, and overriding duration and systick registers may bring unexpected results to user's program And the most basic usage of SysTick which is executing handler once in N cycles is expected to continue executing while waiting for delay.
That's not possible because the cortex_m::Delay struct takes ownership of the SYSTICK singleton, and the Delay::delay_us method already changes all the registers in order to perform the sleep. The only thing we'd need to change is setting the NVIC bits to enable interrupt on Systick overflow, and I think that can be done atomically without needing a &mut cortex_m::NVIC (or even &cortex_m::NVIC), so the API to the Delay object doesn't even need to change.
Oh, i see I didn't know we have SysTick based delay already Using sleep mode is a good point