2023-10-20 08:50 AM
Hi, I'm developing an CAN to USB converter, this converter needs to change the baud rate of the CAN when the user sends an determined message via UART.
The Prescaler, TimeSeg1, TimeSeg2 are all configured correctly for the baud rate I desire, as example:
Values of hcan after sending baud rate change
Solved! Go to Solution.
2023-10-20 08:54 AM
>>Is there something that I'm missing with this routine?
Wouldn't HAL_CAN_Init() be the function to be calling? This would then presumably call HAL_CAN_MspInit(), a routine you supply to configure the clocks, pins, etc.
2023-10-20 08:54 AM
>>Is there something that I'm missing with this routine?
Wouldn't HAL_CAN_Init() be the function to be calling? This would then presumably call HAL_CAN_MspInit(), a routine you supply to configure the clocks, pins, etc.
2023-10-20 01:46 PM
Call HAL_CAN_DeInit first. Change your baud rate. Then call HAL_CAN_Init then HAL_CAN_Start
2023-10-20 06:54 PM
@Karl Yamashita @Tesla DeLorean Thank you so much! I noticed it just a few moments after posting this topic. But anyway, that was exactly the problem. Thank you so muuuuch!!