Skip to content

Add nrf52 power management for RAK3401#1984

Merged
ripplebiz merged 1 commit intomeshcore-dev:devfrom
samschlegel:samschlegel/rak3401-power-management
Mar 16, 2026
Merged

Add nrf52 power management for RAK3401#1984
ripplebiz merged 1 commit intomeshcore-dev:devfrom
samschlegel:samschlegel/rak3401-power-management

Conversation

@samschlegel
Copy link
Contributor

@samschlegel samschlegel commented Mar 10, 2026

Summary

  • Enable nrf52 power management for RAK3401, ported from the RAK4631 configuration

Test plan

  • Verify boot protection triggers below 3300mV
  • Verify LPCOMP wake from SYSTEMOFF when voltage recovers
  • Verify normal boot path is unaffected above threshold

@samschlegel samschlegel marked this pull request as ready for review March 10, 2026 03:42
@samschlegel
Copy link
Contributor Author

samschlegel commented Mar 10, 2026

Will get a verified commit pushed up shortly

EDIT: Done!

@samschlegel samschlegel force-pushed the samschlegel/rak3401-power-management branch 2 times, most recently from c9c33fb to 5646ae4 Compare March 10, 2026 03:45
@samschlegel samschlegel force-pushed the samschlegel/rak3401-power-management branch from 5646ae4 to bfdbcd8 Compare March 10, 2026 03:49
;-D MESH_DEBUG=1
build_src_filter = ${rak3401.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_sensor> No newline at end of file
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove if desired. I have a pretty minimal VSCode setup and I'm pretty sure this is just the default so maybe work keeping?

}

#ifdef NRF52_POWER_MANAGEMENT
void RAK3401Board::initiateShutdown(uint8_t reason) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to move the block for power_config to be defined before begin and figured it made sense to just move it all

@samschlegel samschlegel changed the base branch from main to dev March 10, 2026 04:39
@ripplebiz ripplebiz merged commit c0d73ec into meshcore-dev:dev Mar 16, 2026
9 checks passed
@linsomniac
Copy link

I gather this fixes the issue where the RAK 3401 goes into deep sleep when the battery voltage drops below 3.3v and then never recovers when the battery comes back up above that? I'm currently following the Austin Mesh guidelines using a USB battery pack that shuts off when it drops below 5v (the Voltaic brand packs), but being able to use a battery pack directly connected to the RAK would be great.

@samschlegel
Copy link
Contributor Author

I gather this fixes the issue where the RAK 3401 goes into deep sleep when the battery voltage drops below 3.3v and then never recovers when the battery comes back up above that? I'm currently following the Austin Mesh guidelines using a USB battery pack that shuts off when it drops below 5v (the Voltaic brand packs), but being able to use a battery pack directly connected to the RAK would be great.

Not sure actually. As I understand it, continuous monitoring hasn't been implemented and what exists right now is an on boot check that sets up a hook for when the battery comes back up that will wake things back up. I'm not sure if that would trigger for the case you're seeing unless the battery is dropping low enough that it reboots. I tested with a power supply and wasn't able to trigger any kind of shutoff until I hit like 2.9v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants