cancel
Showing results for 
Search instead for 
Did you mean: 

Use CAN in STM32F042F4: Can not config in CubeMX

harald
Associate III

I want to use CAN Bus in STM32F042F4 (TSSOP20). In the data sheet it says, CAN_RX on PA11 Pin 17, CAN_TX on PA12 Pin 18.

When trying to configure in CubeMX, CAN function is greyed out and the pinout has not PA11 and PA12. Isn't it possible to use CAN in STM32F042F4 TSSOP20 device? Best regards

Harald

0690X000006CGhpQAG.png

0690X000006CGhuQAG.png

1 ACCEPTED SOLUTION

Accepted Solutions
T J
Lead

in the cube, in the pinout tab, under ' sys ' , you can swap the pins.... to CanTxRx

View solution in original post

4 REPLIES 4

0690X000006CGiOQAW.png

T J
Lead

in the cube, in the pinout tab, under ' sys ' , you can swap the pins.... to CanTxRx

harald
Associate III

Perfect! That did the job!

MNasc.1
Associate

Update september 02 2022:

To enable the pins PA_11 and PA_12 as CAN RX and TX at the STM32CUBEMX 6.6.1, you can follow these steps:

Go to System core > SYS > Active the box PA11/12 insted of pins PA9/10 > Go to CONNECTIVITY clik at CAN > ACTIVATE.

0693W00000SuNviQAF.jpg 

0693W00000SuNw2QAF.jpg