STM32Cube  Version 2.0
Create Projects for STM32F7 Series with STM32Cube HAL and STM32CubeMX
 All Files Pages
CMSIS-Driver CAN Setup

The CMSIS-Driver CAN requires:

  • APB1 Clock (maximum frequency is 50 MHz)
  • Configuration of CAN

Valid settings for various evaluation boards are listed in the table below:

Peripheral Resource STM32756G-EVAL STM32F779I-EVAL
CAN1 Mode CAN1: Master CAN1: Master
CAN1_RX pin PA11 PA11
CAN1_TX pin PA12 PA12
CAN2 Mode CAN2: Slave CAN2: Slave
CAN2_RX pin n/a n/a
CAN2_TX pin n/a n/a
CAN3 Mode CAN3: Master CAN3: Master
CAN3_RX pin n/a n/a
CAN3_TX pin n/a n/a

For different boards, refer to the hardware schematics to reflect correct setup values.

The STM32CubeMX configuration for STMicroelectronics STM32756G-EVAL or STM32F779I-EVAL Board with steps for Pinout, Clock, and System Configuration are listed below. Enter the values that are marked bold.

Pinout tab

  1. Configure CAN1 mode
    • Peripheral CAN1: Mode=Master Mode

Clock Configuration tab

  1. Configure APB1 Clock (maximum frequency is 50 MHz)
    • Setup "APB1 peripheral clocks (MHz)" to match application requirements

Configuration tab

  1. Under Connectivity open CAN1 Configuration:
    • Parameter Settings: not used
    • User Constants: not used
    • NVIC Settings: review settings, no changes required
      Interrupt Table Enable Preemption Priority Sub Priority
      CAN1 TX interrupts OFF 0 0
      CAN1 RX0 interrupts OFF 0 0
      CAN1 RX1 interrupts OFF 0 0
      CAN1 SCE interrupts OFF 0 0
      - GPIO Settings: review settings, no changes required
      Pin Name Signal on Pin GPIO mode GPIO Pull-up/Pull..Maximum out User Label
      PA11 CAN1_RX Alternate ..No pull-up and no..High .
      PA12 CAN1_TX Alternate ..No pull-up and no..High .
      - Click OK to close the CAN1 Configuration dialog