-
Older Activity
-
Yesterday, 03:43 PM
Shouldn't you set the filter only after running begin()?
15 replies | 824 view(s)
-
01-24-2021, 05:30 PM
for ordered frames you need FIFO, otherwise you'll have to build your own frame re-assembly code for multiframe (you can build both ways, but FIFO would make the rebuilding easier, also remove events() from the loop().
499 replies | 42542 view(s)
-
01-23-2021, 08:54 PM
Yeah, that would require defining CAN2, CAN3, asserts should work as is:
typedef enum CAN_DEV_TABLE {
#if defined(__IMXRT1062__)
CAN0 = (uint32_t)0x0, <------------- This was added to support the...
499 replies | 42542 view(s)
-
01-23-2021, 08:37 PM
You can try this?
added checks:
#if defined(__MK20DX256__) || defined(__MK64FX512__)
static_assert(_bus == CAN0, "Only CAN0 works on Teensy 3.2/3.5");
#endif
#if defined(__MK66FX1M0__)
499 replies | 42542 view(s)
-
01-23-2021, 08:09 PM
Indeed, it compiled in the arduino IDE as well I see, I just don't wanna add much code bloat. Going ahead after compilation should result in undefined behaviour though should the wrong one be used. I suppose a cleaner...
499 replies | 42542 view(s)
-
01-23-2021, 07:55 PM
for the define, thats just a pointer, _CAN1 wont compile on T3.2 anyways
FIFO allows ordered receptions, mailboxes can receive in any order as long as a slot is empty. you can have FIFO and mailboxes combined for...
499 replies | 42542 view(s)
-
01-23-2021, 05:04 PM
Can you try this patch? Originally it only supported 31 mailboxes max, as Teensy 3.x had 16 mailboxes, bit 31 was used for the global handler. Now it should support up to 64 mailboxes with a general handler.
Also if...
499 replies | 42542 view(s)
-
01-23-2021, 02:48 PM
sorry i dont understand how that works, but maybe i can look at how Collin did it and see if i can port it over
499 replies | 42542 view(s)
-
01-23-2021, 03:07 AM
just add this to your library after including flexcan header:
void ext_output1(const CAN_message_t &msg) {
//do whatever with message
}
and enable MB/FIFO interrupts in setup, the function will receive all...
499 replies | 42542 view(s)
-
01-22-2021, 03:30 AM
are you on the latest github version? if not try that out
2 replies | 92 view(s)
-
01-21-2021, 03:21 PM
dont set filters BEFORE calling enableFIFO
and by the way.....
msg.id == 0x18DAF111 & msg.buf == 0x41 & msg.buf
& is not && :)
essentially you are asking:
499 replies | 42542 view(s)
-
01-21-2021, 03:03 AM
only pitfall may be the SD latency if any. What most people do is fill a 512 buffer in ram then write that to SD while you continue logging to a different 512 buffer. You can do this with a standard array, or the...
499 replies | 42542 view(s)
-
01-19-2021, 05:12 PM
remove EXT from setMBFilter (that function doesn't use that), remove events() from loop, and you enabled FIFO last in setup, which makes your filters not effective, also MB7 is a TX mailbox, so that function never runs...
499 replies | 42542 view(s)
-
01-18-2021, 03:49 PM
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...
499 replies | 42542 view(s)
-
01-18-2021, 03:32 PM
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...
499 replies | 42542 view(s)
-
01-18-2021, 03:10 PM
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...
499 replies | 42542 view(s)
-
01-17-2021, 03:21 PM
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.
499 replies | 42542 view(s)
-
01-17-2021, 03:13 PM
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...
499 replies | 42542 view(s)
-
01-12-2021, 03:34 AM
no, it's pulled in manually by paul, i think its because i dont have a library config file or have it on Library manager
22 replies | 500 view(s)
-
01-11-2021, 06:38 PM
thats cool, but thats 24 TX mailboxes when seq is only using 1 in FIFO mode, I think the higher queues and interrupt helped with ordered transfers
22 replies | 500 view(s)
-
01-11-2021, 06:31 PM
sounds like a timing issue, try adding a delay in setup somewhere before begin() is called
33 replies | 1963 view(s)
-
01-11-2021, 02:55 PM
try to use a different pin, like the original SPI bus pin 10, you shouldn't need to change pins for it to work
33 replies | 1963 view(s)
-
01-11-2021, 02:25 PM
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...
33 replies | 1963 view(s)
-
01-11-2021, 11:51 AM
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
33 replies | 1963 view(s)
-
01-11-2021, 11:17 AM
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
33 replies | 1963 view(s)
-
01-11-2021, 11:09 AM
what SPI pins you using?
33 replies | 1963 view(s)
-
01-11-2021, 10:17 AM
example in first post, constructor is using 10 for CS, you would use 37
33 replies | 1963 view(s)
-
01-11-2021, 08:46 AM
1 2 3 4 5 6 7 8
push front 9 will become:
9 1 2 3 4 5 6 7 8
push back 6 will become:
9 1 2 3 4 5 6 7 8 6
pop front returns 9, your data becomes:
1 2 3 4 5 6 7 8 6
pop back returns 6, your data becomes:
1 2 3 4...
191 replies | 19140 view(s)
-
01-11-2021, 08:35 AM
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
10 replies | 314 view(s)
-
01-11-2021, 08:26 AM
pushing back puts your data at the end. popping front pulls data from the front (oldest)
this is why you can do FIFO/LIFO
191 replies | 19140 view(s)
-
01-09-2021, 06:13 AM
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?)
3 replies | 98 view(s)
-
01-08-2021, 06:57 PM
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...
22 replies | 500 view(s)
-
01-08-2021, 03:23 AM
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...
22 replies | 500 view(s)
-
01-07-2021, 10:47 AM
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...
9 replies | 266 view(s)
-
01-06-2021, 07:58 AM
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!
9 replies | 266 view(s)
-
01-06-2021, 07:38 AM
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...
22 replies | 500 view(s)
-
01-05-2021, 07:20 PM
toggle a led in your loop() to make sure the loop() is still running, also check your CAN lines are terminated
9 replies | 266 view(s)
-
01-05-2021, 03:10 AM
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
22 replies | 500 view(s)
-
01-05-2021, 03:03 AM
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,...
499 replies | 42542 view(s)
-
01-03-2021, 11:41 PM
you mean like 33,333 and 10? it works but all nodes must match
499 replies | 42542 view(s)
-
01-02-2021, 11:45 PM
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...
22 replies | 500 view(s)
-
01-02-2021, 10:35 PM
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...
22 replies | 500 view(s)
-
01-02-2021, 04:39 PM
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...
499 replies | 42542 view(s)
-
12-28-2020, 03:59 PM
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?
6 replies | 282 view(s)
-
12-27-2020, 03:38 AM
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()...
211 replies | 24013 view(s)
-
12-27-2020, 01:49 AM
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...
3 replies | 174 view(s)
-
12-27-2020, 01:31 AM
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....
211 replies | 24013 view(s)
-
12-23-2020, 03:24 AM
Tim, don't forget to check your Junk mail (spam pun intended) :P
17 replies | 585 view(s)
-
12-17-2020, 03:36 PM
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...
499 replies | 42542 view(s)
-
12-16-2020, 04:20 PM
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...
499 replies | 42542 view(s)
-
12-16-2020, 03:39 PM
a mailbox is like a hardware queue slot. each slot (mailbox) holds a CAN frame, so the MCU can read the frames from them
499 replies | 42542 view(s)
-
12-15-2020, 03:04 AM
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...
10 replies | 490 view(s)
-
12-12-2020, 06:31 PM
https://forum.pjrc.com/threads/56035-FlexCAN_T4-FlexCAN-for-Teensy-4?p=237283&viewfull=1#post237283
499 replies | 42542 view(s)
-
12-12-2020, 02:32 PM
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...
499 replies | 42542 view(s)
-
12-12-2020, 03:13 AM
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...
499 replies | 42542 view(s)
-
12-11-2020, 03:51 PM
check your CAN termination, if you got 1 frame and it stopped it may not be ACKing the megasquirt
499 replies | 42542 view(s)
-
12-11-2020, 03:01 AM
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...
499 replies | 42542 view(s)
-
12-10-2020, 04:30 PM
pins 3 (TX) and 4 (RX) on Teensy 3.2 card
499 replies | 42542 view(s)
-
12-10-2020, 04:21 PM
Busses:
Teensy 3.2: CAN0
Teensy 3.5: CAN0
Teensy 3.6: CAN0, CAN1
Teensy 4.0/4.1: CAN1, CAN2, CAN3
499 replies | 42542 view(s)
-
12-10-2020, 04:18 PM
pin13 should definately turn on, but, you did mention you are on Teensy 3.2 :)
change CAN1 in constructor to CAN0
499 replies | 42542 view(s)
-
12-10-2020, 03:45 PM
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
499 replies | 42542 view(s)
-
12-10-2020, 03:35 AM
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...
499 replies | 42542 view(s)
-
12-07-2020, 02:38 AM
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...
499 replies | 42542 view(s)
-
11-29-2020, 03:30 AM
Serial1 is UART, Serial is SerialUSB
9 replies | 461 view(s)