2019-07-24 06:41 AM
I'm using
STM32Cube FW_F7 V1.15.0
There is a bug in stm32f7xx_hal_msp.c which prevents reinitialization of CAN1
void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan) {
....
HAL_RCC_CAN1_CLK_ENABLED++;
if(HAL_RCC_CAN1_CLK_ENABLED==1){
__HAL_RCC_CAN1_CLK_ENABLE();
}
....
}
and then there is no decrement of HAL_RCC_CAN1_CLK_ENABLED in
void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan)
{
/* Peripheral clock disable */
__HAL_RCC_CAN1_CLK_DISABLE();
}
If you try to init Can1, then deinit It and then it won't init again
2019-07-24 06:51 AM
When you disable CAN1, the clock is disabled and never enabled again