Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 33333 bps #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion FlexCAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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()**
Expand Down