Bug report: STM32F4 Cube 1.18.0 HAL CAN driver generates incorrect code.
Cube 1.18.0 appears to generate HAL CAN code in can.c and can.h which is aimed at the 1.21.0 redisigned CAN driver.
The code refers to member variables which do not exist in the 1.18.0 register structures, for example:
hcan1.Init.SyncJumpWidth = CAN_SJW_1TQ;
hcan1.Init.TimeSeg1 = CAN_BS1_7TQ;
hcan1.Init.TimeSeg2 = CAN_BS2_8TQ;
Significantly, the new CAN driver (redesigned in version 1.19.0) appears to have no documentation, so cannot easily be used.
The old code is rendered unusable by the above bug, so neither version can be used.
In trying to find a solution to this problem I reinstalled CubeMX from scratch, removing all downloaded driver installations, and only installed the F4 version 1.18.0.
