feat(rak3401): auto-sleep optional onboard SX1262
Use the existing RAK3401 firmware roles for RAK4631 cores paired with a RAK13302. Probe the optional onboard radio and put it into cold sleep before handing SPI to the primary radio, removing seven duplicate build environments. Preserve BUSY startup readiness, release probe pulls before sleep, and disconnect unused GPIO input buffers during cleanup. Add focused tests for sequencing, missing signatures, timeouts, and failed sleep readback. Validated with four native tests, seven firmware-role builds, and repeater boot checks on RAK4631 + RAK13302. Supply current was not measured.
This commit is contained in:
1 parent
94a4c0b0ed
commit
6dc7f2b047
6 files changed
+184
-164
No files matched your search
@@ -134,128 +134,3 @@ build_src_filter = ${rak3401.build_src_filter}
|
||||
extends = rak3401
|
||||
build_src_filter = ${rak3401.build_src_filter}
|
||||
+<../examples/kiss_modem/>
|
||||
|
||||
; ------------------------- RAK4631 core + RAK13302 -------------------------
|
||||
; Same RF hardware as the RAK3401 1W kit, but the RAK4631 core carries a second,
|
||||
; unused SX1262 that would otherwise idle in standby forever. These envs match
|
||||
; the RAK_3401_* ones and additionally cold-sleep that radio at boot.
|
||||
; Do not flash them to a genuine RAK3401 -- there is no onboard radio to sleep.
|
||||
|
||||
[rak4631_13302]
|
||||
extends = rak3401
|
||||
board = rak4631
|
||||
build_flags = ${rak3401.build_flags}
|
||||
-D RAK4631_ONBOARD_SX1262_SLEEP
|
||||
build_src_filter = ${rak3401.build_src_filter}
|
||||
lib_deps = ${rak3401.lib_deps}
|
||||
|
||||
[env:RAK_4631_13302_repeater]
|
||||
extends = rak4631_13302
|
||||
build_flags =
|
||||
${rak4631_13302.build_flags}
|
||||
-D DISPLAY_CLASS=SSD1306Display
|
||||
-D ADVERT_NAME='"RAK4631 1W Repeater"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
-D ADMIN_PASSWORD='"password"'
|
||||
-D MAX_NEIGHBOURS=50
|
||||
;-D MESH_PACKET_LOGGING=1
|
||||
;-D MESH_DEBUG=1
|
||||
build_src_filter = ${rak4631_13302.build_src_filter}
|
||||
+<helpers/ui/SSD1306Display.cpp>
|
||||
+<../examples/simple_repeater>
|
||||
|
||||
[env:RAK_4631_13302_room_server]
|
||||
extends = rak4631_13302
|
||||
build_flags =
|
||||
${rak4631_13302.build_flags}
|
||||
-D DISPLAY_CLASS=SSD1306Display
|
||||
-D ADVERT_NAME='"Test Room"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
-D ADMIN_PASSWORD='"password"'
|
||||
-D ROOM_PASSWORD='"hello"'
|
||||
;-D MESH_PACKET_LOGGING=1
|
||||
;-D MESH_DEBUG=1
|
||||
build_src_filter = ${rak4631_13302.build_src_filter}
|
||||
+<helpers/ui/SSD1306Display.cpp>
|
||||
+<../examples/simple_room_server>
|
||||
|
||||
[env:RAK_4631_13302_companion_radio_usb]
|
||||
extends = rak4631_13302
|
||||
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
||||
board_upload.maximum_size = 712704
|
||||
build_flags =
|
||||
${rak4631_13302.build_flags}
|
||||
-I examples/companion_radio/ui-new
|
||||
-D PIN_USER_BTN_ANA=31
|
||||
-D DISPLAY_CLASS=SSD1306Display
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D ENABLE_USB_INTERFACE
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
||||
build_src_filter = ${rak4631_13302.build_src_filter}
|
||||
+<../examples/companion_radio/*.cpp>
|
||||
+<../examples/companion_radio/ui-new/*.cpp>
|
||||
lib_deps =
|
||||
${rak4631_13302.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
[env:RAK_4631_13302_companion_radio_ble]
|
||||
extends = rak4631_13302
|
||||
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
||||
board_upload.maximum_size = 712704
|
||||
build_flags =
|
||||
${rak4631_13302.build_flags}
|
||||
-I examples/companion_radio/ui-new
|
||||
-D PIN_USER_BTN_ANA=31
|
||||
-D DISPLAY_CLASS=SSD1306Display
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D BLE_PIN_CODE=123456
|
||||
-D BLE_DEBUG_LOGGING=1
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
;-D MESH_PACKET_LOGGING=1
|
||||
;-D MESH_DEBUG=1
|
||||
build_src_filter = ${rak4631_13302.build_src_filter}
|
||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||
+<../examples/companion_radio/*.cpp>
|
||||
+<../examples/companion_radio/ui-new/*.cpp>
|
||||
lib_deps =
|
||||
${rak4631_13302.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
[env:RAK_4631_13302_terminal_chat]
|
||||
extends = rak4631_13302
|
||||
build_flags =
|
||||
${rak4631_13302.build_flags}
|
||||
-D MAX_CONTACTS=100
|
||||
-D MAX_GROUP_CHANNELS=1
|
||||
;-D MESH_PACKET_LOGGING=1
|
||||
;-D MESH_DEBUG=1
|
||||
build_src_filter = ${rak4631_13302.build_src_filter}
|
||||
+<../examples/simple_secure_chat/main.cpp>
|
||||
lib_deps =
|
||||
${rak4631_13302.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
[env:RAK_4631_13302_sensor]
|
||||
extends = rak4631_13302
|
||||
build_flags =
|
||||
${rak4631_13302.build_flags}
|
||||
-D DISPLAY_CLASS=SSD1306Display
|
||||
-D ADVERT_NAME='"RAK4631 Sensor"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
-D ADMIN_PASSWORD='"password"'
|
||||
;-D MESH_PACKET_LOGGING=1
|
||||
;-D MESH_DEBUG=1
|
||||
build_src_filter = ${rak4631_13302.build_src_filter}
|
||||
+<helpers/ui/SSD1306Display.cpp>
|
||||
+<../examples/simple_sensor>
|
||||
|
||||
[env:RAK_4631_13302_kiss_modem]
|
||||
extends = rak4631_13302
|
||||
build_src_filter = ${rak4631_13302.build_src_filter}
|
||||
+<../examples/kiss_modem/>
|
||||
Reference in new issue
Block a user