ULPM Boot on GPIO Issue


I’m having a problem setting up ULPM to boot via GPIO. When I use the sample code listed in the Legato API I get the following error when I shut the device down. I’m using ULPM firmware version 002.004. If I change the LE_ULPM_GPIO_HIGH to LE_ULPM_GPIO_RISING I don’t get an error anymore but the device also won’t come out of shutdown when I apply 1.8V to GPIO 36. Any help would be greatly appreciated.

Nov 21 12:55:42 | powerManagerService[633]/powerMgr T=main | le_ulpm.c WriteToSysfs() 146 | Error writing to sysfs file ‘/sys/module/swimcu_pm/boot_source/enable’ (Input/output error).

Nov 21 12:55:42 | lowpower[1563]/LowPowerComponent T=main | LowPowerComponent.c _LowPowerComponent_COMPONENT_INIT() 23 | Can’t initiate shutdown

Here is the code I’m using:

char version[LE_ULPM_MAX_VERS_LEN+1];
// Connect to service

// Get ultra low power manager firmware version
LE_FATAL_IF(le_ulpm_GetFirmwareVersion(version, sizeof(version)) != LE_OK,
“Failed to get ultra low power firmware version”);

LE_INFO(“Ultra Low Power Manager Firmware version: %s”, version);

// Boot after 1000 second of shutdown.
LE_ERROR_IF(le_ulpm_BootOnTimer(120) != LE_OK, “Can’t set timer as boot source”);

// Boot if GPIO36 voltage level is high.
LE_ERROR_IF(le_ulpm_BootOnGpio(36, LE_ULPM_GPIO_HIGH) != LE_OK, “Can’t set gpio36 as boot source”);

// Initiate shutdown.
LE_ERROR_IF(le_ulpm_ShutDown() != LE_OK, “Can’t initiate shutdown”);


Hi @drewwestrick

I too have had this issue when attempting to shutdown after setting up any of the ULPM GPIOs to boot on LE_ULPM_GPIO_HIGH. All other trigger options (rising, falling, low) succeed and the module shuts down correctly on the first call of le_ulpm_ShutDown().

I’ve found that if you persist and periodically attempt the set the boot source as LE_ULPM_GPIO_HIGH and call the ulpm shutdown function it will eventually succeed. My system runs a timer with a callback funtion to do just that.

Unfortunately, this is only a workaround. You could try running that small snippet of code in a loop or setup a timer to do the work and see if that get’s things working for you in the meantime.

Hopefully someone from Sierra will have an answer.




Thanks for the insight regarding the LE_ULPM_GPIO_HIGH signal. It is definitely odd that you need to call that function and the shutdown function multiple times to get that to set properly.

When you setup the pin for rising, falling, or low does the device successfully come out of ULPM for you? I’ve tried several of those settings and toggled the proper pin but haven’t been able to get the device to successfully reboot other than the POWER_ON button.


Do you have the devmode app installed? I think I remember that causing ULPM to fail.



Yes, I did uninstall devMode. When running it won’t let the device enter ULPM. I can get the device to go into ULPM but can’t get it come back out even when I use the le_ulpm_BootOnGpio to setup a GPIO wake-up source. I can get the device to wake up using the timer source, however.



It is odd. Occasionally it will work first time but more often than not it needs another “kick”, or two.

I’ve been successful in booting from ULPM with pins setup for HIGH and LOW but my module (WP8548) is on a custom PCB and not on mangOH Red.

  1. Which 1.8V supply are you using to set the level on the GPIOs?

  2. Can you measure 1.8V on the GPIO(s) when the module is in ULPM?

  3. What are your Module Signal Control (SW401) dip positions?



Right now I’m using the 1V8_ULMP which is enabled using I beliteve pin 3 on the SW401 dip switch. I’ve measured the voltage with a meter when the device is powered down and still see 1.8V. I’m using that voltage and tapping it to the proper GPIO pin on the same header on the mangOH Red.

I’m wondering if I need to apply some pull up or pull down resistors to create a sharp edge for wake up.

Do you know if the GPIO pins on these modules have weak internal pull-ups?



Here’s a link to the product technical specification:

See Table 10-1 on page 121.
According to the PTS: GPIO36, GPIO38 and GPIO39 have no internal pull-up or pull-down resistors (denoted NP).

Adding a pull-down if you want to boot on LE_ULPM_GPIO_HIGH is a good idea.

FYI, we have the wakeable GPIOs buffered through level translators on our design so they’re not left floating.

For the sake of testing, another way to quickly invoke and configure ULPM is from the command line with pmtool.


After doing some more testing I’ve found that using ADC1 and ADC2 work just fine as boot sources. I’m still having issues getting GPIO 36 or 38 to work however.

If I use the pmtool to setup a GPIO boot source via:
pmtool bootOn 36 low

I get the following error:
Bad boot source: 36

I also looking into which GPIOs are setup using the following AT command: AT+WIOCFG?

+WIOCFG: 2,0,0,0,1,0,0
+WIOCFG: 7,0,0,0,1,0,0
+WIOCFG: 8,0,0,0,1,0,0
+WIOCFG: 13,0,0,0,1,0,0
+WIOCFG: 21,0,0,0,1,0,0
+WIOCFG: 22,0,0,0,1,0,0
+WIOCFG: 23,0,0,0,1,0,0
+WIOCFG: 24,0,0,0,1,0,0
+WIOCFG: 25,0,0,0,1,0,0
+WIOCFG: 32,0,0,0,1,0,0
+WIOCFG: 33,0,0,0,1,0,0
+WIOCFG: 35,0,0,0,1,0,0
+WIOCFG: 42,0,0,0,1,0,0

As you can see pin 36 and 38 aren’t setup as GPIOs. I’m not sure if they should or should not be, just some additional information. It also may help to know I’m using a WP7603 as my module currently.


We are working towards the fix for WP76 and the fix is currently being tested by the teams