Skip to content

2515 reset watchdog #26

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

j4m3s
Copy link
Contributor

@j4m3s j4m3s commented Oct 21, 2020

Have combined two changes here - happy to discuss. Both changes are to the MCP2515 code only.

  • The first aligns the priorities of the MCP2515 threads to match the priorities in the 2517 code and the internal controller code.
  • The second adds a watchdog thread that runs every 2 seconds to check the chip for an error state and reset it if needed. This brings the MCP2515 chip code up to match the 2517 code.

j4m3s added 3 commits October 20, 2020 19:10
Task priorities now match those handling the internal CAN controller and (almost match)
those used for the MCP2517 chip
Operates in a similar way to the one implemented for the 2517 chip; polls every
2 seconds and clears the error and interrupt registers
Done to avoid writing to read-only bits in EFLG... although the chip
may ignore it anyway.
@Modellfan
Copy link

Hi James, is the MCP2515 working for you with this changes? Did you try it with ESP32RET? I spend many hours to fix the 2515 driver and it is working now. (See my push). However I get ESP32RET not working with it.

@j4m3s
Copy link
Contributor Author

j4m3s commented Feb 4, 2023

Hi @Modellfan

I didn't have any issues with MCP2515 code. My PR was mainly behind-the-scenes improvements rather than anything necessary to get it to work. I've had a scan through the changes on your fork; there's quite a lot of whitespace and logging changes, and a few hard-coded values - I can't quite tell what changes you made that were necessary to get it to work for you?

In the end I switched to an MCP2518FD chip (which uses the 2517 code) so haven't been using the MCP2515 code. Maybe something has changed since I last used it successfully...

sorry, to answer your second question, I never tried it with ESP32RET, I used something else for CAN sniffing/ decoding.

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