diff --git a/FlexCAN.cpp b/FlexCAN.cpp index 7ad1312..9dd9dd0 100644 --- a/FlexCAN.cpp +++ b/FlexCAN.cpp @@ -39,7 +39,10 @@ FlexCAN::FlexCAN(uint32_t baud) FLEXCAN0_MCR |= FLEXCAN_MCR_FEN; // segment splits and clock divisor based on baud rate - if ( 50000 == baud ) { + if ( 33333 == baud ) { + FLEXCAN0_CTRL1 = (FLEXCAN_CTRL_PROPSEG(2) | FLEXCAN_CTRL_RJW(2) + | FLEXCAN_CTRL_PSEG1(1) | FLEXCAN_CTRL_PSEG2(1) | FLEXCAN_CTRL_PRESDIV(59)); + } else if ( 50000 == baud ) { FLEXCAN0_CTRL1 = (FLEXCAN_CTRL_PROPSEG(2) | FLEXCAN_CTRL_RJW(1) | FLEXCAN_CTRL_PSEG1(7) | FLEXCAN_CTRL_PSEG2(3) | FLEXCAN_CTRL_PRESDIV(19)); } else if ( 100000 == baud ) { diff --git a/README.md b/README.md index 5fc3331..83c76fd 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Even though the Teensy is operating on 3.3V, use of 5V transceivers may be an op Note that CAN will normally require termination resistors. These are located at the two ends of a CAN bus to prevent reflections. Do not add more terminators when connecting devices to an existing properly terminated CAN bus. -Supported baud rates are 50000, 100000, 125000, 250000, 500000, and 1000000 bits per second. If the baud rate is not specified it will default to 125000. +Supported baud rates are 33333, 50000, 100000, 125000, 250000, 500000 and 1000000 bits per second. If the baud rate is not specified it will default to 125000. ### CAN Transceiver Options Please add parts you are using successfully with **Teensy 3.1** to this list. @@ -22,6 +22,7 @@ Please add parts you are using successfully with **Teensy 3.1** to this list. - NXP TJA1050T/VM,118 on the same 5V supply as the Teensy. (1MBPS) - Microchip MCP2551 on 5V (reported at 500KBPS) - Linear LT1796 on 5V (not speedtested) +- Freescale MC33897CTEF/R2 33.33 kbs single wire CAN compliant to GMW3089v2.4 ### Driver API **begin()**