Table Of Contents

Intf.BaudRate64

Last Modified: February 7, 2020

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.

spd-note-note
Note  

You can modify this property only when the interface is stopped.

Data type: datatype_icon

Long Name: Interface:64bit Baud Rate

Class: XNET Session

Permissions: Read/Write

Your application can set this interface baud rate to override the value in the database, or when no database is used.

spd-note-note
Note  

This property replaces the former 32-bit property. You still can use the baud rate values used with the 32-bit property. The custom 64-bit baud rate setting requires using values greater than 32 bit.

CAN

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.

spd-note-note
Note  

33333 baud rate is supported with single-wire transceivers only.

spd-note-note
Note  

Baud rates greater than 125000 are supported with high-speed transceivers only.

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.

32-bit baud rate property

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:

  • SJW = 0x0 (0x01 in hardware, due to the + 1)
  • TSEG2 = 0x1 (0x02 in hardware, due to the + 1)
  • TSEG1 = 0x4 (0x05 in hardware, due to the + 1)
  • Tq = 0x7D (125 ns in hardware)

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.

Formulas

Baud rate = (Total Ticks per Sec / Ticks for 1 bit ) = (Oscillator Frequency[Hz] * Tq[Ticks]) / 25) / (Sync_Seg[Ticks] + TSEG1[Ticks] + TSEG2[Ticks])

spd-note-note
Note  

NI XNET devices use 40 MHz oscillators.

Sample Point = (TSEG1 + Sync_Seg) / (TSEG1 + Sync_Seg + TSEG2)

LIN

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:

  • The ATA6620 transceiver incorporates a TX-dominant timeout function to prevent a faulty device that it is built into from holding the LIN dominant indefinitely. If the TX line into the transceiver is held in the dominant state for too long, the transceiver switches its driver to the recessive state. This places a limit on the length of the LIN header break field that the interface transmits, therefore limiting the lowest baud rate you can set. At the point the baud rate or break length is set for the interface, it uses the baud rate bit time and break length settings internally to calculate the resulting break duration and returns an error if that duration is long enough to trigger the TX dominant timeout.
  • At the other end of the baud range, the ATA6620 is specified to work up to 20000 baud. While you can use the custom bit to program rates higher than 20000 baud, transceiver behavior when operating above that rate is not guaranteed.

Where This Property Is Available:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics