Skip to content

Commit

Permalink
Merge pull request #3880 from adustm/fix_can2_only
Browse files Browse the repository at this point in the history
DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated
  • Loading branch information
0xc0170 authored Mar 6, 2017
2 parents bc8e2ec + 18c1618 commit b272647
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions targets/TARGET_STM/can_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void can_init(can_t *obj, PinName rd, PinName td)
}
#if defined(CAN2_BASE) && (CAN_NUM == 2)
else if (obj->can == CAN_2) {
__HAL_RCC_CAN1_CLK_ENABLE(); // needed to set filters
__HAL_RCC_CAN2_CLK_ENABLE();
obj->index = 1;
}
Expand Down

0 comments on commit b272647

Please sign in to comment.