Skip to content

Commit 91dcbf9

Browse files
committed
Drive CTX low first
1 parent 9965afd commit 91dcbf9

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

variants/rak3401/RAK3401Board.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,18 @@ void RAK3401Board::begin() {
2828
// CTX (P0.31) selects TX(HIGH) vs RX(LOW) and also enables the 5V boost
2929
// converter that powers the PA section (VCC1/VCC2).
3030
// The LNA section (VSUP1/VCC0) runs on 3.3V and works with boost off.
31+
//
32+
// Drive CTX LOW first to prevent transient TX mode (Mode 2) while CSD/CPS
33+
// are being enabled — the RAK13302 has no pull-downs on these pins.
34+
pinMode(P_LORA_PA_EN, OUTPUT);
35+
digitalWrite(P_LORA_PA_EN, LOW); // CTX=0: RX mode, boost off
36+
3137
pinMode(P_LORA_PA_CSD, OUTPUT);
3238
digitalWrite(P_LORA_PA_CSD, HIGH); // CSD=1: enable FEM
3339

3440
pinMode(SX126X_POWER_EN, OUTPUT);
3541
digitalWrite(SX126X_POWER_EN, HIGH); // CPS=1: enable TX/RX paths
3642

37-
pinMode(P_LORA_PA_EN, OUTPUT);
38-
digitalWrite(P_LORA_PA_EN, LOW); // CTX=0: RX mode, boost off
39-
4043
delay(1); // SKY66122 turn-on settling time
4144
}
4245

0 commit comments

Comments
 (0)