Skip to content
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

Missing 83.333 kbps -> Updated and tested. #30

Open
BiggRanger opened this issue Jan 1, 2020 · 4 comments
Open

Missing 83.333 kbps -> Updated and tested. #30

BiggRanger opened this issue Jan 1, 2020 · 4 comments

Comments

@BiggRanger
Copy link

The mode for 83.333 kbps is missing. I added the following line for the 16MHz clock:
{ (long)16E6, (long)83E3, { 0x03, 0xfe, 0x87 } },
in MCP2515.cpp

These settings work and were tested in my 2008 Dodge Durango poking around CAN-IHS.

I've ordered a few more modules, one with an 8MHz clock to verify the settings for 83.333 kbps, I should have them sometime in the beginning of January 2020.

@BiggRanger
Copy link
Author

83.333K is tested on modules with 8MHz and 16MHz crystals. Here is the updated code snippet for MCP2515.cpp

On all the 16MHz CNF[3] parameters I knocked the MSB off the value since nothing is using the SOF pin on the MCP2515.


    uint8_t cnf[3];
  } CNF_MAPPER[] = {
    {  (long)8E6, (long)1000E3, { 0x00, 0x80, 0x00 } },
    {  (long)8E6,  (long)500E3, { 0x00, 0x90, 0x02 } },
    {  (long)8E6,  (long)250E3, { 0x00, 0xb1, 0x05 } },
    {  (long)8E6,  (long)200E3, { 0x00, 0xb4, 0x06 } },
    {  (long)8E6,  (long)125E3, { 0x01, 0xb1, 0x05 } },
    {  (long)8E6,  (long)100E3, { 0x01, 0xb4, 0x06 } },
    {  (long)8E6,   (long)83E3, { 0x01, 0xbe, 0x07 } },
    {  (long)8E6,   (long)80E3, { 0x01, 0xbf, 0x07 } },
    {  (long)8E6,   (long)50E3, { 0x03, 0xb4, 0x06 } },
    {  (long)8E6,   (long)40E3, { 0x03, 0xbf, 0x07 } },
    {  (long)8E6,   (long)20E3, { 0x07, 0xbf, 0x07 } },
    {  (long)8E6,   (long)10E3, { 0x0f, 0xbf, 0x07 } },
    {  (long)8E6,    (long)5E3, { 0x1f, 0xbf, 0x07 } },

    { (long)16E6, (long)1000E3, { 0x00, 0xd0, 0x02 } },
    { (long)16E6,  (long)500E3, { 0x00, 0xf0, 0x06 } },
    { (long)16E6,  (long)250E3, { 0x41, 0xf1, 0x05 } },
    { (long)16E6,  (long)200E3, { 0x01, 0xfa, 0x07 } },
    { (long)16E6,  (long)125E3, { 0x03, 0xf0, 0x06 } },
    { (long)16E6,  (long)100E3, { 0x03, 0xfa, 0x07 } },
    { (long)16E6,   (long)83E3, { 0x03, 0xfe, 0x07 } },
    { (long)16E6,   (long)80E3, { 0x03, 0xff, 0x07 } },
    { (long)16E6,   (long)50E3, { 0x07, 0xfa, 0x07 } },
    { (long)16E6,   (long)40E3, { 0x07, 0xff, 0x07 } },
    { (long)16E6,   (long)20E3, { 0x0f, 0xff, 0x07 } },
    { (long)16E6,   (long)10E3, { 0x1f, 0xff, 0x07 } },
    { (long)16E6,    (long)5E3, { 0x3f, 0xff, 0x07 } },
  };

@BiggRanger BiggRanger changed the title Missing 83.333 kbps Missing 83.333 kbps -> Updated and tested. Jan 12, 2020
@commcad
Copy link

commcad commented Feb 17, 2020

Nice one, thanks for posting the solution @BiggRanger

@demigh0d
Copy link

demigh0d commented Mar 9, 2020

Can anyone provide the register settings for ESP32SJA1000.cpp?

Been trying to figure it out myself but have had no luck.

@pamm01
Copy link

pamm01 commented May 6, 2021

Hello, how to add 47.619 kbps ?

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

No branches or pull requests

4 participants