tonton81 / FlexCAN_T4

FlexCAN (CAN 2.0 / CANFD) Library for Teensy 3.x and 4.0
https://forum.pjrc.com/threads/56035-FlexCAN_T4-FlexCAN-for-Teensy-4
MIT License
196 stars 66 forks source link

Trying to understand how the bit timing config works #66

Open danielfu11 opened 1 year ago

danielfu11 commented 1 year ago

Hello @tonton81 ,

I would love to learn how you came up with the bit timing code in FlexCAN_T4FDTimings.tpp, as well as what users of this library are supposed to input for the propdelay and bus_length parameters for their application. Could you advise on this please and/or point me to docs that you referenced to come up with the bit timing code?

Thanks in advance!

tonton81 commented 1 year ago

its been a few years but its based off their excel sheet https://www.google.com/url?sa=t&source=web&rct=j&url=https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/mpc5xxx%2540tkb/248/1/CAN%2520Bit%2520Timing%2520calculation%2520v1.0.xlsm&ved=2ahUKEwje2Oryya__AhWNElkFHVqBDokQFnoECBEQAQ&usg=AOvVaw2kbnCJcR9IvKyOzb-5PZ4i

danielfu11 commented 1 year ago

Ah gotcha, didn't know NXP provided an excel sheet. I will give that a read, thanks!