Skip to content

Commit 579daf1

Browse files
Merge pull request iNavFlight#11129 from functionpointer/nexus_xr_dmar
NEXUSX: USE_DSHOT_DMAR, use TIM2 instead of TIM5
2 parents 94919a6 + 74ea2ed commit 579daf1

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/main/target/NEXUSX/config.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,7 @@
3636
void targetConfiguration(void)
3737
{
3838
pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1;
39+
40+
// default "ESC" pin to be a motor
41+
timerOverridesMutable(timer2id(TIM1))->outputMode = OUTPUT_MODE_MOTORS;
3942
}

src/main/target/NEXUSX/target.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ timerHardware_t timerHardware[] = {
3333

3434
DEF_TIM(TIM1, CH2, PA9, TIM_USE_OUTPUT_AUTO, 0, 0), // labelled "ESC"
3535

36-
DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // labelled "RPM", clashes with UART2 TX
37-
DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 0), // labelled "TLM", clashes with UART2 RX
36+
DEF_TIM(TIM2, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // labelled "RPM", clashes with UART2 TX
37+
DEF_TIM(TIM2, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 0), // labelled "TLM", clashes with UART2 RX
3838

3939
DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // labelled "AUX", clashes with UART1 TX and I2C1 SCL
4040
DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // labelled "SBUS", clashes with UART1 RX and I2C1 SDA

src/main/target/NEXUSX/target.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,5 @@
151151
#define USE_SERIALSHOT
152152
#define USE_ESC_SENSOR
153153
#define USE_SMARTPORT_MASTER // no internal current sensor, enable SMARTPORT_MASTER so external ones can be used
154+
155+
#define USE_DSHOT_DMAR

0 commit comments

Comments
 (0)