-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fixes for GPS support on RAK boards #3051
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
base: dev
Are you sure you want to change the base?
Changes from 10 commits
68d7c17
fe51961
dc669e0
0f69b7a
618fb0c
f161449
44d17f0
02c7fe8
30184c9
aa3269a
adce724
779a25a
2f01336
3ad667e
e3e35e2
c009ee6
45c870c
f717e27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,12 +41,12 @@ extern "C" | |
| /* | ||
| * WisBlock Base GPIO definitions | ||
| */ | ||
| static const uint8_t WB_IO1 = 17; // SLOT_A SLOT_B | ||
| static const uint8_t WB_IO2 = 34; // SLOT_A SLOT_B | ||
| static const uint8_t WB_IO3 = 21; // SLOT_C | ||
| static const uint8_t WB_IO4 = 4; // SLOT_C | ||
| static const uint8_t WB_IO5 = 9; // SLOT_D | ||
| static const uint8_t WB_IO6 = 10; // SLOT_D | ||
| static const uint8_t WB_IO1 = 17; // SLOT_A P.12 / SLOT_B P.10 | ||
| static const uint8_t WB_IO2 = 34; // SLOT_A P.10 / SLOT_B P.12 | ||
| static const uint8_t WB_IO3 = 21; // SLOT_C P.12 | ||
| static const uint8_t WB_IO4 = 4; // SLOT_C P.10 | ||
| static const uint8_t WB_IO5 = 9; // SLOT_D P.12 | ||
| static const uint8_t WB_IO6 = 10; // SLOT_D P.10 | ||
| static const uint8_t WB_SW1 = 33; // IO_SLOT | ||
| static const uint8_t WB_A0 = 5; // IO_SLOT | ||
| static const uint8_t WB_A1 = 31; // IO_SLOT | ||
|
|
@@ -182,7 +182,9 @@ extern "C" | |
| #define EXTERNAL_FLASH_DEVICES IS25LP080D | ||
| #define EXTERNAL_FLASH_USE_QSPI | ||
|
|
||
| #define PIN_GPS_1PPS 17 //GPS PPS pin | ||
| #define PIN_GPS_TX PIN_SERIAL1_RX | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add Like this
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PIN_3V3_EN is currently missing in RAK4631.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah good point! I'll fix it |
||
| #define PIN_GPS_RX PIN_SERIAL1_TX | ||
|
|
||
| #define GPS_BAUD_RATE 9600 | ||
| #define GPS_ADDRESS 0x42 //i2c address for GPS | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for RAK3401 with 1W with required PIN_3V3_EN at start, most of the RAK boards should have PIN_3V3_EN as INPUT to save power.
This is same as start_gps() too.
And we only need to set it HIGH as this is Power switch, not a GPS RESET.
Please change this:
to this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And RAK Ethernet (RAK13800) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea.
However, putting pinMode(PIN_3V3_EN, OUTPUT); in front is better than without it.
We can call it as many times without impact.
If the boards have PIN_3V3_EN as INPUT such as RA4631 and may be other RAK-based boards, digitalWrite(PIN_3V3_EN,HIGH); will not be effective.
We can see in start_gps(), we also call pinMode(PIN_3V3_EN, OUTPUT); before digitalWrite(PIN_3V3_EN,HIGH);
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you link documentation that states that keeping PIN_3V3_EN as INPUT saves power? My understanding is that setting the pin as HIGH shouldn't take power because it's pulled high by default.
re: removing the code to pulse PIN_3V3_EN low for 1s at startup, that code appears to be recommended by RAK so I'm hesitant to remove it. I think it ensures that the GPS is in a consistent state when our code initialises.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RAK boards are no magic, but NRF52 boards. They follow the same rules.
Currently, RAK4631 doesnot have pinMode for 3v3 en.
Assume you can turn off LoRa for RAK3401, try to remove pin Mode OUT for 3v3 en.
Then try to bring up GPS via Uart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least, we have to put pinMode OUT.
RAK4631 does not have it.
You can keep the delay or you can explore what are best values.
RAK is a hardware vendor. Their code is sample and on safest side only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now resolved by setting the pin to write mode in RAK4631Board.cpp.