CAN Bus Library for Teensy 3.1

Teachop,

Thank you for posting the library. However, Can you provide some more examples please, I am having a hard time understanding how use the Flex_CAN API.

Basically, I am only trying to read CAN messages coming from a PE3 ECU. I was able to read data using mcneight's awesome library with a MCP 2551 on the Teensy 3.1, but now I am unable to. I suspect there is something wrong with my transceiver but I am not sure. I want to double check using your library. I am new to CAN, but I feel like I have a good grasp of it after studying it for my University FSAE project.
 
Teachop;

Thanks for all the work on this library, Can you tell me would this support the SAE J1939 protocall? From my research it requires using the 29-bit/"extended" identifier.
 
Just for the records, i've sucefoully connceted my peak usb to teensy trough canbus at 500k, i've used the waveshare transcriveer module (quite cheap) the IC is a TI VP230 32M A6SG.
i've tryed with flexcan library and with Pedro Cevallos & Neil McNeight unified libray wich i think shares part of the code from flexcan.
For a noob like me i found Neil's library a bit easyer to use but i realle apreciate flexcan library too.
Cheers.
 
I have set up two Teensy 3.2's with the transceiver, code linked to below.

https://github.com/rummanwaqar/teensy_can_example

http://skpang.co.uk/catalog/images/canbus/can3v3_brk_rev_C.pdf

I can't seem to receive a Can signal on the receiving teensy even though I can see the signal waveform from transmission on pins 7 and 6 of the transceiver of the transmitting teensy. I have also tried to use the example code with the FlexCan library by pawelsky and have gotten nothing. All of the hardware seems to check out. Any and all help is appreciated.
 
Yes, something was broken. I have had no luck determinig why the newer code doesn't work on Teensies. Any help appreciated.
 
Yes, something was broken. I have had no luck determinig why the newer code doesn't work on Teensies. Any help appreciated.

What library were / are you using? do you happen to have any project files for doing some simple Can receiving that you know worked?
 
Found the problem. I had a non functional Flexcan library already installed at

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries

I think it was imported by some install software for another board.

I have since deleted it and tested teachop/FlexCAN_Library and pawelsky/FlexCAN_Library which both work. Pawelsky's library is stored at
C:\Users\userName\Documents\Arduino\libraries\FlexCAN

There is still a bit of work to do in writing teensy code to send proper byte code to talk to the hardware i'm working with, but I already have a test example working which gets the position value of an electric motor from its PID controller via Canopen

- Joseph
 
Last edited:
Back
Top