Teensy 4.1 Serial port dissappears with out of range EXTEM definition

strud

Well-known member
I've been working on a data logger project of late which uses an external 24 bit ADC connected by SPI and writing this to the QSPI connected RAM that can be added to the Teensy 4.1.

This was going surprisingly well for some time and I've got it running with 4 differential channels sampling at 32kHz and writing to the PSRAM nicely.

During the process of adding the SD card interface for storing the data as a file, I had accidentally increased the size of my 'big array' to 4000000 element of long int (ie 16M elements) ...... up from 1000000 that was working nicely. 2000000 long ints als work fine.

The interesting result of this was after flashing the hex file, the com port would no longer appear in either VS Code or Arduino ie unable to open a terminal


My question - Is it as simple as the code falling over so badly that the USB port functionality dissapears? What mechanism is likely at play?

Could it be the EXTMEM funcionality falls over since there is no 2nd PSRAM chip installed?
 
My question - Is it as simple as the code falling over so badly that the USB port functionality dissapears? What mechanism is likely at play?

It sure could be. Hypothetically, if it faults or leaves interrupts off while USB enumeration is still in progress, your PC won't be able to detect the USB device and load drivers.

Usually this is pretty easy to diagnose, just add a 6 second delay before your program does anything, to allow enough time for USB enumeration to complete.

Maybe also add this at the beginning of your program, before that delay.

Code:
  Serial.begin(9600);
  if (CrashReport) Serial.println(CrashReport);
 
Back
Top