lucas14145
New member
Hello,
I am having an issue where my Teensy 4.1 hangs when CanBus.begin() is called from the FlexCAN_T4 library. The loop() function is never reached.
I have performed extensive debugging:
Given that this fails across multiple boards and multiple computers, this seems to be a potential bug in the core library or Teensyduino core for the T4.1. I have also tried different USB cables.
Any ideas would be greatly appreciated.
Lucas
I am having an issue where my Teensy 4.1 hangs when CanBus.begin() is called from the FlexCAN_T4 library. The loop() function is never reached.
I have performed extensive debugging:
- The issue occurs on two different Teensy 4.1 boards.
- The issue occurs on two different computers, one with a completely fresh install of the latest Arduino IDE and Teensyduino.
- The issue occurs with a minimal internal loopback test sketch, with no external hardware connected.
- The issue persists with a polling-based loopback sketch, removing interrupts as a variable.
Code:
#include <FlexCAN_T4.h>
FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> CanBus;
void setup() {
Serial.begin(115200);
while (!Serial) { }
delay(1000);
Serial.println("Teensy 4.1 - Simplified Internal Loopback Test");
CanBus.setBaudRate(500000);
CanBus.enableLoopBack(true);
CanBus.begin(); // Program hangs here
}
void loop() {
Serial.println("This message is never printed.");
delay(2000);
}
Given that this fails across multiple boards and multiple computers, this seems to be a potential bug in the core library or Teensyduino core for the T4.1. I have also tried different USB cables.
Any ideas would be greatly appreciated.
Lucas