The clock can be changed using setClock, default for Teensy 3.x is 16MHz, you can try up to 60MHz on T4
If there is an error in the setBaudRate function it's been there since the original teachop/pawelsky's...
Try lowering the I2C rate to 100000 and/or try the alternate Wire library as a test, as for the wiring we can only assume you followed the site but we can't physically see that until you post pictures
Dont know if this also helps, but the time slices of each thread can be changed which affects how long task switching stays in that thread, i had to adjust my time slices when i ran multiple uart displays in previous...
Define reliably? TeensyCAN is using the FD library to distribute 640 byte data with 64byte frames in about 1.5ms constistantly for days. If there is any issues in the FD library I usually respond to fix it within the...
Why not just run 2 uarts separately through USB converters, better yet, use the same UART and dynamically change baudrate, over a single usb to uart adaptor
Serial1.begin(115200);
//Do Something......
If you have it wired to the CAN lines, you can attempt to plug a simple OBD reader to the ECU to read the freeze frames, then, in your teensy serial monitor, you should be able to see the ECU address. Writing is...
TeensyCAN has now gone multi-bus mode! Nodes can be talked to on any or all of the 3 CAN busses on Teensy. Responses to nodes will happen to their appropriate busses. Globals now send to all 3 busses unless one is...
Thanks for spotting that :)
Updated the fix on github:
https://github.com/tonton81/FlexCAN_T4/commit/6cdb2054c46b7ac62c420725e59f5d068575cd1a
::events() now updated as well to return 12 bits each for TX/RX queue...
The whole point of the bootloader is not only to prevent bricking, but to prevent chinese clones from entering the market via normal hex uploading capabilities....
Correct, the fan must get it's power from the mosfet or transistor, the teensy pin must only allow the signal to tell the mosfet/transistor to turn off or on. There are relay boards and mosfet breakouts you can find on...
First you must set the pin to output via pinMode(pin, OUTPUT);
Then you can use digitalWrite(pin, HIGH) to turn it on and LOW to turn it off. However, you should NOT source power from the pin itself, the pin should be...
Check out the circular buffer example for average() usages
https://github.com/tonton81/Circular_Buffer/blob/master/examples/CB_Calculating_Statiscal_Values/CB_Calculating_Statiscal_Values.ino
Just keep pushing the...
Skpang is correct. CAN3 pins (same ones for 2.0 and FD) are pads underneath the T4. The pads are very small so you need to be good at soldering tiny wires there or opt in for a breakout board, which couple were posted...
New update for TeensyCAN.
Node Discovery! The library is able to keep a list of active nodes, their DLC capabilites (receive DLC size max), and their timeout on the network (millis()).
The timeout depicts how long...
Why you using a period instead of a comma for writes? Should be "MB1,msg"
Filters should be set after mailbox configuration (reject all)
If using FIFO, MB0-7 dont exist, and using setMB does nothing with them
...
Yeah just don't use reset, as per the datasheet:
The following registers are reset: MCR (except the MDIS bit), TIMER , ECR, ESR1, ESR2, IMASK1, IMASK2, IFLAG1, IFLAG2 and CRCR. Configuration registers that control...
Upped to github is a new update to TeensyCAN. USB Serial & UART accesses can be called specifically to a node or globally on the network of nodes!
Node.Serial.println("Hello World!"); // prints to Serial monitor of...
FlexCAN_T4 readme documentation updated.
CANFD mode setBaudRate changed slightly. Two ways of calling:
FD.setBaudRate(config); /* no printout will occur, with the default listing entry of 1st on CAN and 1st on...
if ( Serial.available() ) {
uint8_t receivedByte = Serial.read();
if ( receivedByte != lastByte ) {
//Do Something...
}
lastByte = receivedByte; // store the last byte as previous byte
Here it is! CAN2.0/CANFD Implementation early stages. Redesign of CANquitto. This library has the ability not only to work on CAN2.0 and CANFD, but the payload transfers are automatically adjusted to the dlc size of...
FlexCAN_T4 has been updated!
Up to 3 raw outputs are enabled in background for external libraries (you know where this is going.......... :) )
All reception mailbox has mass enabler for interrupt capability! No...
A class static/auto or global variable is needed where you can copy the last byte to and check later on
Simply can put it before the void setup() line:
uint8_t lastByte = 0;
void setup() {
....
Yes, thanks for the concern. I hopefully will have finished off the FlexCAN_T4 which would be a successor to IFCT in terms of performance, while maintaining the Teensy 3.x compatibility. If there are any bugs, I'd like...
Thats the register for the code field, so i dont see how it gets stuck there, can you print something in serial monitor before and after that line to see if it prints both texts?
Does it restore when you properly fix the cables/resistor? The problem is your trying to access the registers despite being in a bus off state. Can you reproduce this between 2 teensies? Also if you can try out an...
Serial or i2c is feasable. But you will need to handle the serial data to parse the data you need, in i2c/spi you can send/receive data as blocks, like an indiced array ordered, 3rd option is CAN, but you would need...
It has nothing to do with my profile picture, no need to judge me based on a picture of the work i did on my car... Why is it obscure? Just because I modified my car makes me incapable of writing a library for general...
Setlistenmode effectively disconnects the writes from the network, another option would be putting the controller into freezemode (like a paused state), indefinately, until switched back to normal mode
Check your constructor, you need to use "CAN2" and remove "FD" from FlexCAN_T4FD, CAN2 is pins 0 and 1 and you need this to be able to communicate with T3
FlexCAN_T4FD<CAN3, RX_SIZE_256, TX_SIZE_16> FD;
Thats a...
Daisy chaining will work but is fault tolerant. If one node drops, you cut off a segment of the network. In canbus all nodes are wired in parallel, and if one goes offline, all other nodes remain working as programmed
...
This looks like a perfect candidate for CANbus. Every node gets a message and it is multi master so they can all talk together
As for length, you can do a kilometer if you want over 3 wire UTP :)
Check out the flexcan_t4 thread, each bus has it's own object in a different templated constructor, you can call them myData and myCritical if you wish, then use them like normal, myData.begin(), etc
Yes,...
Yes it would be for inactive CAN controllers.
If a user uses CAN2, he can optionally use CAN1 or CAN3 for non-volatile ram storage which should be pretty fast, the controller will remain in freeze mode so the data wont...
Hi defragster, just following up on older post about flexcan memory
Is there any interest in using unused flexcan controllers for RAM storage? If so, on T3, 48 dwords are accessible for 16 MB space, plus maybe 3-4...
The library is out (FlexCAN_T4) which supports all 3 busses 2.0 and FD. CANFD pins are available on the underside pads of the teensy 4, CAN1 and CAN2 are available as pins on T4, they support 2.0 only, a transceiver...
The TX normally sits high unless theres another node transmitting on the bus. Not everyone is familiar with the hardware, i myself am more into the software part of it
1) Library has been updated officially to support T3.x.
2) The FD mailbox offsets have been further optimized.
3) As per request of skpang, EDL and BRS reception flags have been added to the message struct and...
After the last update I worked on adding Teensy 3.x support. Here it is for testing!
Currently This compiles on both Teensy 3.5 and Teensy 4.0 on my test bench, and looks to be working. I've separated it from the main...
Hello all,
I just updated CAN2.0 on github. It has distributions and enhancements (smart filtering) working.
Any potential bugs let me know ;P
CAN2.0 and CANFD have both been running in parallel during my tests....