-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added 33333 bps #14
base: master
Are you sure you want to change the base?
Added 33333 bps #14
Conversation
Added the General Motors SWCAN (Single Wire CAN) bus speed.
Closed issue #10 prematurely accidentally but will leave as is for now. |
Added some info on this to the Teensy and Chevy SparkEV forums. |
Hello Mike, how did you calculate the values for 33333 bps? Thanks.. |
Sorry, back when I was working this I could have told you in painstaking detail but apparently did not properly document my procedure. (My early alzheimer's doesn't help) I started with fnOptimalCAN_clock() which gave me bad results: I had previously been successful with an ArduinoDue using Collin Kidders DueCan library. It's a different chip with different registers and operation but the timing details should work out the same. So I iterated around somehow with part of fnOptimalCAN_clock() with the speeds that worked vs DueCan speeds to figure out a way that would solve for the difference and then for the 33333. Kind of a four equations four unknows where some of the unknowns were easily guessed from spec documents. |
Sorry didn't want to close (again) |
Thanks for the reply, teachop calculate with Number of Time Quanta per Bit-time ->16. clockspeed/(baud*Time Quanta per Bit-time) - FLEXCAN_CTRL_RJW = FLEXCAN_CTRL_PRESDIV 16Mhz / (250k*16) -1 = 3 I found an excel file on this page ... Maybe anyone have an excel file to calculate the values for the MK20DX256 Flexcan. Thanks .... |
Added the General Motors SWCAN (Single Wire CAN) bus speed.
Added the part used to test on a Chevy SparkEV