仿真得出:在CAN初始化函数中,hcan==NULL,导致初始化失败 HAL_StatusTypeDef HAL_CAN_Init(CAN_HandleTypeDef *hcan) { uint32_t tickstart;
/* Check CAN handle */ if (hcan == NULL) { return HAL_ERROR; } } 但是在IAP模式下,能初始化成功