Skip to content

Commit

Permalink
vmurt7: enable qdec and change prescaler for rohm esc
Browse files Browse the repository at this point in the history
Don't print gnss timeout

Signed-off-by: Peter van der Perk <[email protected]>
  • Loading branch information
PetervdPerk-NXP committed Jul 21, 2023
1 parent b216760 commit 3246a3b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
42 changes: 37 additions & 5 deletions app/mrbuggy3/boards/mimxrt1170_fmurt7.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
pwms = <&flexpwm1_pwm0 0 PWM_HZ(50) PWM_POLARITY_NORMAL>;
};
aux1: aux1 {
pwms = <&flexpwm1_pwm1 0 PWM_HZ(50) PWM_POLARITY_NORMAL>;
pwms = <&flexpwm1_pwm1 0 PWM_HZ(18000) PWM_POLARITY_NORMAL>;
};
aux2: aux2 {
pwms = <&flexpwm1_pwm2 0 PWM_HZ(50) PWM_POLARITY_NORMAL>;
pwms = <&flexpwm1_pwm2 0 PWM_HZ(18000) PWM_POLARITY_NORMAL>;
};
aux3: aux3 {
pwms = <&flexpwm2_pwm0 0 PWM_HZ(50) PWM_POLARITY_NORMAL>;
Expand All @@ -39,7 +39,7 @@
can0 = &flexcan1;
can1 = &flexcan2;
can2 = &flexcan3;
telem1 = &lpuart4;
telem1 = &lpuart8; /* Use telem2 as telem1 */
};
};

Expand All @@ -48,11 +48,11 @@
};

&flexpwm1_pwm1 {
nxp,prescaler = <64>;
nxp,prescaler = <32>;
};

&flexpwm1_pwm2 {
nxp,prescaler = <64>;
nxp,prescaler = <32>;
};

&flexpwm2_pwm0 {
Expand Down Expand Up @@ -121,3 +121,35 @@ uart1: &lpuart5 {
status = "okay";
current-speed = <38400>;
};

/* QDEC conflicts with the CTS/RTS from LPUART4/TELEM1 */
lpuart4: &lpuart4 {
status = "disabled";
};

&pinctrl {

pinmux_qdec1: pinmux_qdec1 {
group0 {
pinmux = <&iomuxc_gpio_disp_b1_07_xbar1_xbar_in33>,
<&iomuxc_gpio_disp_b1_05_xbar1_xbar_in31>;
drive-strength = "normal";
slew-rate = "slow";
};
};
};

&qdec1 {
status = "okay";
pinctrl-0 = <&pinmux_qdec1>;
pinctrl-names = "default";
counts-per-revolution = <600>;
filter-count = <0>;
xbar = < &xbar1 >;
};

&xbar1 {
status = "okay";
xbar-maps = < (33|0x100) (109|0x100) >, /* kXBARA1_InputIomuxXbarIn33 <-> kXBARA1_OutputDec1Phasea */
< (31|0x100) (108|0x100) >; /* kXBARA1_InputIomuxXbarIn31 <-> kXBARA1_OutputDec1Phaseb */
};
2 changes: 1 addition & 1 deletion drivers/sense/ubx_gnss/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void publish_gnss_data_zbus(uDeviceHandle_t devHandle,
zbus_chan_pub(&chan_out_nav_sat_fix, &nav_sat_fix, K_NO_WAIT);
printf("lat %f long %f\n", nav_sat_fix.latitude, nav_sat_fix.longitude);
} else if (errorCode == U_ERROR_COMMON_TIMEOUT) {
LOG_ERR("Tiemout error");
//LOG_ERR("Tiemout error");
} else {
LOG_ERR("GNSS error %i", errorCode);
running = false;
Expand Down

0 comments on commit 3246a3b

Please sign in to comment.