K7MDL2 / KEITHSDR

Teensy4.X with PJRC audio card Arduino based SDR Radio project.
54 stars 11 forks source link

USB Audio if used, stops working after some random time #12

Open K7MDL2 opened 1 year ago

K7MDL2 commented 1 year ago

When USB Audio and Serial is used for external app such as WSJTX, after some random time, hours to days, the USB function stops - no USB serial, no USB audio. The main program and analog audio continue on fine. This has been the same over a few revisions of Arduino and TeensyDuino. A program restart or power cycle is required to restore USB operation.

K7MDL2 commented 10 months ago

Bug is in the 48KHz audio code. If you skip the audio changes and just run at 44.1K default, AND set the FFT sample rate at 44.100KHz in the .ino, it seems to run for days or weeks OK. WSJT-X does not seem to notice the 44.1K vs 48K it desires.

You still will want to modify usb_dec.h to add the custom Serial+Serial+Audio USB type to you can have CAT and Debug output on their own serial ports. Also be sure to add the boards.local.txt, or for Visual Studio Code, add the boards.local.txt content to the main file boards.txt since it does not look at the local.txt file correctly (yet).