Custom Teensy 3.6 - K66 not booting

Status
Not open for further replies.
I am sending a couple of Teensys to the edge of space. Unfortunately, after thermal cycling a PJRC Teensy 3.6 I found cracks in some of the solder balls, so I have to go with a custom design using the QFP versions of the K66 and MKL04 chips.
LO controller board 1.jpg

However, when I power up the board, the PC does not recognize the board. Putting a scope on the USB data pins shows there is nothing happening. With the logic analyzer on the JTAG lines between the MKL04 and the K66, I see the MKL04 banging away on TCLK and TMS for almost 4mS, but nothing on the TDI or TDO lines. While this is happening, the RESET_B line is also pulsing positive with about a 70uS cadence.

This shows the grand sweep of time from when the +5 comes up
LO controller board waveforms 1.jpg

Zooming in on the activity on TCLK and TMS
LO controller board waveforms 2.jpg

I can't get to those signals on my real Teensy3.6 to do a comparison. Here is the pertinent part of the schematic. The POR circuit formed by U5 and U6 is to reset off-board peripherals. The 10K R4 prevents this circuit from pulling RESET_B high through D2, but allows RESET_B or BOARD_RESET# to force the peripherals into reset. The open drain driver U4 allows the main data computer on the other end of the USB cable to reprogram this board in flight. The CPU chip is a MK66FX1M0VLQ18 purchased from Digikey (568-13334-ND).
Note that all of the JTAG lines DO change state at various times during the boot sequence, so there are no stuck lines. I have verified a nice 16MHz sine wave on both sides of the crystal. The 3.3V power is nice and stable at 3.299V, and current draw is as expected.
Anyone see anything I've missed?

LO controller board MKL04-K66 schematic.jpg
 
PC will not see serial until you program something.
When I get a new board, hooking it up the PC see nothing.. I then program it, the teesy loader does its thing and walla, serial pops up. I then can use the loader to do the rest of my boards.

I looked over your schematic and the last one I did looks ok. But not sure if those buffers that you have connected do anything. The program/reset lines.
 
However, when I power up the board, the PC does not recognize the board.

Did you press the pushbutton, or otherwise pulse the Program signal low?

On a brand new board, no USB activity is the normal condition, until you give the bootloader chip a low pulse on the Program signal.
 
Mysteriously working now

I decided to see what the waveforms looked like when I pressed the PROG button. While I was pushing the button and adjusting the trigger program in the logic analyzer to capture the JTAG activity, on the Nth push (where N is more than 4 but probably less than 10) I heard a BEEP from the PC, the drivers loaded, the blinky program loaded, and everything just started working.

Is this typical behavior when dealing with a blank K66? Or do I have something flaky in my circuit that will bite me in the butt at 120,000 feet?

LO controller blinky OFF.jpg LO controller blinky ON.jpg
 
You should probably also keep in mind this behavior is expected if you ever load "bad" code. We make every Teensy with a pushbutton dedicated to entering programming mode, because your code running on the main chip can do pretty much anything, even turn off the USB hardware and stop the CPU. Automatic uploading from Arduino only works if the K66 is running previously written code which listens for the request to go into programming mode. If there is no prior code, or the prior code isn't listening for that special message on the USB port, then the pushbutton or some other way to pulse the Program pin low is needed.
 
You should probably also keep in mind this behavior is expected if you ever load "bad" code. We make every Teensy with a pushbutton dedicated to entering programming mode, because your code running on the main chip can do pretty much anything, even turn off the USB hardware and stop the CPU. Automatic uploading from Arduino only works if the K66 is running previously written code which listens for the request to go into programming mode. If there is no prior code, or the prior code isn't listening for that special message on the USB port, then the pushbutton or some other way to pulse the Program pin low is needed.

Thanks Paul. That is the purpose of U4 - the PROG_INPUT# line goes back to a GPIO on the main flight computer so it can virtually "push the PROG button" in case our Teensy code gets corrupted by a charged particle hit (or a sleep-discharged programmer hit...).
 
Status
Not open for further replies.
Back
Top