STM32 CAN baudrate calculation 1.0
calculation of BRP TS1 TS2

Code size:32Kb Author:Matthias
Source files included:yes Version:1.0
Use circleOS:no Creation date:2010-02-03 11:02:04
Hardware modification:no Modification date:2010-05-10 13:47:20
Based on the STM32 Primer:Primer2
Downloads:653 Views:22068
Average ratings:0/5 (0 rates)

Download: (11 KB)


Excel Datei die die Register BRP TS1 TS2 nach der gesuchten Baudrate berechnet.
Achtung enthält Makros die natürlich aktiviert werden müssen damit es berechnet wird.
Der Code kann über den VB Editor gelesen werden ist also nicht geschützt.

Excel file to the register BRP TS1 TS2 for the requested baud rate is calculated.
Warning contains macros that must be activated, of course, so it is calculated.
The code can be read on the VB Editor is not protected.

Umsetzung im code, Achtung zum Prescaler muss 1 addiert werden

Be implemented in the code, respect for the prescaler must be 1 added

CAN_InitStructure.CAN_Prescaler =  BRP +1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

CAN_InitStructure.CAN_BS1       = TS1;
CAN_InitStructure.CAN_BS2       = TS2;


if you use the "CAN_BS1_1tq" defines, you have to add one tg time more
  example if they charge 4, they must then take CAN_BS1_5tq