Close

Better sleep

A project log for M0S - CortexM0 RTOS in 1024 bytes

Full blown RTOS written in Thumb ARM assembly language to fit in 1024 bytes

dumitrustamadumitru.stama 12/02/2016 at 03:582 Comments

I replaced the infinite loop in the idle task with "wfi" instruction. Theoretically this should put the processor to sleep until the next systick interrupt and this will save energy. I said theoretically because it needs some setup but it seems to work out of the box so I will keep it as an option.

I also uploaded the RAM memory map.

Discussions

dumitru.stama wrote 12/02/2016 at 08:05 point

Since this is a proof of concept I will probably not spend too much time on this. I just noticed some stability issues with the "janitor idle task" so I reverted to an infinite loop until I re-write.

  Are you sure? yes | no

K.C. Lee wrote 12/02/2016 at 04:50 point

Wfi save very little power on regular M0, but it is still better than nothing.

  Are you sure? yes | no