onARM

STM32 CAN Example

The STM32 CAN example program shows how to configure and use the CAN peripheral of STMicroelectronics STM32F103xx microcontroller.

The CAN controller is initialized for 500 kbit/s. A converted analog value is send in the first byte of a CAN message. Received and transmitted byte values are displayed on LCD.

The configuration of the clocks is done using the Configuration Wizard in file STM32_Init.c.

Two µVision targets are available:

  • Simulator where the program runs in the software simulator. A debug script (CAN_Simulate.ini) is used to simulate the analog input and the LCD.
  • MCBSTM32 where the program runs from internal Flash located on the microcontroller.

The example is tested with the Keil Evaluation Board MCBSTM32.

STM32_CAN.ZIP (38K)
Tuesday, November 20, 2007

Estimated File Download Time:
< 10 Seconds: 56Kb Modem
< 10 Seconds: 128Kb ISDN
< 10 Seconds: T1/Broadband