Fixes for GPS support on RAK boards - #3051
Open
YoshiWalsh wants to merge 7 commits into
Open
Conversation
This was only configured for a single Sensor Slot anyway
These boards support the RAK12500 and RAK12501 GPS modules.
This board is a RAK4631 derivative (even sharing the same bootloader) and so supports the same features
This seems to have just been a typo. Fixing this allows RAK12500 to work in serial mode, and RAK12501 to work at all. (Both tested on RAK3401)
The previous code only worked by accident. 1. Regardless of which slot the GPS module was present in, it would always be detected as Slot A 2. Slot A reset pin (WB_IO2) overlaps with PIN_3V3_EN. 3. Per u-blox ZOE-M8Q documentation: "In reset state, the SiP consumes a significant amount of current. It is therefore recommended to use RESET_N only as a reset signal and not as an enable/disable." So using reset PIN to control GPS status is not desirable anyway. This commit replaces the faulty reset pin detection and control logic by instead just controlling the 3V3 bus. Note: 3V3 control is disabled on the RAK3401 as this board is most commonly used in the "1W LoRa Booster Kit", and turning 3V3 off would also disable 5V power supply to the SKY66122 PA. Changes tested with RAK3401 with a RAK12500 in both Slot A and Slot C, as well as a RAK12501 in Slot A.
Contributor
|
RAK12501 (L76K) works RAK4631 on MeshCore 1.16. |
Contributor
|
You may want to rebase to dev instead. Have you tested the combination of RAK4631/RAK3401 and RAK12500/RAK12501? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables GPS support on RAK4631 and RAK3401 boards. It also provides support for RAK12501, which was previously unsupported.
Behind the scenes, it fixes some additional logic errors and slightly improves code cleanliness.
Code changes
Details on faulty reset pin logic
The previous code only worked by accident.
So using reset PIN to control GPS status is not desirable anyway.
Due to the way these logic errors interacted, the RAK12500 sensor was actually able to work correctly in Slot A and Slot C, but for the wrong reasons.
This PR explicitly just controls the 3V3 bus, which was what the previous code was doing by accident.
Note: 3V3 control is disabled on the RAK3401 as this board is most commonly used in the "1W LoRa Booster Kit", and turning 3V3 off would also disable 5V power supply to the SKY66122 PA.
Changes tested with RAK3401 with a RAK12500 in both Slot A and Slot C, as well as a RAK12501 in Slot A. (RAK12501 should work in Slot D too, I just haven't tested it)