Skip to main content
harald
Associate III
October 27, 2018
Solved

Use CAN in STM32F042F4: Can not config in CubeMX

  • October 27, 2018
  • 4 replies
  • 4294 views

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

    This topic has been closed for replies.
    Best answer by T J

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

    4 replies

    waclawek.jan
    Super User
    October 27, 2018

    0690X000006CGiOQAW.png

    T J
    T JBest answer
    Senior III
    October 28, 2018

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

    harald
    haraldAuthor
    Associate III
    October 28, 2018

    Perfect! That did the job!

    MNasc.1
    Associate
    September 2, 2022

    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