Skip to content

Commit

Permalink
Dshot initial flyable tuning for rddd2
Browse files Browse the repository at this point in the history
Signed-off-by: Peter van der Perk <[email protected]>
  • Loading branch information
PetervdPerk-NXP authored and jgoppert committed Aug 26, 2024
1 parent 5941de6 commit 1a1a8a7
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 32 deletions.
48 changes: 40 additions & 8 deletions app/rdd2/boards/dshot.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,66 @@
aux0 {
input-type = "velocity";
input-index = <0>;
center = <1000>;
scale = <1028>;
center = <200>;
scale = <1500>;
scale-div = <1000>;
};
aux1 {
input-type = "velocity";
input-index = <1>;
center = <1000>;
scale = <1028>;
center = <200>;
scale = <1500>;
scale-div = <1000>;
};
aux2 {
input-type = "velocity";
input-index = <2>;
center = <1000>;
scale = <1028>;
center = <200>;
scale = <1500>;
scale-div = <1000>;
};
aux3 {
input-type = "velocity";
input-index = <3>;
center = <1000>;
scale = <1028>;
center = <200>;
scale = <1500>;
scale-div = <1000>;
};
};
};

&flexpwm1_pwm0 {
status = "disabled";
};

&flexpwm1_pwm1 {
status = "disabled";
};

&flexpwm1_pwm2 {
status = "disabled";
};

&flexpwm2_pwm0 {
status = "disabled";
};

&flexpwm2_pwm1 {
status = "disabled";
};

&flexpwm2_pwm2 {
status = "disabled";
};

&flexpwm2_pwm3 {
status = "disabled";
};

&flexpwm3_pwm0 {
status = "disabled";
};

&dshot {
status = "okay";
};
23 changes: 0 additions & 23 deletions app/rdd2/boards/vmu_rt1170_mimxrt1176_cm7.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -321,43 +321,20 @@ uart1: &lpuart5 {

ch1 {
pin-id = <23>;
bidirectional-dshot;
};

ch2 {
pin-id = <25>;
bidirectional-dshot;
};

ch3 {
pin-id = <27>;
bidirectional-dshot;
};

ch4 {
pin-id = <6>;
bidirectional-dshot;
};

ch5 {
pin-id = <8>;
bidirectional-dshot;
};

ch6 {
pin-id = <10>;
bidirectional-dshot;
};

ch7 {
pin-id = <19>;
bidirectional-dshot;
};

ch8 {
pin-id = <29>;
bidirectional-dshot;
};
};

};
2 changes: 1 addition & 1 deletion drivers/actuate/dshot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static void dshot_update(struct context *ctx)
}
}

nxp_flexio_dshot_data_set(ctx->dev, 0, (uint16_t)throttle, false);
nxp_flexio_dshot_data_set(ctx->dev, i, (uint16_t)throttle, false);

perf_duration_stop(&control_latency);
}
Expand Down

0 comments on commit 1a1a8a7

Please sign in to comment.