Anyone with experience with CAN bus + Teensy 3.6?

I have been recently messing around with the Teensy 3.6, of which the MK66FX1M0VMD18 it's rocking is probably one of the most powerful microcontroller I have ever messed with. (180MHz ARM Cortex M4, 256K RAM, hardware FPU, far more than enough GPIO, and an insane amount of serial interfaces!)

I am particularly interested in the 2 CAN bus interfaces that it's sporting. However when loading the example code (which explicitly states it is only compatible with the Teensy 3.6! as only it has 2 CAN busses) I have not had much luck getting it to work.

I don't really understand what CAN_TX and CAN_RX are suppose to be. I would assume it is simalar to UART where TX is connected to RX and RX is connected to TX. However at least with the MCP2551's I also ordered, the RX (on this chip) is actually an output while the TX appears to be an input. As it turned out, I was not able to use this chip due to it being a strictly 5V logic component.

So after having discovered that, I decided to just connect the TX of CAN1 directly to RX on CAN0, and vice versa. Using the Object Oriented CAN example, I get absolutely nothing. If I swap the connections, connecting the low-impedance TX to the other low-impedance TX, and RX to RX, I also get nothing, but if I bring my hand close to the wires, or touch and feel around some of the pins, I will get some packets through and to appear on the serial monitor, almost as if one of the pins is acting as an input and of course it's floating because I don't know which pin that would be, as there is no code or comments to indicate such a button. I honestly have no idea what the hell is going on, and don't have access to a proper scope to see what is going on.

sort by: active | newest | oldest
rickharris5 months ago

There are a LOT of web sites that describe the standard. It is apparently hard to access because the buss is 2 way ie you have to interrogate it for some information.

There are arduino shields out there for this I believe and certainly ready made black boxes that can be interfaced to,.

-max- (author)  rickharris5 months ago

Sure, there is plenty of info about CAN itself, but what about the API for teensy or what can rx and can tx denote?

rickharris -max-5 months ago

CANBUS frame

-max- (author)  rickharris5 months ago

I know that much, my question is referring to more of the physical layer. tx and tx are def. not the same as can-H and can-L. I would expect I can connect tx directly to rx and rx directly to tx without needing CAN bus transeiver chips, at least for an example test until I get the parts to do it right.

rickharris -max-5 months ago

So you read the PDF file in the link above?

And the specification?

particularly the part about message transfer and validation>??


What about this?

Support for Teensy 3.5 and 3.6 (dual CAN) + alternative CAN pins #19

rickharris -max-5 months ago
There are thousands of can bus pages on the web.
for example as well as the texas specification for it.
You need to read and read and read through them to understand what it does.
steveastrouk5 months ago

Get the MCP 2651 instead, then look at application circuits. And of course, there;s every chance you've cooked the port.

-max- (author) 5 months ago

Probing around with a few LEDs (my only method currently for measuring signals) I see that the TX rests in the HIGH state, and I guess is active low.