I'm trying to make the MKE04Z8 enter STOP mode. I'm working with MCUXpresso IDE and I am not able to find the register to toggle to make the cpu enter stop mode when the WFI rutine is called. In the manual reference stop mode is only mentioned to explain functionalities and not how to really implement it.
In KDS there was an option on processor expert:
And then the code generated was the following:
This SCB_SCR des not exist in MCUXpresso nor it's mentioned on the manual reference. If I dont activate this deepsleep bit the __WFI(); rutine, it just puts my microcontroler in wait mode and that's not acceptable in my case, for consumption reasons.
I would like to know how to implement the STOP mode, using the clock tool in MCUXpresso or directly with baremetal.
Also if its possible, i would like to know if there are any interrupts enabled by default that could wake my mcu appart from the ones that I work with (just the RTC)