I am a little surprised that no one ran into it, so the following may be absolute nonsense.
I have tried both the example of the stm32f7xx-hal (STM32F767 example adapted to bxcan v0.6) and the stm32f4xx-hal (STM32F407). With both the bxcan::CanBuilder::set_bit_timing function and probably also the other implemented functions, which access the CAN_BTR register, has no functionality. This is caused by the fact that the CAN is not in initialization mode.
Page 1561 RM0410 Rev 4:
This register can only be accessed by the software when the CAN hardware is in
initialization mode.
With the function can.modify_config().set_bit_timing(0x001c_0018).enable(); it works, but this sets the initialization mode before.
My customization also does this in the bxcan::Can::builder function, after the customization, it works as I would expect it to.
Good day,
I am a little surprised that no one ran into it, so the following may be absolute nonsense.
I have tried both the example of the stm32f7xx-hal (STM32F767 example adapted to bxcan v0.6) and the stm32f4xx-hal (STM32F407). With both the
bxcan::CanBuilder::set_bit_timing
function and probably also the other implemented functions, which access theCAN_BTR
register, has no functionality. This is caused by the fact that the CAN is not in initialization mode.Page 1561 RM0410 Rev 4:
With the function
can.modify_config().set_bit_timing(0x001c_0018).enable();
it works, but this sets the initialization mode before.My customization also does this in the
bxcan::Can::builder
function, after the customization, it works as I would expect it to.