Repository navigation
stm32/pyb_can: Add support for FD CAN rxcallbacks. - #8206
Closed
JohnieBraaf wants to merge 1 commit into
Closed
JohnieBraaf wants to merge 1 commit into
JohnieBraaf wants to merge 1 commit into
Conversation
JohnieBraaf
marked this pull request as draft
January 24, 2022 16:01
JohnieBraaf
marked this pull request as ready for review
January 24, 2022 16:01
JohnieBraaf
force-pushed
the
fdcan_rxcallback
branch
from
January 24, 2022 16:16
79458a1 to
73679e2
Compare
This commit enables the support for rxcallback on CAN FD interfaces. For FD CAN it is necessary to call HAL_FDCAN_ActivateNotification. This sets the ILS and ILE bits to enable the interrupt lines. For FD CAN, we clear the RX pending en RX overflow flags explicitly. Signed-off-by: Jan Staal <[email protected]>
Contributor
Author
|
This PR appears to be a dupplicate of work done here #8057 The same runaway interrupt behaviour was encountered there and resovled by clearing of the interrupt flags. I'm proposing to close this PR in favor of #8057 |
tannewt
added a commit
to tannewt/circuitpython
that referenced
this pull request
Aug 24, 2023
…-getenv-notimplemented 8.2.x backport: throw an exception if os.getenv is used on a board without settings.t…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The rxcallback functionality was not yet working for FD CAN interfaces.
This commit enables the support for rxcallback on CAN FD interfaces.
For FD CAN it is necessary to call HAL_FDCAN_ActivateNotification.
This sets the ILS and ILE bits to enable the interrupt lines.
For FD CAN, we clear the RX pending en RX overflow flags explicitly.
At the core of this fix is calling the HAL_FDCAN_ActivateNotification method.
This in turn configures the ILS and ILE registers, see below.
__IO uint32_t ILS; /*!< FDCAN Interrupt Line Select register, Address offset: 0x058 */__IO uint32_t ILE; /*!< FDCAN Interrupt Line Enable register, Address offset: 0x05C */For the pending and overflow interrups it is needed to clear the flags explicitly.
This was not needed for the buffer full interrupt. I could not figure out why that is.
Code reviews are welcome, I have tested this code on H7 (FD CAN) and F4 (CAN) mcu's.