Skip to main content
harald
Associate III
Oct 27, 2018 10:40 PM UTC
Solved

Use CAN in STM32F042F4: Can not config in CubeMX

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.
    T J
    T JBest answer
    Senior III
    Oct 28, 2018 1:05 AM UTC

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

    4 replies

    waclawek.jan
    Super User
    Oct 27, 2018 11:34 PM UTC

    0690X000006CGiOQAW.png

    T J
    T JBest answer
    Senior III
    Oct 28, 2018 1:05 AM UTC

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

    harald
    haraldAuthor
    Associate III
    Oct 28, 2018 12:28 PM UTC

    Perfect! That did the job!

    MNasc.1
    Associate
    Sep 2, 2022 12:09 PM UTC

    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