I want to design a project using sleep mode.
Specifically the mcu is sleeping until a button is pressed in P1.0 pin (active high, using port match as wake-up source).
Each time the button is pressed the mcu will wake up, toggle the output pin P1.5 and go gain to sleep. Im using as system clock the default clock 2.5 MHz (Low power internal oscillator 20 MHz / 8). The problem is that the output pin P1.5 toggles only for the first time and then there is no response in each button press. Its my first time with sleep mode configuration and i am not understanding what is happening. Im attaching the project (Simplicity studio v4).
I suggest you take a look at the example F93x_SleepMode_PortMatchWake
Exactly I followed the example but i am using only one c file. The issue was that i was first configuring the wake-up source and then enabling the sleep mode. It is crucial to do these operations at the same time according to datasheet. So i replaced these two lines PMU0CF = 0x02 PMU0CF |= 0x80 with one line PMU0CF = 0x82 and it worked without a problem.