I am trying to use gpio36 as both input pin and a boot source for wakeup from ulpm.
I constantly monitor the state of the gpio pin and when I change the state of the pin (via a push button), in the event handler I set the gpio as a boot source and then call ulpm_shutdown().
Even though it doesn’t give me any error calling the le_ulpm_shutdown() function, it also didn’t go to ultra-low power mode. I am expecting some message to appear in the serial console regarding that. Is there any other way to check it?
I tried using the pmtool to test the ulpm shutdown:
- pmtool bootOn gpio 36 high
SUCCESS!
- pmtool shutdown
Initiated shutdown of MDM
on the serial console: pm_set_mcu_ulpm_enable: Request PM1
- when I provide a 1.8v source to the gpio36:
on the serial console:
gpio_check_and_wake: wake-n_gpio26 STATE=WAKEUP
swimcu_gpio_irq_event_handle: Re-enabled irq 0 type B for MCU GPIO 0
gpio_check_and_wake: wake-n_gpio26 STATE=SLEEP
gpio_check_and_wake: wake-n_gpio26 STATE=WAKEUP
swimcu_gpio_irq_event_handle: Re-enabled irq 0 type B for MCU GPIO 0
gpio_check_and_wake: wake-n_gpio26 STATE=SLEEP
I am using legato 19.04 version with toolchain SWI9X06Y_02.22.12.00.
Any ideas what is going on?