Skip to content

{bp-19721} arch/arm: Fix FlexCAN config initializers clobbering rx_pin instead of enable_high - #19828

Merged
xiaoxiang781216 merged 3 commits into
apache:releases/13.0from
jerpelea:bp-19721
Aug 13, 2026
Merged

{bp-19721} arch/arm: Fix FlexCAN config initializers clobbering rx_pin instead of enable_high#19828
xiaoxiang781216 merged 3 commits into
apache:releases/13.0from
jerpelea:bp-19721

Conversation

@jerpelea

Copy link
Copy Markdown
Contributor

Summary

The FlexCAN per-controller config initializers in three ARM drivers contain a
copy-paste defect: inside the CAN2 (and, on S32K3XX, CAN3) blocks a second
.rx_pin designator appears where .enable_high was intended. C designated
initializers let a later designator for the same member silently override an
earlier one, so .rx_pin = PIN_CANx_RX is discarded and .enable_high is
never assigned at all, falling back to 0 from static zero-initialization.

Impact

RELEASE

Testing

CI

The `rx_pin` configuration when `CONFIG_S32K1XX_FLEXCAN2` is defined is
overwritten if `PIN_CAN2_ENABLE` is defined, breaking the flexcan config
for S32K1 MCU. Additionally, the `.enable_high` configuration points to
a non-defined constant/macro (looks like a legacy from the first driver
definition). Based on regularly maintained drivers (such as s32k3), this
was changed to `CAN2_ENABLE_OUT`

Signed-off-by: Javier Alonso <javieralonso@geotab.com>
The `rx_pin` configuration when `CONFIG_KINETIS_FLEXCAN2` is defined is
overwritten if `PIN_CAN2_ENABLE` is defined, breaking the flexcan config
for Kinetis MCU. Additionally, the `.enable_high` configuration points to
a non-defined constant/macro (looks like a legacy from the first driver
definition). Based on regularly maintained drivers (such as s32k3), this
was changed to `CAN2_ENABLE_OUT`

Signed-off-by: Javier Alonso <javieralonso@geotab.com>
The `rx_pin` configuration when `CONFIG_S32K3XX_FLEXCAN2` is defined is
overwritten if `PIN_CAN2_ENABLE` is defined, breaking the flexcan config
for S32K3 MCU.

Signed-off-by: Javier Alonso <javieralonso@geotab.com>
@github-actions github-actions Bot added Arch: arm Issues related to ARM (32-bit) architecture Size: S The size of the change in this PR is small labels Aug 13, 2026
@jerpelea

Copy link
Copy Markdown
Contributor Author

do not restart Ci until #19814 is merged

@xiaoxiang781216
xiaoxiang781216 merged commit 4497bb8 into apache:releases/13.0 Aug 13, 2026
7 of 13 checks passed
@jerpelea
jerpelea deleted the bp-19721 branch August 13, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm Issues related to ARM (32-bit) architecture Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants