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

Fix bugs on can driver #95

Merged
merged 4 commits into from
Nov 17, 2024
Merged

Conversation

sasataku
Copy link
Member

This PR fixes the some bugs on CAN driver.

This commit is reformatting using Zephyr's `.clang-format`.

Signed-off-by: Takuya Sasaki <takuya.sasaki@spacecubics.com>
This commit fixes the missing initialization of TX and RX mutexes.

Signed-off-by: Takuya Sasaki <takuya.sasaki@spacecubics.com>
Currently, when the CAN IP core detects an arbitration lost while
transmitting data, it calls the tx done callback. However, since the
CAN IP core automatically retransmits upon detecting arbitration
lost, a TX_DONE interrupt is also triggered, resulting in the tx_done
callback being called twice for a single transmission frame. This
commit removes the tx_done callback handling in case of arbitration
lost.

Signed-off-by: Takuya Sasaki <takuya.sasaki@spacecubics.com>
When a TX error interrupt occurs from the FPGA IP core, the status
value returned to the upper layer is currently positive. This commit
fixes it to a negative value.

Signed-off-by: Takuya Sasaki <takuya.sasaki@spacecubics.com>
@sasataku sasataku requested a review from yashi as a code owner November 17, 2024 08:55
@sasataku sasataku merged commit 29376d5 into spacecubics:main Nov 17, 2024
42 checks passed
@sasataku sasataku deleted the fix-bugs-on-can-driver branch November 17, 2024 09:14
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.

1 participant