cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure CAN interface on STM32F042F6P6?

BMama.1
Associate

Hi!

I am confused, i wanted to use STM32F042F6P6 MCU for can interface but, ther is no TX pin for can interface (PB9 on datasheet).

So, how i can configure CAN TX?

There is no CAN mode option for this MCU inside of CUBEMX because there is no TX pin for CAN.

Is it possible to use MCU for CAN interface?

1 ACCEPTED SOLUTION

Accepted Solutions

Per the DATA SHEET, the 20-pin device requires you remap PA11/PA12 via SYSCFG_CFGR1. You'll lose PA9/PA10

PA11 CAN_RX

PA12 CAN_TX

https://www.st.com/resource/en/datasheet/stm32f042f6.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

Per the DATA SHEET, the 20-pin device requires you remap PA11/PA12 via SYSCFG_CFGR1. You'll lose PA9/PA10

PA11 CAN_RX

PA12 CAN_TX

https://www.st.com/resource/en/datasheet/stm32f042f6.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thank you!

I've got it.