Teensy 4.1 external oscillator

Status
Not open for further replies.

vmauery

New member
I am trying to build a GPSDO around a Teensy 4.1. Part of the design was to have the teensy running on a coherent clock from the GPSDO. So I have GPS disciplining a 10MHz OCXO, the output of which is going to a TI cdce913 to generate, among other things, a 24MHz signal. This is all working fine. I have examined the clock with an oscilloscope and found it to be reasonable. So I took the next step of removing the 24MHz crystal from the Teensy and soldering a wire to the appropriate pad on the board to get to the XTALI pin. I crossed my fingers and powered it on. I hit the reset button and was able to program it. Success!

After using it in this manner for a while though, things have gone off the rails. I am not sure exactly what went south, but I suspect bad grounding or ground loops or something. I have a ttl-3v3 usb serial converter connected to LPUART1, the Teensy getting power from an external power supply via Vin (with the bridge cut, of course). The GPS device was connected via LPUART6. The Teensy was also connected via USB for programming and virtual UART connections. But after a day or so, I started seeing weird behavior, like serial port data garbled and the Teensy failing to boot and my PC's USB went belly up and I had to reboot it. So some weird stuff is at play here and I am not sure what to pin it down to.

Now, that particular Teensy (one of two) is in time-out because it has stopped working altogether. I can hit the reset button and the teensy loader can program it, but it never boots, even the most basic programs. Holding the reset to put it back to the factory state works; I can get the 1/2 Hz blinker, but none of my programs work on this board anymore (despite running on the unmodified board.

I am very wary of trying to modify the second board, but then again, I have a sneaking suspicion that it was not the external oscillator that was the problem, but rather some grounding issues between the Teensy and the various USB connections. I also don't want to burn out number two the same way, so I have removed as many USB things as I can and have double checked all the ground/power connections on the breadboard.

Does anyone have any great ideas on what I can do to debug number one? I am stumped. I see from the wiring that the tiny arm core handling the reset button controls the jtag port on the larger core. Does that mean it also exposes a debugger?

Any help would be greatly appreciated.

Image showing pad location where I connected the external oscillator.
20200922_135932.jpg

Image showing Teensy one with a MEMS 24MHz oscillator attached.
20200922_135706.jpg

Image showing my messy prototype setup (more for fun than any informative information)
20200922_135648.jpg
 
Holding the reset to put it back to the factory state works; I can get the 1/2 Hz blinker

While it's blinking the orange LED, does Arduino detect it and show it as RawHID in the Tools > Ports menu?

And does Upload work without needing the press the button (indicating Teensy was able to hear the request over USB to go into programming mode)?
 
I have been using the NXP SDK (glutton for punishment?) instead of the Arduino environment. But when it is running the factory blinker, I see these messages:
[551025.700885] usb 2-1.1.2: new high-speed USB device number 63 using ehci-pci
[551025.809671] usb 2-1.1.2: New USB device found, idVendor=16c0, idProduct=0486, bcdDevice= 2.80
[551025.809673] usb 2-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[551025.809674] usb 2-1.1.2: Product: Teensyduino RawHID
[551025.809675] usb 2-1.1.2: Manufacturer: Teensyduino
[551025.809676] usb 2-1.1.2: SerialNumber: 8001600
[551025.810622] hid-generic 0003:16C0:0486.00B5: hiddev3,hidraw9: USB HID v1.11 Device [Teensyduino Teensyduino RawHID] on usb-0000:00:1d.0-1.1.2/input0
[551025.811295] hid-generic 0003:16C0:0486.00B6: hidraw10: USB HID v1.11 Device [Teensyduino Teensyduino RawHID] on usb-0000:00:1d.0-1.1.2/input1

When the orange blinker is running, the hidraw device does allow arduino to upload a program.

And the program I uploaded seems to be working (lwip_echosrv). But then I went back to the nxp environment and that program won't run. But it runs fine on teensy two. And the lwip_echosrv runs fine on teensy two as well....

Maybe the Teensy one is running on the edge of okay, but the arduino code does a better job of initializing hardware than the nxp code?
 
Status
Not open for further replies.
Back
Top