toitlang / toit

Program your microcontrollers in a fast and robust high-level language.
https://toitlang.org/
GNU Lesser General Public License v2.1
1.2k stars 79 forks source link

Manual shutdown for Sequans cellular modem on Gpy before going into deep sleep #900

Open HoferChristoph opened 2 years ago

HoferChristoph commented 2 years ago

Is it possible to manually shutdown the Sequans cellular modem on a Gpy before going into deep sleep although Toit is still using it?

Currently I can only put the esp32 chip on the Gpy into deep sleep which leaves the modem in some funky state and does not minimize the power consumption. Furthermore, it appears that after deep sleep the Gpy’s behaviour doesn’t seem very stable. Probably due to the state of the modem after deep sleep

When using the onboard Wi-Fi-Chip however deep sleep works as expected and really minimizes power consumption.

kasperl commented 2 years ago

Hi @HoferChristoph. We try to close the modem by asking it to go offline (through the CFUN AT command), but maybe we're missing something. I will take a look next week.

kasperl commented 2 years ago

In most of the other modem drivers, we manually have to power-on and power-off the modems, but we do not do that with the Monarch.

kasperl commented 2 years ago

It is possible to use AT+SQNSSHDN, but I'm not completely sure how to reactivate the modem when waking up.

See https://docs.pycom.io/gitbook/assets/Monarch-LR5110-ATCmdRefMan-rev6_noConfidential.pdf.