0% found this document useful (0 votes)
14 views11 pages

CAN Communication with STM32 Tutorial

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views11 pages

CAN Communication with STM32 Tutorial

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Can_Bus_Tutorial Project

Configuration Report

1. Description
1.1. Project

Project Name Can_Bus_Tutorial


Board Name custom
Generated with: STM32CubeMX 4.27.0
Date 01/01/2019

1.2. MCU

MCU Series STM32F1


MCU Line STM32F103
MCU name STM32F103C8Tx
MCU Package LQFP48
MCU Pin number 48

Page 1
Can_Bus_Tutorial Project
Configuration Report

2. Pinout Configuration

Page 2
Can_Bus_Tutorial Project
Configuration Report

3. Pins Configuration

Pin Number Pin Name Pin Type Alternate Label


LQFP48 (function after Function(s)
reset)
1 VBAT Power
5 PD0-OSC_IN I/O RCC_OSC_IN
6 PD1-OSC_OUT I/O RCC_OSC_OUT
7 NRST Reset
8 VSSA Power
9 VDDA Power
23 VSS Power
24 VDD Power
26 PB13 * I/O GPIO_Output
30 PA9 I/O USART1_TX
31 PA10 I/O USART1_RX
32 PA11 I/O CAN_RX
33 PA12 I/O CAN_TX
34 PA13 I/O SYS_JTMS-SWDIO
35 VSS Power
36 VDD Power
37 PA14 I/O SYS_JTCK-SWCLK
44 BOOT0 Boot
47 VSS Power
48 VDD Power

* The pin is affected with an I/O function

Page 3
Can_Bus_Tutorial Project
Configuration Report

4. Clock Tree Configuration

Page 4
Can_Bus_Tutorial Project
Configuration Report

5. IPs and Middleware Configuration


5.1. CAN
mode: Mode
5.1.1. Parameter Settings:

Bit Timings Parameters:


Prescaler (for Time Quantum) 18 *
Time Quantum 500.0 *
Time Quanta in Bit Segment 1 13 Times *
Time Quanta in Bit Segment 2 2 Times *
Time for one Bit 8000 *
ReSynchronization Jump Width 1 Time

Basic Parameters:
Time Triggered Communication Mode Disable
Automatic Bus-Off Management Disable
Automatic Wake-Up Mode Disable
No-Automatic Retransmission Disable
Receive Fifo Locked Mode Disable
Transmit Fifo Priority Disable

Advanced Parameters:
Operating Mode Normal

5.2. RCC
High Speed Clock (HSE): Crystal/Ceramic Resonator
5.2.1. Parameter Settings:

System Parameters:
VDD voltage (V) 3.3
Prefetch Buffer Enabled
Flash Latency(WS) 2 WS (3 CPU cycle)

RCC Parameters:
HSI Calibration Value 16
HSE Startup Timout Value (ms) 100
LSE Startup Timout Value (ms) 5000

Page 5
Can_Bus_Tutorial Project
Configuration Report

5.3. SYS
Debug: Serial Wire
Timebase Source: SysTick

5.4. USART1
Mode: Asynchronous
5.4.1. Parameter Settings:

Basic Parameters:
Baud Rate 115200
Word Length 8 Bits (including Parity)
Parity None
Stop Bits 1

Advanced Parameters:
Data Direction Receive and Transmit
Over Sampling 16 Samples

* User modified value

Page 6
Can_Bus_Tutorial Project
Configuration Report

6. System Configuration
6.1. GPIO configuration

IP Pin Signal GPIO mode GPIO pull/up pull Max User Label
down Speed
CAN PA11 CAN_RX Input mode No pull-up and no pull-down n/a
PA12 CAN_TX Alternate Function Push Pull n/a High *
RCC PD0- RCC_OSC_IN n/a n/a n/a
OSC_IN
PD1- RCC_OSC_OUT n/a n/a n/a
OSC_OUT
SYS PA13 SYS_JTMS- n/a n/a n/a
SWDIO
PA14 SYS_JTCK- n/a n/a n/a
SWCLK
USART1 PA9 USART1_TX Alternate Function Push Pull n/a High *
PA10 USART1_RX Input mode No pull-up and no pull-down n/a
GPIO PB13 GPIO_Output Output Push Pull No pull-up and no pull-down Low

6.2. DMA configuration


nothing configured in DMA service

Page 7
Can_Bus_Tutorial Project
Configuration Report

6.3. NVIC configuration

Interrupt Table Enable Preenmption Priority SubPriority


Non maskable interrupt true 0 0
Hard fault interrupt true 0 0
Memory management fault true 0 0
Prefetch fault, memory access fault true 0 0
Undefined instruction or illegal state true 0 0
System service call via SWI instruction true 0 0
Debug monitor true 0 0
Pendable request for system service true 0 0
System tick timer true 0 0
USB high priority or CAN TX interrupts true 0 0
USB low priority or CAN RX0 interrupts true 0 0
CAN RX1 interrupt true 0 0
CAN SCE interrupt true 0 0
PVD interrupt through EXTI line 16 unused
Flash global interrupt unused
RCC global interrupt unused
USART1 global interrupt unused

* User modified value

Page 8
Can_Bus_Tutorial Project
Configuration Report

7. Power Consumption Calculator report


7.1. Microcontroller Selection

Series STM32F1
Line STM32F103
MCU STM32F103C8Tx
Datasheet 13587_Rev17

7.2. Parameter Selection

Temperature 25
Vdd 3.3

Page 9
Can_Bus_Tutorial Project
Configuration Report

8. Software Project
8.1. Project Settings

Name Value
Project Name Can_Bus_Tutorial
Project Folder C:\Users\protj\Desktop\CAN_PDF_Tutorial\Can_Bus_Tutorial
Toolchain / IDE MDK-ARM V5
Firmware Package Name and Version STM32Cube FW_F1 V1.6.1

8.2. Code Generation Settings

Name Value
STM32Cube Firmware Library Package Copy only the necessary library files
Generate peripheral initialization as a pair of '.c/.h' files No
Backup previously generated files when re-generating No
Delete previously generated files when not re-generated Yes
Set all free pins as analog (to optimize the power No
consumption)

Page 10
Can_Bus_Tutorial Project
Configuration Report

9. Software Pack Report

Page 11

You might also like