Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions variants/rak4631/RAK4631Board.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
#include <helpers/NRF52Board.h>

// built-ins
#define PIN_VBAT_READ 5
#define ADC_MULTIPLIER (3 * 1.73 * 1.187 * 1000)
#ifndef PIN_VBAT_READ
#define PIN_VBAT_READ 5
#endif
#ifndef ADC_MULTIPLIER
#define ADC_MULTIPLIER (3 * 1.73 * 1.187 * 1000)
#endif

class RAK4631Board : public NRF52BoardDCDC {
protected:
Expand Down
12 changes: 9 additions & 3 deletions variants/rak4631/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,15 @@ extern "C"
// Set to 0 to disable boot protection
#define PWRMGT_VOLTAGE_BOOTLOCK 3300 // Won't boot below this voltage (mV)
// LPCOMP wake configuration (voltage recovery from SYSTEMOFF)
// AIN3 = P0.05 = PIN_A0 / PIN_VBAT_READ
#define PWRMGT_LPCOMP_AIN 3
#define PWRMGT_LPCOMP_REFSEL 4 // 5/8 VDD (~3.13-3.44V)
// Defaults to AIN3 = P0.05 = PIN_A0 = the default PIN_VBAT_READ. Boards that
// sense VBAT elsewhere (e.g. a RAK19007 fed from J11 AIN1 = P0.03) can override
// this; keep it on the same pin as PIN_VBAT_READ.
#ifndef PWRMGT_LPCOMP_AIN
#define PWRMGT_LPCOMP_AIN 3
#endif
#ifndef PWRMGT_LPCOMP_REFSEL
#define PWRMGT_LPCOMP_REFSEL 4 // 5/8 VDD (~3.13-3.44V)
#endif

// Other pins
#define PIN_AREF (2)
Expand Down