Skip to main content
Open topic with navigation CAPL Functions » LIN » linMeasHeaderBaudrate

linMeasHeaderBaudrate

Valid for: CANoe DE

Function Syntax

Description

With this function, it is possible to set a request to measure the baudrate value for the next LIN header event. The channel, where the baudrate is measured, is determined by the CAPL program context. This function only initiates the baudrate measurement. The result becomes available when the next LIN header occurs and it remains valid until the next measurement request. To retrieve the result, the function linGetMeasBaudrate() shall be used. Note:
  • When LIN hardware is in Master mode, calling this function will have no effect.
  • The baudrate can only be measured if the specified byte (PID or Sync Byte) contains at least one “0”-bit followed by a “1”-bit. This means that bytes with the following values cannot be measured:
    • 0x0 (binary: 00000000)
    • 0x80 (binary: 10000000)
    • 0xC0 (binary: 11000000)
    • 0xE0 (binary: 11100000)
    • 0xF0 (binary: 11110000)
    • 0xF8 (binary: 11111000)
    • 0xFC (binary: 11111100)
    • 0xFE (binary: 11111110)
    • 0xFF (binary: 11111111)

Parameters

  • index: This parameter specifies a field of LIN header which will be used for baudrate measurement.
    • 0: Synch field
    • 1: Identifier field

Return Values

On successful request returns zero, otherwise -1.

Example

Test case for measuring baudrate using LIN header event
linSetBaudratelinGetMeasBaudratelinMeasRespBaudrate