WP7608 Measures to take in case of a sudden power loss

Hello,

Here is a draft of our proposed power failure countermeasure for the WP7608, which utilizes its built-in MCU. We plan to develop our own custom software to run on this built-in MCU.

During a power failure, the voltage of the main power supply drops. Based on this premise, could you please provide your feedback on the following two points?

1. Is it possible to send an AT command (such as AT!POWERDOWN) from our custom software on the built-in MCU upon detecting this voltage drop?
In our configuration, we have a main power supply and a dedicated supercapacitor sub-power supply for the WP7608.
Our plan is to use a WP7608 GPIO pin to detect when the main power supply voltage drops. If our software can send the AT command immediately after detection, we believe we can complete the power-down sequence while the sub-power supply is still active.

2. If the above approach is possible, are there any restrictions on which GPIO pin we should use for voltage detection?
Should we specifically use a GPIO pin that is directly connected to the built-in MCU, or is there no restriction on the GPIO selection?

Thank you for your assistance.


Q1:
please refer to the section in PTS

Q2:
I don’t quite think GPIO can sense power drop, but ADC pin might be used.

Hello,

Let me add some details.

Q1.
I believe your answer concerns sending AT commands from an external source (HOST-IC) to the WP76xx.
My question was whether it’s possible to send AT commands from the internal MCU, as shown in the diagram below.
If the main power supply is lost, the HOST-IC also turns off, making it impossible to send AT commands.

Q2.
To detect “Low” (voltage drop), we plan to use the following circuit configuration.
Please check Q2 if we use the following circuit configuration.

Q1: Here is my test on UART2 console to enter AT!POWERDOWN command to /dev/ttyAT port:


d not get usb power_supply
[   17.631672] qrtr: Modem QMI Readiness RX cmd:0x2 node[0x3]
[   17.702453] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[   17.719610] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[   17.739511] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[   17.768846] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
^\^@^A^@àÀ^@ãúÿ[   17.821686] diag: In diag_send_peripheral_buffering_mode, buffering flag not set for 0
[   17.918766] scm_call failed: func id 0x2000c06, ret: -1, syscall returns: 0x0, 0x0, 0x0
[   17.918800] msm_audio_protect_memory_region: SCM call failed, scm_call_ret -5 tz_resp 0
[   18.121385] msm_audio_ion_alloc: vaddr = ff7c7c3e, size=24
[   18.122859] msm_audio_ion_alloc: vaddr = 5302c150, size=8192
[   18.125840] msm_audio_ion_alloc: vaddr = a96ca08c, size=24
done loading audio_kernel module
Starting mbimd: [   18.741233] usb_cser_notify: port at_usb0 can't notify serial state, -11
[   18.741267] msm_otg 78d9000.usb: Could not get usb power_supply
[   18.746990] msm_otg 78d9000.usb: Could not get usb power_supply
[   18.752634] msm_otg 78d9000.usb: Could not get usb power_supply
[   18.758538] msm_otg 78d9000.usb: Could not get usb power_supply
[   18.764551] qti_ctrl_queue_notify: rmnet ctrl file handler d8d5f225 is not open
[   18.765246] gbam_disconnect_work: Bam channel is not opened
[   18.786162] msm_otg 78d9000.usb: Could not get usb power_supply
[   18.786199] msm_otg 78d9000.usb: Could not get usb power_supply
Legato start sequence
done
^@:#ó[   18.888165] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[   18.894483] msm_otg 78d9000.usb: Could not get usb power_supply
[   18.916534] msm_otg 78d9000.usb: Could not get usb power_supply
[   18.924269] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmounÿ[   26.043376] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[   26.053472] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[   26.092546] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
^Zþ÷.
Àðþ^Xÿ[   26.156130] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
aþÀ^@^@^@çà?Lÿ¿þStarting modem dependent daemons: Load modem done
[   26.542418] msm_otg 78d9000.usb: Could not get usb power_supply
[   26.542443] msm_otg 78d9000.usb: Could not get usb power_supply
[   26.547138] msm_otg 78d9000.usb: Could not get usb power_supply
[   26.553043] msm_otg 78d9000.usb: Could not get usb power_supply
[   26.559053] qti_ctrl_queue_notify: rmnet ctrl file handler d8d5f225 is not open
[   26.559873] gbam_disconnect_work: Bam channel is not opened
Starting qmuxd: [   26.694648] msm_otg 78d9000.usb: Could not get usb power_supply
[   26.694674] msm_otg 78d9000.usb: Could not get usb power_supply
[   26.699446] gbam_connect_work: Bam channel is not ready
done
[   26.976971] qti_ctrl_queue_notify: rmnet ctrl file handler d8d5f225 is not open
Starting thermal-engine: done
[   26.977865] qti_ctrl_queue_notify: rmnet ctrl file handler d8d5f225 is not open
Starting netmgrd: done
Starting powerconfig for mdm9607: sh: write error: Invalid argument
Starting fs-scrub-daemon: done
sysctl: cannot stat /proc/sys/net/ipv4/tcp_syncookies: No such file or directory
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
kernel.randomize_va_space = 2
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv6.conf.all.accept_source_route = 0
net.ipv6.conf.default.accept_source_route = 0
net.ipv6.conf.all.accept_ra = 1
net.ipv6.conf.default.accept_ra = 1
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.log_martians = 1
rm: can't remove '/var/log/wtmp': No such file or directory
Starting eMBMs_TunnelingModule: done
Starting qmi_ip: done
starting DNS forwarder and DHCP server: dnsmasq... /usr/bin/dnsmasq is already running
Starting Dropbear SSH server: dropbear.
run_getty.sh: ttyMSM1 reserved for CONSOLE

Poky (Yocto Project Reference Distro) 3.1.15 swi-mdm9x28-wp /dev/ttyMSM1

swi-mdm9x28-wp login: root
root@swi-mdm9x28-wp:~# microcom /dev/ttyAT

+CREG: 0

+CGREG: 0

+CEREG: 0

+CREG: 2

+CGREG: 2

+CEREG: 2
ati3
Manufacturer: Sierra Wireless, Incorporated
Model: WP7605
Revision: SWI9X07Y_02.37.06.25 f306c7 jenkins 2025/07/24 02:45:36
IMEI: 353532100012435
IMEI SV: 21
FSN: 2A917285012345
+GCAP: +CGSM

OK
at!powerdown
OK
rcK: Executing run_K_scripts...
Stopping linkmon: no linkmon found; none killed
done
[   61.660567] [RMNET:HI] rmnet_config_notify_cb(): Kernel is trying to unregister ecm0
[   61.680351] [RMNET:HI] rmnet_config_notify_cb(): Kernel is trying to unregister ecm0
diag: Unable to get remote processor info. Continuing with just the local processor
Stopping qmi_ip: no qmi_ip_multiclient found; none killed
Stopping eMBMs_TunnelingModule: no eMBMs_TunnelingModule found; none killed
Stopping netmgrd: stopped netmgrd (pid 1517)
done
Stopping qmuxd: stopped qmuxd (pid 1467)
done
no QCMAP_ConnectionManager found; none killed
Stopping fs-scrub-daemon: no fs-scrub-daemon found; none killed
Stopping thermal-engine: stopped thermal-engine (pid 1480)
done
stopped qti (pid 1858)
Stopping reboot daemon: stopped reboot-daemon (pid 1394)
done
Legato shutdown sequence
Stopping Legato..
DONE.
Finished Legato stop Sequence
[   67.440451] adm_memory_unmap_regions: timeout. waited for memory_unmap
[   67.440508] adm_unmap_cal_data: unmap did not work! cal_type 0 ret -22
[   67.445898] unmap_memory: unmap_cal failed, cal type 10, ret = -19!
[   67.453208] destroy_all_cal_blocks: unmap_memory failed, cal type 10, ret = -19!
[   68.480444] adm_memory_unmap_regions: timeout. waited for memory_unmap
[   68.480500] adm_unmap_cal_data: unmap did not work! cal_type 1 ret -22
[   68.485890] unmap_memory: unmap_cal failed, cal type 11, ret = -19!
[   68.493195] destroy_all_cal_blocks: unmap_memory failed, cal type 11, ret = -19!
[   68.560424] afe_set_lpass_clock: AFE enable for port 0x100a ret -110
[   69.520452] adm_memory_unmap_regions: timeout. waited for memory_unmap
[   69.520508] adm_unmap_cal_data: unmap did not work! cal_type 1 ret -22
[   69.525892] unmap_memory: unmap_cal failed, cal type 11, ret = -19!
[   69.533259] destroy_all_cal_blocks: unmap_memory failed, cal type 11, ret = -19!
[   70.560415] adm_memory_unmap_regions: timeout. waited for memory_unmap
[   70.560472] adm_unmap_cal_data: unmap did not work! cal_type 3 ret -22
[   70.565855] unmap_memory: unmap_cal failed, cal type 12, ret = -19!
[   70.572914] afe_set_lpass_clock: AFE enable for port 0x100b ret -110
[   70.578874] destroy_all_cal_blocks: unmap_memory failed, cal type 12, ret = -19!
[   71.600417] adm_memory_unmap_regions: timeout. waited for memory_unmap
[   71.600473] adm_unmap_cal_data: unmap did not work! cal_type 3 ret -22
[   71.605862] unmap_memory: unmap_cal failed, cal type 12, ret = -19!
[   71.613137] destroy_all_cal_blocks: unmap_memory failed, cal type 12, ret = -19!
[   72.640423] adm_memory_unmap_regions: timeout. waited for memory_unmap
[   72.640479] adm_unmap_cal_data: unmap did not work! cal_type 7 ret -22
[   72.645867] unmap_memory: unmap_cal failed, cal type 40, ret = -19!
[   72.652924] afe_set_lpass_clock: AFE enable for port 0x100c ret -110
[   72.658858] destroy_all_cal_blocks: unmap_memory failed, cal type 40, ret = -19!
[   74.720446] afe_set_lpass_clock: AFE enable for port 0x100d ret -110
Unloading kernel base audio modules...
Done unloading kernel base audio modules.
stopping time daemon
Stopping time_services: stopped time_daemon (pid 921)
done
stopping ntpd
no ntpd found; none killed
Stopping diagrebootapp: stopped diagrebootapp (pid 873)
done
[   75.004717] f_cdev_poll: Failed due to NULL device or disconnected.
stopped port_bridge (pid 893)
stopping Busybox Periodic Command Scheduler: crond... stopped crond (pid 631)
done.
stopping DNS forwarder and DHCP server: dnsmasq... stopped /usr/bin/dnsmasq (pid 898)
done.
Deconfiguring network interfaces... ifdown: interface eth0 not configured
done.
Stopping syslogd/klogd: stopped syslogd (pid 669)
stopped klogd (pid 672)
done
Stopping Dropbear SSH server: stopped /usr/sbin/dropbear (pid 1803)
dropbear.
K96mount_unionfs: RO rootfs fudge allowed.
K98mount_early: Executing mount_early_user_stop...
K98mount_early: RO rootfs fudge allowed.
K98mount_early: ubidetach failed for device /dev/mtd16, rcK should take care of it.
K98mount_early: Executing mount_early_legato_stop...
Can't get valid SMEM, init DSSD SMEM
Linux sub system 1
K98mount_early: Executing mount_early_userrw_stop...
K98mount_early: Executing mount_early_unset_timezone...
rcK: Executing kill_all_proc...
rcK: Executing umount_fs_generic...
rcK: Executing print_shutdown_msg...
** SYSTEM SHUTDOWN COMPLETE **
The system is going down NOW!
[   77.015210] mbim_read: Waiting failed
sh: getcwd: No such file or directory
Sent SIGTERM to all processes#
Sent SIGKILL to all processes
Requesting system poweroff
[   79.0

Q2: then why don’t you use ADC?

Hello,

Let me confirm the answer to Q1.
In this test, the AT commands are sent from the built-in MCU, right?

In Q2, we also consider the ADC.
In this case, are ADC2/3, which are connected to the built-in MCU, the optimal ADC ports?
Or would ADC0/ADC1 also be acceptable?

Thanks

Q1: as mentioned above, I am sending from the UART2 console.
Q2: I suggest you to do some testing on the mangoh board or WP76 development board for the ADC pins.
WP7608 is group A variant, so it should have ADC0-ADC3 four ADC pins

Hello,

This is my first time working with WP7608, so I’m not very familiar with the UART2 console.
Is it possible to implement a UART2 console on the built-in MCU?

What I ultimately want to know is whether it’s possible to send an AT command from the WP7608’s built-in MCU when it detects a voltage drop with its ADC.

Thanks,

why do you want to send AT command from built-in MCU?
Didn’t you want to send the AT!POWERDOWN command from legato application or linux bash script?

Hello,

During a power drop, the external MCU (HOST-IC) that uses the main power supply turns off, but the WP7608 continues to operate using its dedicated sub-power supply.

When a voltage drop in the main power supply is detected, the external MCU cannot send AT commands, so we want the internal MCU to send the AT commands instead.

I believe this can be achieved by implementing the Legato application on the built-in MCU.
Is this understanding correct?

Thanks

when you say built-in MCU, are you saying the MCU of group A variant?
Or you are saying the yocto linux of WP76xx module?

BTW, is that your product will have external MCU (HOST-IC) connected to WP76 module?
If yes, can you external MCU (HOST-IC) sense the power cut scenario?
If yes, then you can directly perform the “software- initiated power down” sequence mentioned above.

Hello,

When I refer to the built-in MCU, I mean the Group A variant MCU.

The WP76 module will be equipped with an external MCU (host IC) connected to it.
The host IC cannot detect power interruptions.
Therefore, we want the WP7608 to detect them.

Thanks

the Group A variant MCU is for extra GPIO/ADC, ULPM.
It is not for user to write program into it.

As suggested above, you should consider to send the AT!POWERDOWN command from legato application or linux bash script

Hello,

I apologize, it seems I misunderstood.
So, I need to transfer the Legato application from an external MCU to the WP7608 and use it there, right? That way, the WP7608 can monitor the voltage and control the mode, correct?

Thanks

what do you mean by "transfer the Legato application from an external MCU to the WP7608 "?
I don’t think your external MCU in host platform can run legato application…

The WP7608’s flash memory has an area for saving Legato applications,
so I think it will transfer to that area. Am I wrong?

yes, that is correct, the legato framework is installed in lefwkro partition
and if you download a .update legato application to it, it is installed in userapp parition.

You can transfer the legato application(xxx.update file) from your Windows PC or linux PC by SCP protocol

Hello,

Would autonomous control be possible if I created and downloaded a Legato application that monitors the power supply, switches modes when the voltage drops, or even turns itself off?

Thanks

I guess so, but you better write a legato application to verify

BTW, how long can your sub-power supply maintain the voltage after there is power cut scenario?

Thank you.
I will consider the Legato app.

I am thinking of holding the sub-power supply for a minimum of 10 seconds.
The specification states that the OFF sequence time is a maximum of 8 seconds.

OK, understood.
Just a reminder, there might be degradation of supercapacitor after working in the field for a few years, so you might need to take this into account