Skip to main content

setBtr

Valid for: CANoe DE • CANoe:lite DE

Function Syntax

long setBtr(long channel, byte btr0, byte btr1);

Description

Sets another baudrate. The values do not become active until the next call of the function resetCan. It should be noted that these values depend on the CAN controller used.

Parameters

  • CAN channel
    • 0: All controllers
    • 1 - 32: channel 1 - 32
  • BTR0: Value of Bit Timing Register 0.
  • BTR1: Value of Bit Timing Register 1.

Return Values

Always 1

Example

...
setBtr(0, 0x00, 0x3a); // 500 kBaud for 82C200
resetCan(); // activate
...
resetCansetOcr