cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to use an STM32F042F4 MCU with CAN communication. I saw the CAN bus in STM32CubeMx by Connectivty, but i can't select it ?

Bence Stocker
Associate II

Dear ST,

I would like to use an STM32F042F4 MCU with CAN communication. I saw the CAN bus in STM32CubeMx by Connectivty, but i can't select it (it is grey)? I read in the datasheet of the MCU that i have to remap CAN bus pin to PA10 and PA9.

Can you help me, how can select CAN bus in STM32CubeMx?

Thanks

4 REPLIES 4
berendi
Principal

Let the mouse pointer rest a bit over the grayed-out CAN peripheral.

0693W000000Vx1ZQAS.png

Now go to SYS as advised to swap the pins

0693W000000Vx36QAC.png

and CAN is no longer grayed out.

Bence Stocker
Associate II

Thanks :)

Hello Bence Stocker,

In order to activate CAN bus in STM32CubeMx when working with STM32F042F4 MCU, select SYS from the the component list and then check "Pins PA11/12 instead of pins PA9/10" in "SYS Mode and Configuration" panel, CAN bus will be automatically available and you can select it.

0693W000000Vx3uQAC.png

Best Regards,

Khouloud.

Hi @Bence Stocker​ 

You need PA12 (to swap pins go in sys): go to sys then select Pin PA11/PA12 instead of pins PA9/10

0693W000000Vx4tQAC.png

0693W000000Vx78QAC.png

Best regards,

Nesrine