Skip to content

Commit c802a13

Browse files
projectgusdpgeorge
authored andcommitted
stm32: Fix printing value of pyb.CAN auto_restart on FDCAN hardware.
The DAR register field is for auto-retransmit, FDCAN doesn't support automatic restart to clear Bus Off. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
1 parent 6cac2d2 commit c802a13

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ports/stm32/pyb_can.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static void pyb_can_print(const mp_print_t *print, mp_obj_t self_in, mp_print_ki
140140
self->can_id,
141141
mode,
142142
#if MICROPY_HW_ENABLE_FDCAN
143-
(self->can.Instance->CCCR & FDCAN_CCCR_DAR) ? MP_QSTR_True : MP_QSTR_False
143+
MP_QSTR_False // auto_restart not supported on FDCAN hardware
144144
#else
145145
(self->can.Instance->MCR & CAN_MCR_ABOM) ? MP_QSTR_True : MP_QSTR_False
146146
#endif

0 commit comments

Comments
 (0)