Skip to content

Latest commit

 

History

History

stm32f072

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

stm32f072

Any 48MHz STM32F0 series will work.

  • STM32F042
  • STM32F072
  • STM32F091
  • STM32F098

I used this as a reference.

Changes from the original

  • frame format
    This example support Extended frame format: with 29 identifier bits.

  • CAN port
    In this example, you can select the CAN port.

Remap CAN port

STM32F042 have one CAN ports.
These GPIOs can be used as CAN.

CAN RX TX
CAN1 PA11 PA12
CAN1 PB8 PB9

STM32F072/091/098 have one CAN ports.
These GPIOs can be used as CAN.

CAN RX TX
CAN1 PA11 PA12
CAN1 PB8 PB9
CAN1 PD0 PD1

CAN_RX mapped to PA11, CAN_TX mapped to PA12

CANInit(CAN_1000KBPS, 0);  // CAN_RX mapped to PA11, CAN_TX mapped to PA12

CAN_RX mapped to PB8, CAN_TX mapped to PB9 (not available on 36-pin package)

CANInit(CAN_1000KBPS, 2);  // CAN_RX mapped to PB8, CAN_TX mapped to PB9

CAN_RX mapped to PD0, CAN_TX mapped to PD1 (available on 100-pin and 144-pin package)

CANInit(CAN_1000KBPS, 3);  // CAN_RX mapped to PD0, CAN_TX mapped to PD1