-
Notifications
You must be signed in to change notification settings - Fork 964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix uBlox M10 GPS doesn't sleep if device is switched off #4062
Fix uBlox M10 GPS doesn't sleep if device is switched off #4062
Conversation
Jan Veeh seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Sounds good for new boards that will use the M9, M10, or F10. What about designs that don't have a GPS_EN pin? What about designs that use M8 or earlier? |
Fixing that sleep issue without the GPS_EN signal would require some major refactoring of the ublox M10 GPS power management and many changes how GPS position updates are requested by the microcontroller. |
Do you know of any devices that use, or will use the M10? I have several M10s as well as M9/F9/F10s that I use in other contexts. None of the M10s I got off Amazon/AliExpress have the EXTINT pin exposed, so for DIY projects, this change might have issues. |
I don't know any apart from one I developed with a colleague which will soon be added to the device list. |
I have some concerns that other u-blox generations need to be supported in insuring that the GPS is sent into a low power state when the CPU is put in Deep Sleep, but this is a good beginning, there are very few changes to the mainline code, and affect only the M10. More detailed analysis of the low power modes (during Deep Sleep) for other than u-blox products need to be investigated. Approved. |
e677ada
to
d4fb68f
Compare
This PR fixes #4061
The ublox GPS modules power state is controlled by legacy
UBX-RXM-PMREQ
commands. A defined sleep time and/or a wakeup source (in this case UART_RX activity) is defined in the sleep request message (_message_PMREQ_10 in ubx.h). For an unknown reason, the receiver wakes up/stays awake if the meshtastic device is switched off, even if sleep time is set to 0 (wakeup only by external events).To fix this issue, the existing signal
PIN_GPS_EN
is used to control to the EXTINT pin of the receiver. (PIN_GPS_EN pin needs to be defined in the boards variant.h)This requires only the modification of the M10 specific CFG-PM register.
The important modifications are:
Further explanation is commented in the code ubx.h
The normal operation is not influenced by the register change.
All other parameters of CFG-PM were ineffective anyways because the receivers power state was controlled by legacy
UBX-RXM-PMREQ
commands. Further documentation regarding the power modes can be found in the SAM M10Q Integration manualThe configuration stream was generated with the UBlox u-center2 utility