[Bug]: IS_FDCAN_ALL_INSTANCE() checks only CAN1

Open Beginner friendly
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
c
Domain
embedded-iot

Research direction

Find the stm32h5e5 device header that defines IS_FDCAN_ALL_INSTANCE and check how CAN instances are represented there. Update the predicate to accept CAN1, CAN2 and CAN3, including the secure and non-secure instances where defined. Confirm the macro recognizes all three controllers.

Written by the indexing model from the issue text.

Description

bug
Bug Summary

In stm32h5e5, IS_FDCAN_ALL_INSTANCE() checks only CAN1 but this MCU has CAN1, CAN2 and CAN3

Detailed Description

in stm32h5e5 IS_FDCAN_ALL_INSTANCE() checks only CAN1 but this MCU has CAN1, CAN2 and CAN3. Because of this bug, now we can not use HAL library to control CAN2 and CAN3.

/****************************** FDCAN Instances *******************************/
#define IS_FDCAN_ALL_INSTANCE(INSTANCE) (((INSTANCE) == FDCAN1_NS) || ((INSTANCE) == FDCAN1_S))
Expected Behavior

return true on CAN1, CAN2 and CAN3

Actual Behavior

returns true only on CAN1

Environment

CubeIDE e v2.2.0

Severity

Major

Dominant language
C
Stars
12
Forks
11
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.