2020-04-16 07:14 AM
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
2020-04-16 07:34 AM
Let the mouse pointer rest a bit over the grayed-out CAN peripheral.
Now go to SYS as advised to swap the pins
and CAN is no longer grayed out.
2020-04-16 07:36 AM
Thanks :)
2020-04-16 07:38 AM
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.
Best Regards,
Khouloud.
2020-04-16 07:45 AM
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
Best regards,
Nesrine