mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 06:11:24 +03:00
Know it's working by not unmasking interrupts
This commit is contained in:
parent
5ba5a887a5
commit
071b0eee8c
8
main.c
8
main.c
@ -242,10 +242,14 @@ void Main(void)
|
||||
|
||||
while (1)
|
||||
{
|
||||
if (!g_next_time_slice && !g_next_time_slice_500ms)
|
||||
// Mask interrupts
|
||||
__asm volatile ("cpsid i");
|
||||
if (!g_next_time_slice)
|
||||
// Idle condition, hint the MCU to sleep
|
||||
// CMSIS suggests GCC reorders memory and is undesired
|
||||
// CMSIS suggests GCC reorders memory and is undesirable
|
||||
__asm volatile ("wfi":::"memory");
|
||||
// Unmask interrupts
|
||||
__asm volatile ("cpsie i");
|
||||
|
||||
APP_process();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user