FD Bit rate Parameter Definitions

PCAN-Basic

PCAN-Basic Documentation
Home
PreviousUpNext
FD Bit rate Parameter Definitions

Defines the different configuration parameters used to create a Flexible Data rate string for FD capable PCAN-Channels initialization. These values are used as parameter with CAN_InitializeFD (class-method: InitializeFD). 

 

Clock Frequency parameters:  

 
Type 
Constant 
Value 
Description 
 
String 
PCAN_BR_CLOCK 
"f_clock" 
Clock frequency in Hertz (80000000, 60000000, 40000000, 30000000, 24000000, 20000000). 
 
String 
PCAN_BR_CLOCK_MHZ 
"f_clock_mhz" 
Clock frequency in Megahertz (80, 60, 40, 30, 24, 20). 

 

Nominal Bit rate parameters:

 
Type 
Constant 
Value 
Description 
 
String 
PCAN_BR_NOM_BRP 
"nom_brp" 
Clock prescaler for nominal time quantum (1..1024). 
 
String 
PCAN_BR_NOM_TSEG1 
"nom_tseg1" 
TSEG1 segment for nominal bit rate in time quanta (1..256). 
 
String 
PCAN_BR_NOM_TSEG2 
"nom_tseg2" 
TSEG2 segment for nominal bit rate in time quanta (1..128). 
 
String 
PCAN_BR_NOM_SJW 
"nom_sjw" 
Synchronization Jump Width for nominal bit rate in time quanta (1..128). 

 

Data Bit rate parameters:

 
Type 
Constant 
Value 
Description 
 
String 
PCAN_BR_DATA_BRP 
"data_brp" 
Clock prescaler for fast data time quantum (1..1024). 
 
String 
PCAN_BR_DATA_TSEG1 
"data_tseg1" 
TSEG1 segment for fast data bit rate in time quanta (1..32). 
 
String 
PCAN_BR_DATA_TSEG2 
"data_tseg2" 
TSEG2 segment for fast data bit rate in time quanta (1..16). 
 
String 
PCAN_BR_DATA_SJW 
"data_sjw" 
Synchronization Jump Width for fast data bit rate in time quanta (1..16). 

These definitions are constants values in an object oriented environment (Delphi, .NET Framework) and declared as defines in C++ (plain API). 

Following points are to be respected in order to construct a valid FD Bit rate string:

  • The string must contain only one of the two possible "Clock Frequency" parameters, depending on the unit used (Hz, or MHz).
  • The frequency to use must be one of the 6 listed within the "Clock Frequency" parameters.
  • The value for each parameter must be separated with a '='. Example: "data_brp=1"
  • Each pair of parameter/value must be separated with a ','. Blank spaces are allowed but are not necessary. Example: "f_clock_mhz=24, nom_brp=1,"
  • Both Bit rates, or only the nominal one, must be defined within the string (PCAN_BR_DATA_* and PCAN_BR_NOM_*, or only PCAN_BR_NOM_*).

Example with nominal Bit rate only: 

A valid string representing 1 Mbit/sec for both, nominal and data Bit rates: 

"f_clock_mhz=20, nom_brp=5, nom_tseg1=2, nom_tseg2=1, nom_sjw=1" 

Example with nominal and data Bit rate: 

A valid string representing 1 Mbit/sec for nominal Bit rate, and 2 Mbit/sec for data Bit rate: 

"f_clock_mhz=20, nom_brp=5, nom_tseg1=2, nom_tseg2=1, nom_sjw=1, data_brp=2, data_tseg1=3, data_tseg2=1, data_sjw=1" 

Parameter Value Ranges:  

Parameter 
Value Range 
f_clock 
[80000000, 60000000, 40000000, 30000000, 24000000, 20000000] 
f_clock_mhz 
[80, 60, 40, 30, 24, 20] 
nom_brp 
1 .. 1024 
nom_tseg1 
1 .. 256 
nom_tseg2 
1 .. 128 
nom_sjw 
1 .. 128 
data_brp 
1 .. 1024 
data_tseg1 
1 .. 32 
data_tseg2 
1 .. 16 
data_sjw 
1 .. 16 

Python: 

The definitions of these values have the following form: TPCANBitrateFD(string) where string is the value contained in the "value" column. e.g. PCAN_BR_CLOCK is defined as TPCANBitrateFD("f_clock").

Copyright © 2017. PEAK-System Technik GmbH. All rights reserved.
Send feedback to this documentation