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

CAN: fix slave CAN start filter bank setup #14612

Merged
merged 1 commit into from
May 11, 2021

Conversation

cindyli-13
Copy link
Contributor

Summary of changes

Fixes a bug for STM devices that make use of dual CAN instances where the slave start filter bank is not set correctly. Previously, filters cannot be set for the slave CAN instance since the slave start filter bank is always set to a higher index than the filter bank to be configured. See #14596 for full description.

Impact of changes

Migration actions required

Documentation

None


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Apr 30, 2021
@ciarmcom ciarmcom requested a review from a team April 30, 2021 22:00
@ciarmcom
Copy link
Member

@cindyli-13, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@mergify mergify bot added needs: CI and removed needs: review labels May 3, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented May 4, 2021

@ARMmbed/team-st-mcd Please review

@0xc0170
Copy link
Contributor

0xc0170 commented May 7, 2021

CI started

@mbed-ci
Copy link

mbed-ci commented May 7, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@jeromecoutant
Copy link
Collaborator

Sorry for long delay...
But your patch is for dual CAN instances ?
We should set SlaveStartFilterBank as well ?
Is patch still compatible with single CAN MCU ?

@jeromecoutant
Copy link
Collaborator

We should set SlaveStartFilterBank as well ?

After more checks, answer is no...
as current ST porting API is not using the ST CAN drivers (STM32Cube_FW/STM32XXxx_HAL_Driver/stm32XXxx_hal_can.c)
but the "legacy" one (STM32Cube_FW/STM32XXxx_HAL_Driver/Legacy/stm32XXxx_hal_can_legacy.c)

@0xc0170
Copy link
Contributor

0xc0170 commented May 10, 2021

@jeromecoutant You can find more information in the referenced CAN PR if that helps

@cindyli-13
Copy link
Contributor Author

@jeromecouant My patch will dedicate filters 0-13 for CAN instance 1 and filters 14-27 for CAN instance 2, so I think for single CAN cases only filters 0-13 can be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants