HAL_ChibiOS: disable CANFD bits if CANFD not enabled

cannot support CANFD receive on G4
This commit is contained in:
Andrew Tridgell 2023-07-10 19:56:53 +10:00 committed by Peter Barker
parent deab955a0f
commit aa0b119806

View File

@ -721,7 +721,9 @@ bool CANIface::init(const uint32_t bitrate, const uint32_t fdbitrate, const Oper
#endif
can_->ILE = 0x3;
#if HAL_CANFD_SUPPORTED
can_->CCCR |= FDCAN_CCCR_FDOE | FDCAN_CCCR_BRSE; // enable sending CAN FD frames, and Bitrate switching
#endif
// If mode is Filtered then we finish the initialisation in configureFilter method
// otherwise we finish here