This initial release is a remodeled design of IFCT built from the ground up. In it's base format currently, features and enhancements will be added later on in future once more tests are completed. Here are the current features:
CAN2.0 currently supported, FD later on...
1) User instantiated templated class object working on both bus interfaces using user named objects.
This allows in-sketch user definable RX and TX queue size adjustments!
2) FIFO support with up to 128 filter support, as well as up to 64 mailbox capability. FIFO Tables implemented are Table A and B, C and D are not necessary and quite unusual with partial masking.
3) Automatic Filtering, which supports all mailboxes and 128 filters provided in the FIFO.
4) On Beta1 of Teensy, pins 0 and 1 are used for CAN2, pins 22 and 23 are used for CAN1.
5) The initialized clock for the flexcan controller is defaulted to 24MHz oscillator in the library. You can change it to up to 60MHz during runtime using:
6) Transmit and reception queues are supported, including sequential frames.
7) Loop based callback firing via dequeue (Can0.events()). Should threading/timer support be added, they would work as well.
8) Up to 64 mailbox callbacks can be used. If FIFO is used, MB0 callback will be assigned and fired for reception, as FIFO occupies the first mailbox onwards till end of FIFO map.
More work to do!
https://github.com/tonton81/FlexCAN_T4
I'd also like to thank Mike for contributing and bug checks to this and many other libraries he has helped work on
Tony
CAN2.0 currently supported, FD later on...
1) User instantiated templated class object working on both bus interfaces using user named objects.
This allows in-sketch user definable RX and TX queue size adjustments!
Code:
FlexCAN_T4<[COLOR="#FF0000"]CAN1[/COLOR], [COLOR="#A52A2A"]RX_SIZE_256[/COLOR], [COLOR="#A52A2A"]TX_SIZE_16[/COLOR]> [COLOR="#0000CD"]Can0[/COLOR];
FlexCAN_T4<[COLOR="#FF0000"]CAN2[/COLOR], [COLOR="#A52A2A"]RX_SIZE_256[/COLOR], [COLOR="#A52A2A"]TX_SIZE_16[/COLOR]> [COLOR="#0000CD"]Can1[/COLOR];
2) FIFO support with up to 128 filter support, as well as up to 64 mailbox capability. FIFO Tables implemented are Table A and B, C and D are not necessary and quite unusual with partial masking.
3) Automatic Filtering, which supports all mailboxes and 128 filters provided in the FIFO.
4) On Beta1 of Teensy, pins 0 and 1 are used for CAN2, pins 22 and 23 are used for CAN1.
5) The initialized clock for the flexcan controller is defaulted to 24MHz oscillator in the library. You can change it to up to 60MHz during runtime using:
Code:
Can0.setClock(CLK_60MHz);
6) Transmit and reception queues are supported, including sequential frames.
7) Loop based callback firing via dequeue (Can0.events()). Should threading/timer support be added, they would work as well.
8) Up to 64 mailbox callbacks can be used. If FIFO is used, MB0 callback will be assigned and fired for reception, as FIFO occupies the first mailbox onwards till end of FIFO map.
More work to do!
https://github.com/tonton81/FlexCAN_T4
I'd also like to thank Mike for contributing and bug checks to this and many other libraries he has helped work on
Tony
Last edited: