-
Notifications
You must be signed in to change notification settings - Fork 130
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
STM32 FDCAN: Get all messages from FIFO in RX ISR #1017
Conversation
ser-plu
commented
May 9, 2023
- In cases, when a new message comes during RX ISR execution, it would not be processed until a next message arrives. Critical for request-response protocols.
- The header file missed a dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this up!
I had noticed this code might be buggy when I wrote the SAM MCAN driver (based on this driver), but then forgot about it.
66ef90e
to
e7021c9
Compare
Nice idea. I will add this tomorrow, as I have already left my workplace.
|
I implemented @chris-durand|s idea and also added a commit that fixes the fdcan unit test (see #1013). |
... but not with the modification (7bede35) that actually triggers our corner case:
WTF? |
I changed the code to use ILE register and adjusted the IRQ disable logic. |
@rleh The modified
|
I fixed the CAN tests as well |
da5ebc5
to
d98598c
Compare
@salkinium What's wrong with the CI now? Click to view log
|
Wow, impressive. Maybe the NSA guy assigned to us got annoyed by all the dots, who knows… Multiprocessing in Python is just utterly broken. It's an underlying issue of fork() vs. globals initialization, that cannot really be fixed. You can replace it with Threadpool + subprocess.run, which effectively does the same, but with a controlled entry point back into the script and thus properly initialized globals. |
860b50f
to
a6e4125
Compare
Running the hardware unit test still fails. I'm currently investigating the issue. |
a6e4125
to
32e3dee
Compare
I have found some issues with the TX handling. |
eea2857
to
1d36b44
Compare
(There's still a race-condition in the docs generator deduplication code, I'll look at it on Sunday) |
Ok, I've fixed the docs generator, the PR now needs to be rebased and squashed. |
63712e7
to
9d33843
Compare