From 1:00 AM - 6:00 AM CST on Saturday, January 23, ni.com will be undergoing system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 1:00 AM - 6:00 AM CST on Saturday, January 23, ni.com will be undergoing system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
Sets the CAN, FlexRay, or LIN interface baud rate. The default value for this interface property is the same as the cluster's baud rate in the database.
Data type:
Your application can set this interface baud rate to override the value in the database, or when no database is used.
When the upper nibble (0xF0000000) is clear, this is a numeric baud rate (for example, 500000).
NI-XNET CAN hardware currently accepts the following numeric baud rates: 33333, 40000, 50000, 62500, 80000, 83333, 100000, 125000, 160000, 200000, 250000, 400000, 500000, 800000, and 1000000.
When the upper nibble of the lower 32 bit is set to 0xA (that is, 0xA0000000), the remaining bits provide fields for more custom CAN communication baud rate programming. The fields are shown in the following tables:
63..32 | 31..28 | 27..0 | |
---|---|---|---|
Normal | Res | b0000 | Baud Rate (33.3 k–1 M) |
63..46 | 45..32 | 31..28 | 27..23 | 22..16 | 15..8 | 7 | 6..0 | |
---|---|---|---|---|---|---|---|---|
Custom 64-bit | Res | Tq | b1010 | Res | NSJW | NTSEG1 | Res | NTSEG2 |
Time quantum (Tq) is used to program the baud rate prescaler. Valid values are 25–12800, in increments of 0x19 (25 decimal). Time quantum is defined in ISO 11898-1, 12.4.1 Bit Encoding/Decoding.
Nominal (Re-)Synchronization Jump Width (NSJW). Valid values are 0–127. The actual hardware interpretation of this value is one more than the programmed value.
Nominal Time Segment 1 (NTSEG1) is the time segment before the sample point. Valid values are 1–0xFF (1–255 decimal). The actual hardware interpretation of this value is one more than the programmed value. NTSEG1 is described in Bosch's M_CAN Controller Area Network User’s Manual, Revision 3.2.1.
Nominal Time Segment 2 (NTSEG2) is the time segment after the sample point. The actual hardware interpretation of this value is one more than the programmed value. NTSEG2 is described in Bosch's M_CAN Controller Area Network User’s Manual, Revision 3.2.1.
The following information is valid for the former 32-bit Baud Rate property that was replaced by the 64bit property. You still can use the baud rate values used with the 32-bit property.
When the upper nibble is set to 0x8 (that is, 0x80000000), the remaining bits provide fields for more custom CAN communication baud rate programming. Additionally, if the upper nibble is set to 0xC (that is, 0xC0000000), the remaining bits provide fields for higher-precision custom CAN communication baud rate programming. The higher-precision bit timings facilitate connectivity to a CAN FD cluster.
31..28 | 27..26 | 25..24 | 23 | 22..20 | 19..16 | 15..14 | 13..12 | 11..8 | 7..4 | 3..0 | |
---|---|---|---|---|---|---|---|---|---|---|---|
Custom | b1000 | Res | SJW (0–3) | TSEG2 (0–7) | TSEG1 (1–15) | Res | Tq (125–0x3200) | ||||
High Precision | b1100 | SJW (0–15) | TSEG2 (0–15) | TSEG1 (1–63) | Tq (25–0x3200) |
(Re-)Synchronization Jump Width (SJW). Valid programmed values are 0–3 in normal custom mode and 0–15 in high-precision custom mode. The actual hardware interpretation of this value is one more than the programmed value.
Time Segment 2 (TSEG2) is the time segment after the sample point. Valid programmed values are 0–7 in normal custom mode and 0–15 in high-precision custom mode. TSEG2 is the Phase_Seg2 time described in ISO 11898-1, 12.4.1 Bit Encoding/Decoding. The actual hardware interpretation of this value is one more than the programmed value.
Time Segment 1 (TSEG1) is the time segment before the sample point. Valid programmed values are 1–0xF (1–15 decimal) in normal custom mode and 1–0x3F (1–63 decimal) in high-precision custom mode. TSEG1 is the combination of the Prop_Seg and Phase_Seg1 time described in ISO 11898-1, 12.4.1 Bit Encoding/Decoding. The actual hardware interpretation of this value is one more than the programmed value.
Time quantum (Tq) is used to program the baud rate prescaler. Valid programmed values are 125–12800, in increments of 0x7D (125 decimal) ns for normal custom mode and 25–12800, in increments of 0x19 (25 decimal) ns for high-precision custom mode. Time quantum is defined in ISO 11898-1, 12.4.1 Bit Encoding/Decoding.
An advanced baud rate example is 0x8014007D. This example breaks down into the following values:
Each time quanta is 125 ns. From IS0 11898–1, 12.4.1.2 Programming of Bit Time, the nominal time segments length is Sync_Seg (Fixed at 1) + (Prop_Seg + Phase_Seg1)(B) + Phase_Seg2(C) = 1 + 2 + 5 = 8. So, the total time for a bit in this example is 8 * 125 ns = 1000 ns = 1 µs. A 1 µs bit time is equivalent to a 1 MHz baud rate.
Baud rate = (Total Ticks per Sec / Ticks for 1 bit ) = (Oscillator Frequency[Hz] * Tq[Ticks]) / 25) / (Sync_Seg[Ticks] + TSEG1[Ticks] + TSEG2[Ticks])
Sample Point = (TSEG1 + Sync_Seg) / (TSEG1 + Sync_Seg + TSEG2)
When the upper nibble (0xF0000000) is clear, you can set only baud rates within the LIN-specified range (2400 to 20000) for the interface.
When the upper nibble is set to 0x8 (0x80000000), no check for baud rate within LIN-specified range is performed, and the lowest 16 bits of the value may contain the custom baud rate.
Any custom value higher than 65535 is masked to a 16-bit value. As with the non-custom values, the interface internally calculates the appropriate divisor values to program into its UART. Because the interface uses the Atmel ATA6620 LIN transceiver, which is guaranteed to operate within the LIN 2.0 specification limits, there are some special considerations when programming custom baud rates for LIN:
Where This Property Is Available:
Desktop OS: Windows
FPGA: Not supported
Web Server: Not supported in VIs that run in a web application