what is slow? reception? transmission? code responses? how does the loop() code look like? are you using events()? if using events(), there may be a delay somewhere in your code before the queue can be read, if so try...
You can have up to 8 FIFO filters (0-7) by default, 8 more after sacrificing 2 mailboxes (0-15), which would leave you with 6 TX mailboxes instead of default 8. It's a bit complex but highly customizable. FIFO has 6...
if you enable FIFO, you dont have any reception mailboxes, only 8 TX mailboxes MB8-MB15. Because you are using FIFO without mailboxes you should use setFIFOFilter(0, 0x18DAF111,EXT)... 0 for 1st fifo filter.
MB99 is...
read my post above
EXT is used for setMB(), optional parameters in setMBFilter are for multiple IDs only
mailboxStatus() will display MB1 as a STD mailbox. use MB4 for extended receptions.
remove the condition checks to make sure you see the frame first, usually print it out, easier to debug. also remove filtering until you get the expected output, then you may filter frames as needed
also just so you...
why adc? are you sharing the bus? is it releasing the MISO line? I don't know your connections, everything you attached, or code, just bits of pieces and alot of guesswork...
sounds like you have code conflict and/or...
if you have a problem at reading then yeah, that won't make my library work as it needs to read the registers. make sure your SPI MISO and MOSI lines are correct, theres an SPI connection issue somewhere
well it should work with demo above, i have 8 chips running on a T4.0 on SPI with pin 10 as CS
if it's wired and configured properly, mcp.info() will detect it
I needed BLE support for my Teensy 4.0 project, rather than deal with 2 mcus i added CANbus support TO ESP32 and have teensy use CAN to control the BLE devices programmed on the ESP32
odd.... it is the identical chip in both
are you sure theres no extra code blocking thats making the time expire sooner before feeding? (maybe something is taking a long time to initialize?)
if the callback doesnt fire without events(), you are not using the latest github copy. Please update.
Also increase your TX_SIZE in the constructor, the queue may be overflowing while waiting arbitration, maybe your...
you can either use the .seq flag to enable sequential on absolute first TX mailbox, or just setup only 1 TX mailbox. you can have up to 64 on T4, 16 on T3, and if you really wanted you can setup 1TX and 2 RX, and if...
Note alot of google results show issue with your transceiver. I am using all 3 CAN busses in my project. One of the issues explained in that post is that transceiver being able to receive but not transmit. If there is...
Also you may wanna look at the first post here:
https://forum.pjrc.com/threads/51870-Help-getting-Canbus-data-from-teensy-3-2-and-SN65HVD230-transciever!
i agree, reception of fifo is ordered 6 deep, however on transmit, any of the 8 remaining TX mailboxes can send in any order. Sequential will use only the absolute first TX mailbox when sending ordered frames :)
Also...
can you try a different tranceiver? I've blasted 1Kbyte arrays with TeensyCAN with CRC validation, if frames were missing it,ll never reconstruct the array at other node, pass the CRC, and fire a callback
did you try changing the clock? all teensy flexcan libraries (can2.0) use the same calculation script, try it with different clocks (setClock()) and try your baudrates with the new clock.
teensy 3.x clock was 16MHz,...
the background handler runs in parallel with the interrupt callback (with or without events(events is for sketch callback which uses queues))
so just removing events() will make your own callback fire directly...
are you having issues transmitting or receiving the lost frames? you can play with the queues in constructor to find out?
Try using setClock() to configure the controller to use 60MHz peripheral clock (as opposed to...
you can try setClock() method, older teensies ran at 16mhz osc clock i believe, t4 runs at 24mhz osc by default, you can go up to 60MHz peripheral clock if needed. I am using 60MHz accross 3 busses, 2 busses at 500kbps...
could it be possible the dynamic memory allocation "new" being called in the loop in multiple functions (also within a for loop) may be eating up the ram? have you checked if the heap is decreasing?
maybe the lcd code is slowing things down?, also if can.events() is in the loop(), remove it. The callback will fire directly rather than use the queues.
i guess there is 3 modes to flexcan_t4,
polling: read()...
On Teensy 3.2/3.5, you have CAN0
On Teensy 3.6, you have CAN0 and CAN1
on Teensy 4.0/4.1, you have CAN1,CAN2, and CAN3.
It's based on the hardware layout names on the controller as per the RM. In the case of T4.x...
try using the FlexCAN_T4 example, and put in the constructor CAN0 since you are using teensy 3.5. See if anything changes, it is more recent than IFCT
Also you will miss frames if your loop is doing alot of work....
the amount of mailboxes you have doesn't have anything to do with long messages, you would have to write a protocol that would take the received frames and reassemble them as theyre streaming, and split up your data to...
MB is mailbox. That is a user modified demo that was contributed but setMBFilterProcessing is an internal function to the library and not meant for user sketch. Anyways, you shouldn't start off with filtering if your...
i've ran it for several years in automotive field. thermal runaway is not the issue of stability, bad programming is. also don't try sourcing power from gpios, and running an inline resistor to protect the gpio is a...
it sounds like the UNO is ACKing because teensy can't, which could be a transceiver compatibility issue. Some transceivers were posted not working properly. If teensy seems to be getting values consistantly properly...
in your loop your constantly calling read() but not using it's return (1). you really should use
if ( Can0.read(msg) ) {
// do whatever with a read message
}
failing to do that you'll likely see it spewing...
Sorry i am at work. periodically check mailboxStatus() to see if the transmit mailboxes all show full. if that is the case you either have a connection problem with the transceiver or termination not at the endpoint...
define crashing? do you see CAN traffic? your connections okay? you probably didn't see the startup prints due to no delay in setup(), but if your not connected to CAN properly the rest of the loop won't work
what does mailboxStatus() show? if it assigned 8 transmit mailboxes that probably explains why. I forgot what the default is (hopefully 16?) where 4 are STD, 4 EXT, and 8 TX. If so you can increase the mailboxes (up to...
I just added transmit callback support. It is same as onReceive, just use onTransmit(MB8, callback) (mailbox specific) or onTransmit(callback) (global). The demo canSniff function can be used as a callback for...
Lets rule out the software, put this on both your Teensy 3.6's pins 34 and 35, itll read and write to the bus and both serial monitors will be scrolling data
#include <FlexCAN_T4.h>
FlexCAN_T4<CAN1, RX_SIZE_256,...
1) set boards manager to 3.2
2) select FlexCAN_T4 example FIFO with interrupt
3) in the example make sure CAN0 is set in the FlexCAN_T4 constructor
should be fine