Skip to content

Commit dcda345

Browse files
thenguyenyfKhiemNguyenT
authored andcommitted
drivers: can: add bug fix for r_canfd
add bug fix for wrong configuration for number of acceptance filter rules for r_canfd channel 1 Signed-off-by: The Nguyen <[email protected]>
1 parent 2bdbbd8 commit dcda345

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/ra/fsp/src/r_canfd/r_canfd.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@ fsp_err_t R_CANFD_Open (can_ctrl_t * const p_api_ctrl, can_cfg_t const * const p
317317
/* Configure rule count for both channels */
318318
#if BSP_FEATURE_CANFD_NUM_INSTANCES > 1
319319
p_reg->CFDGAFLCFG0 = (CANFD_CFG_AFL_CH0_RULE_NUM << R_CANFD_CFDGAFLCFG0_RNC0_Pos);
320+
if (channel == 1)
321+
{
322+
p_reg->CFDGAFLCFG0 = (CANFD_CFG_AFL_CH1_RULE_NUM << R_CANFD_CFDGAFLCFG0_RNC0_Pos);
323+
}
320324
#else
321325
p_reg->CFDGAFLCFG0 = (CANFD_CFG_AFL_CH0_RULE_NUM << R_CANFD_CFDGAFLCFG0_RNC0_Pos) |
322326
CANFD_CFG_AFL_CH1_RULE_NUM;

0 commit comments

Comments
 (0)