Skip to main content
BMama.1
Associate
Dec 22, 2019 6:48 PM UTC
Solved

How to configure CAN interface on STM32F042F6P6?

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?

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Dec 22, 2019 7:47 PM UTC

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..

2 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Dec 22, 2019 7:47 PM UTC

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
BMama.1
BMama.1Author
Associate
Dec 24, 2019 6:34 AM UTC

Thank you!

I've got it.