[BUG] FLEXCAN driver uses wrong base address argument in FLEXCAN2 IRQ Handler
Closed this issue · 0 comments
weinshec commented
Describe the bug
When handling FLEXCAN2 related interrupts in void CAN_FD2_DriverIRQHandler(void)
defined in drivers/flexcan/fsl_flexcan.c
the FLEXCAN_TransferHandleIRQ
handler is called with the wrong base address pointer. This breaks interrupt handling for FLEXCAN2 and makes the "transactional API" useless.
To Reproduce
- Environment (please complete the following information):
- Tag/Commit hash: any since MCUX_2.10.0
- Toolchain: arm-none-eabi-gcc 12.2.0
- Board/SoC: MIMX8ML8
- IRQ/ISR: CAN_FD2_IRQn/CAN_FD2_DriverIRQHandler
- Steps to reproduce the behavior:
- Initialize a FLEXCAN transactional handle using
FLEXCAN_TransferCreateHandle
for FLEXCAN2 - Wait for and interrupt to occur for FLEXCAN2
- check the
base
argument to the callback function registered withFLEXCAN_TransferCreateHandle
- Initialize a FLEXCAN transactional handle using
Expected behavior
The registered callback function is called with the correct base address for FLEXCAN2, but in fact it is called with the base address for FLEXCAN1
Screenshots and console output
Additional context
none