Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: Custom Teensy 3.6 - K66 not booting

  1. #1
    Junior Member
    Join Date
    Aug 2015
    Posts
    15

    Custom Teensy 3.6 - K66 not booting

    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.
    Click image for larger version. 

Name:	LO controller board 1.jpg 
Views:	22 
Size:	166.1 KB 
ID:	16773

    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
    Click image for larger version. 

Name:	LO controller board waveforms 1.jpg 
Views:	10 
Size:	50.9 KB 
ID:	16774

    Zooming in on the activity on TCLK and TMS
    Click image for larger version. 

Name:	LO controller board waveforms 2.jpg 
Views:	10 
Size:	64.7 KB 
ID:	16775

    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?

    Click image for larger version. 

Name:	LO controller board MKL04-K66 schematic.jpg 
Views:	24 
Size:	140.9 KB 
ID:	16776

  2. #2
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    VBAT needs to be connected - it is unclear from your schematic if it has power.

  3. #3
    Junior Member
    Join Date
    Aug 2015
    Posts
    15
    Quote Originally Posted by Frank B View Post
    VBAT needs to be connected - it is unclear from your schematic if it has power.
    VBAT is powered through a PMEG40T10ERX schottky diode from the main 3.3V. Verified that the VBAT voltage is 3.28V
    Click image for larger version. 

Name:	LO controller schematic VBAT.jpg 
Views:	10 
Size:	67.8 KB 
ID:	16778

  4. #4
    Senior Member
    Join Date
    Oct 2014
    Posts
    167
    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.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,344
    Quote Originally Posted by Ishkabbible View Post
    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.

  6. #6
    Junior Member
    Join Date
    Aug 2015
    Posts
    15

    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?

    Click image for larger version. 

Name:	LO controller blinky OFF.jpg 
Views:	11 
Size:	99.3 KB 
ID:	16781 Click image for larger version. 

Name:	LO controller blinky ON.jpg 
Views:	8 
Size:	127.2 KB 
ID:	16782

  7. #7
    Junior Member
    Join Date
    Aug 2015
    Posts
    15
    Quote Originally Posted by PaulStoffregen View Post
    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.
    Thanks Paul - you answered my question while I was typing.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,344
    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.

  9. #9
    Junior Member
    Join Date
    Aug 2015
    Posts
    15
    Quote Originally Posted by PaulStoffregen View Post
    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...).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •