Skip to content

Conversation

@yorickdewid
Copy link
Contributor

Provide the most common bit timings as baud rate

Bit timing parameters are consistent amongst the STM32 family if bus clock is set to 32 Mhz. Predefined constants will allow for much easier configuration for baud rates thus better interoperability between different CAN devices. These parameters will center the sample point around 87.5 %, which is the default for various high-level protocols such as CANopen.

@yorickdewid
Copy link
Contributor Author

If we're considering this PR then something needs to happen to the peripheral clock. It either needs to be fixed at 32 Mhz or the prescaler must be recalculated

@richardeoin
Copy link
Member

There's a crate that tries to calculate these timings, but I'm not sure how easy it is to use. Semi-standardizing a 32MHz peripheral clock for examples would also be a reasonable solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants