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

Unclear how interrupts work #8

Open
cschleifenbaum opened this issue Jul 28, 2024 · 1 comment
Open

Unclear how interrupts work #8

cschleifenbaum opened this issue Jul 28, 2024 · 1 comment

Comments

@cschleifenbaum
Copy link

cschleifenbaum commented Jul 28, 2024

I'm trying to react on new data via interrupt. For that I enabled gpio::Interrupt::EdgeLow on the GPIO pin. That is even triggered on new data.

If I send a few packets here and there this works like a charm. I clear the interrupt after I read all messages available (read_message until Err(Error::NoMessage)). In the interrupt handler I simply sent the same message but with a different CAN id. But if data come in all the time (I connected it to my car) this works just for the first 5 or 6 messages and then it stops processing. Am I using the wrong approach?

All taht ona Raspberry Pi Pico, btw, in case that makes a difference.

@cschleifenbaum
Copy link
Author

I have the feeling the RX buffer overflow register might bt set. How do I unset it?

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

1 participant