Skip to content

Commit

Permalink
Check result when CAN filter is configured
Browse files Browse the repository at this point in the history
  • Loading branch information
gdepuille committed Apr 19, 2024
1 parent 94af67c commit d545fc8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Core/Src/fdcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ void MX_FDCAN1_Init(void)
sFilterConfig.FilterID1 = 1;
sFilterConfig.FilterID2 = 10;

HAL_FDCAN_ConfigFilter(&hfdcan1, &sFilterConfig);
HAL_FDCAN_ConfigGlobalFilter(
&hfdcan1,
FDCAN_REJECT,
FDCAN_REJECT,
FDCAN_REJECT_REMOTE,
FDCAN_REJECT_REMOTE
);
if (HAL_FDCAN_ConfigFilter(&hfdcan1, &sFilterConfig) != HAL_OK) {
Error_Handler();
}
if (HAL_FDCAN_ConfigGlobalFilter(&hfdcan1,
FDCAN_REJECT, FDCAN_REJECT,
FDCAN_REJECT_REMOTE, FDCAN_REJECT_REMOTE) != HAL_OK) {
Error_Handler();
}

/* USER CODE END FDCAN1_Init 2 */

Expand Down

0 comments on commit d545fc8

Please sign in to comment.