feat(station-g3): add second RF slot (r2) build targets - #50
Merged
Conversation
The motherboard has two RF daughterboard slots on separate GPIOs, mirrored by its "LNA P" / "LNA S" jumpers, but the variant only ever pinned slot 1. The shared configuration moves into [Station_G3_ESP32_common], with the SPI and LNA lines split into per-slot sections. [Station_G3_ESP32] (slot 1) and [Station_G3_ESP32_r2] (slot 2) each compose common + their own pins, so neither set of -D flags has to shadow the other on the compile line - appending an override would work only by last-wins, and esp32_base's -w hides the resulting redefinition warning. Every pre-existing env keeps its name and resolves to byte-identical options; verified by diffing pio project config --json-output. PA PL1 is one board-level jumper shared by both slots, so P_PA1_EN stays in the common section along with the TX power calibration. Adds r2 twins of the repeater, room server and both observer envs, each an exact mirror of its slot-1 sibling apart from the base it extends. Slot 2 pins come from on-hardware testing in #49 and are not documented publicly; the vendor wiki serves no content to fetchers and Meshtastic implements slot 1 only. Known limitation, unchanged from that PR: GPIO 42 and 43 fall outside the ESP32-S3 RTC GPIO range (0-21), so the rtc_gpio_hold_en() calls in ESP32Board::enterDeepSleep() and StationG3Board::powerOff() return ESP_ERR_INVALID_ARG on slot 2 and the NSS and LNA pins are not latched through deep sleep. Fixing it means gpio_hold_en() plus gpio_deep_sleep_hold_en() in shared code.
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.
The motherboard has two RF daughterboard slots on separate GPIOs, mirrored by its "LNA P" / "LNA S" jumpers, but the variant only ever pinned slot 1.
The shared configuration moves into [Station_G3_ESP32_common], with the SPI and LNA lines split into per-slot sections. [Station_G3_ESP32] (slot 1) and [Station_G3_ESP32_r2] (slot 2) each compose common + their own pins, so neither set of -D flags has to shadow the other on the compile line - appending an override would work only by last-wins, and esp32_base's -w hides the resulting redefinition warning. Every pre-existing env keeps its name and resolves to byte-identical options; verified by diffing pio project config --json-output.
PA PL1 is one board-level jumper shared by both slots, so P_PA1_EN stays in the common section along with the TX power calibration.
Adds r2 twins of the repeater, room server and both observer envs, each an exact mirror of its slot-1 sibling apart from the base it extends.
Slot 2 pins come from on-hardware testing in #49.
Known limitation, unchanged from that PR: GPIO 42 and 43 fall outside the ESP32-S3 RTC GPIO range (0-21), so the rtc_gpio_hold_en() calls in ESP32Board::enterDeepSleep() and StationG3Board::powerOff() return ESP_ERR_INVALID_ARG on slot 2 and the NSS and LNA pins are not latched through deep sleep. Fixing it means gpio_hold_en() plus gpio_deep_sleep_hold_en() in shared code.