From fb6d6d381c28a5aa90a8f1f1ee22ef9179077dbb Mon Sep 17 00:00:00 2001 From: Sergey1560 <53866542+Sergey1560@users.noreply.github.com> Date: Thu, 27 Jan 2022 02:06:55 +0300 Subject: stm32: Add remap CAN to PD0/PD1 for stm32f103 (#5173) Signed-off-by: Sergey Terentiev --- src/stm32/stm32f1.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/stm32/stm32f1.c') diff --git a/src/stm32/stm32f1.c b/src/stm32/stm32f1.c index 5680cfba..526ec485 100644 --- a/src/stm32/stm32f1.c +++ b/src/stm32/stm32f1.c @@ -204,6 +204,9 @@ gpio_peripheral(uint32_t gpio, uint32_t mode, int pullup) if (gpio == GPIO('B', 8) || gpio == GPIO('B', 9)) stm32f1_alternative_remap(AFIO_MAPR_CAN_REMAP_Msk, AFIO_MAPR_CAN_REMAP_REMAP2); + if (gpio == GPIO('D', 0) || gpio == GPIO('D', 1)) + stm32f1_alternative_remap(AFIO_MAPR_CAN_REMAP_Msk, + AFIO_MAPR_CAN_REMAP_REMAP3); } } -- cgit v1.2.3-70-g09d2