Hello everyone !
I a trying to use the ULPM of my mangOH Yellow to measure current consumption in this mode.
I took inspiration from the ShakeNWake Demo to make my own app that goes into ULPM if the generic push button of the board is pressed (GPIO25 on mangOH Yellow), and wakes up if the board is shaken.
This works just fine if I use the USB main power supply to power the board. The board goes into ULPM when I press the button, and boots back if I shake it.
Then I wanted to do the same thing using a battery to power the board instead of my PC.
So I unplugged the USB connector providing power to the board, removed the jumper selecting the power source and plugged a power source into the battery connector (CN1000) of the board.
It boots normally, but when I press the button to enter ULPM, I get some errors in the logs and the board doesn’t go into ULPM.
[12:27:27:895] Apr 15 12:27:25 swi-mdm9x28-wp user.info kernel: [ 43.901130] swimcu_pm_wusrc_config: configured GPIO wakeup source 0x10000 ␍␊ [12:27:27:895] Apr 15 12:27:25 swi-mdm9x28-wp user.err kernel: [ 43.901168] swimcu_pm_wusrc_config: check statep->gpio_pin_mask 0x10000 ␍␊ [12:27:27:895] Apr 15 12:27:25 swi-mdm9x28-wp user.err kernel: [ 43.921377] MCU Protocol Command 0xC2 failed, retry=1
And after a series of retries, I get this:
[12:27:31:779] Apr 15 12:27:31 swi-mdm9x28-wp user.err kernel: [ 49.006450] MCU Protocol Command 0xC2 failed, retry=11␍␊ [12:27:31:827] Apr 15 12:27:31 swi-mdm9x28-wp user.err kernel: [ 49.020481] swimcu_pm_wusrc_config: failed to GPIO config 0x10000 (-2)␍␊ [12:27:31:827] Apr 15 12:27:31 swi-mdm9x28-wp user.info kernel: [ 49.026113] swimcu_pm_wusrc_config_reset␍␊ [12:27:31:827] Apr 15 12:27:31 swi-mdm9x28-wp user.err kernel: [ 49.026143] swimcu_psm_enable_attr_store: Failed to enable mode 6: -5
What is preventing my board to go into ULPM ?
I can provide my code if needed, but it was too big for a single post…
In fact it doesn’t work that well even with USB plugged in, I sometimes encounter the same problem of the board not going into ULPM. I can press the button 2 times in a row and get a different behavior But it’s exactly the same error each time it fails.
I found this post where another person seems to have the same kind of problem, but it’s still unresolved.