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

force FIFO IRQ for FDCan RX on H7 #15398

Merged
merged 1 commit into from
Apr 6, 2023
Merged

Conversation

jtmyz9
Copy link

@jtmyz9 jtmyz9 commented Apr 5, 2023

Summary of changes

Fixing mapping of FDCan RX IRQ for H7 chips
Resolves #15144

Impact of changes

Minor change to precompiler statements in can_api.c in Targets/TARGET_STM folder

Migration actions required

Documentation

Change precompiler statements such that H7 family uses FDCAN_IT_RX_FIFO0_NEW_MESSAGE for triggering CAN::RxIRQ

- #if (defined FDCAN_IT_RX_BUFFER_NEW_MESSAGE)
+ #if (defined FDCAN_IT_RX_BUFFER_NEW_MESSAGE) && !defined(TARGET_STM32H7)
    if (__HAL_FDCAN_GET_IT_SOURCE(&CanHandle, FDCAN_IT_RX_BUFFER_NEW_MESSAGE)) {
        if (__HAL_FDCAN_GET_FLAG(&CanHandle, FDCAN_IT_RX_BUFFER_NEW_MESSAGE)) {
            __HAL_FDCAN_CLEAR_FLAG(&CanHandle, FDCAN_IT_RX_BUFFER_NEW_MESSAGE);
@@ -628,7 +628,7 @@ void can_irq_set(can_t *obj, CanIrqType type, uint32_t enable)
            interrupts = FDCAN_IT_TX_COMPLETE;
            break;
        case IRQ_RX:
- #if (defined FDCAN_IT_RX_BUFFER_NEW_MESSAGE)
+ #if (defined FDCAN_IT_RX_BUFFER_NEW_MESSAGE) && !defined(TARGET_STM32H7)
            interrupts = FDCAN_IT_RX_BUFFER_NEW_MESSAGE;
#else
            interrupts = FDCAN_IT_RX_FIFO0_NEW_MESSAGE;

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


@jeromecoutant
Copy link
Collaborator

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 6, 2023

CI started

@0xc0170 0xc0170 added needs: CI release-type: patch Indentifies a PR as containing just a patch labels Apr 6, 2023
@mbed-ci
Copy link

mbed-ci commented Apr 6, 2023

Jenkins CI Test : ✔️ SUCCESS

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

CLICK for Detailed Summary

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-type: patch Indentifies a PR as containing just a patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NUCLEO_H743ZI2 CAN-FD Rx Interrupt not triggering but polling via thread works
5 participants