Possible connection issue between MKL02 and MKL26 on Teensy LC

Status
Not open for further replies.

vince.cimo

Well-known member
Hi guys. I have a custom Teensy LC implementation using your bootloader chips and am having issues getting the board to be detected via USB. Here's what I've got going on:

1. Probing the reset pin with my scope, I temporarily pull PTB2 on the MKL02 to ground.
2. I can see the MKL26 restarting and every once in a while will go high for a second, then sometimes go low and stay low until I re-plug in the USB.
3. So far every board (i've tried 5 boards), eventually works...the reset pin goes high, then stays high and the port shows up on the USB bus, but some of these boards are taking 20 minutes of fiddling around with the PTB2->MKL02 connection before I get a successful programming of the MKL26.
4. After this initial setup, the boards seem to reliably be able to be programmed via the usb connection.

Does this sound like I have noise on my PTA0 & PTA3 pins (clock and data pin connecting the MKL26 & MKL02)? Is there anything I can check out with a scope to confirm this?

I'm about to order a batch of 200 of these boards and it's going to be a real bummer if I have to sit for 20 minutes and fiddle with each one before I can get a reliable USB connection...

I'm attaching a screencap of my board layout. Screen Shot 2019-02-14 at 12.34.21 PM.jpgScreen Shot 2019-02-14 at 12.34.30 PM.jpg
 
Anyone wanna take a crack at this? I'm still pretty perplexed...from what I can gather, I should just have to connect the USB power, then ground the PTB2 for a second, and the port should show up, correct?

Hi guys. I have a custom Teensy LC implementation using your bootloader chips and am having issues getting the board to be detected via USB. Here's what I've got going on:

1. Probing the reset pin with my scope, I temporarily pull PTB2 on the MKL02 to ground.
2. I can see the MKL26 restarting and every once in a while will go high for a second, then sometimes go low and stay low until I re-plug in the USB.
3. So far every board (i've tried 5 boards), eventually works...the reset pin goes high, then stays high and the port shows up on the USB bus, but some of these boards are taking 20 minutes of fiddling around with the PTB2->MKL02 connection before I get a successful programming of the MKL26.
4. After this initial setup, the boards seem to reliably be able to be programmed via the usb connection.

Does this sound like I have noise on my PTA0 & PTA3 pins (clock and data pin connecting the MKL26 & MKL02)? Is there anything I can check out with a scope to confirm this?

I'm about to order a batch of 200 of these boards and it's going to be a real bummer if I have to sit for 20 minutes and fiddle with each one before I can get a reliable USB connection...

I'm attaching a screencap of my board layout.View attachment 15908View attachment 15909
 
Can you watch the RESET signal while you're doing this? When you pull PROGRAM (PTB2 on the MKL02 chip) low, RESET is supposed to go low and remain low as long as PROGRAM is low.

Another question: do you have ceramic decoupling capacitors between 3.3V and GND? I don't see any, at least in this small part of your PCB. Normally a 0.1uF ceramic (X7R type) capacitor is placed as close as reasonably possible to each VCC & GND pair of pins on the chip.

Normally you could place one of these capacitors very close to pins 22 & 23 (VCC & GND). If you're working with these existing boards, maybe scrape away some of the solder mask and try to surface solder (to the exposed metal of the trace and GND via) a 603 or smaller capacitor where I've added this yellow rectangle.

pcb.jpg

Locating these small ceramic capacitor very close to the VCC & GND pins is critically important for your board to run reliably. These capacitors need to be ceramic types which are physically small, for low inductance. They need to have short traces close together (minimizing loop area) so the chip is able to get a low impedance source of power at the high frequency needed while it's running. If the capacitors are located far away on your PCB, the chip will be starved for power at very high frequencies, due to the trace inductance.
 
Can you watch the RESET signal while you're doing this? When you pull PROGRAM (PTB2 on the MKL02 chip) low, RESET is supposed to go low and remain low as long as PROGRAM is low.

Another question: do you have ceramic decoupling capacitors between 3.3V and GND? I don't see any, at least in this small part of your PCB. Normally a 0.1uF ceramic (X7R type) capacitor is placed as close as reasonably possible to each VCC & GND pair of pins on the chip.

Normally you could place one of these capacitors very close to pins 22 & 23 (VCC & GND). If you're working with these existing boards, maybe scrape away some of the solder mask and try to surface solder (to the exposed metal of the trace and GND via) a 603 or smaller capacitor where I've added this yellow rectangle.

View attachment 15911

Locating these small ceramic capacitor very close to the VCC & GND pins is critically important for your board to run reliably. These capacitors need to be ceramic types which are physically small, for low inductance. They need to have short traces close together (minimizing loop area) so the chip is able to get a low impedance source of power at the high frequency needed while it's running. If the capacitors are located far away on your PCB, the chip will be starved for power at very high frequencies, due to the trace inductance.

Hey Paul, my decoupling caps are right to the left of the MKL26. I'm using (https://www.digikey.com/product-detail/en/wurth-electronics-inc/885012206071/732-7989-1-ND/5454616). I have 3 .1uf and 1 2.2uf caps for decoupling, attempting to directly match the Teensy LC schematic. They are connected to pin 22 via the via just below the MKL26. should I re-layout this area and try to remove the via? I'm not sure if inductance will be too high with this signal path.

This may be as simple as me not knowing the initialization procedure on new boards. According to this (http://www.appfruits.com/2015/03/building-your-own-custom-teensy/), it sounds like I have to pull PROGRAM to low, then wait a second, then pull PROGRAM to low again. I may have been missing that 'wait and then pull again' step if that's the case.

Also, I'm wondering if my ground plane design may be contributing to inductance issues causing intermittent behavior. Is it best to have a monolithic ground plane with copper only etched where components and traces lie (with 15-20mil clearance), or should I use a star grounding technique and separate copper pours?Screen Shot 2019-02-15 at 9.01.41 AM.jpgScreen Shot 2019-02-15 at 9.01.16 AM.jpgScreen Shot 2019-02-15 at 9.01.49 AM.jpgScreen Shot 2019-02-15 at 9.41.21 AM.jpg
 
Hey Paul, my decoupling caps are right to the left of the MKL26. I'm using (https://www.digikey.com/product-detail/en/wurth-electronics-inc/885012206071/732-7989-1-ND/5454616). I have 3 .1uf and 1 2.2uf caps for decoupling, attempting to directly match the Teensy LC schematic. They are connected to pin 22 via the via just below the MKL26. should I re-layout this area and try to remove the via? I'm not sure if inductance will be too high with this signal path.

This may be as simple as me not knowing the initialization procedure on new boards. According to this (http://www.appfruits.com/2015/03/building-your-own-custom-teensy/), it sounds like I have to pull PROGRAM to low, then wait a second, then pull PROGRAM to low again. I may have been missing that 'wait and then pull again' step if that's the case.

Also, I'm wondering if my ground plane design may be contributing to inductance issues causing intermittent behavior. Is it best to have a monolithic ground plane with copper only etched where components and traces lie (with 15-20mil clearance), or should I use a star grounding technique and separate copper pours?View attachment 15914View attachment 15915View attachment 15916View attachment 15917


Any feedback on this? I've since moved the capacitor to the area you recommended for my next rev. board, but would like to know if my ground plane design is also a potential cause for concern.
 
Hey Paul, my decoupling caps are right to the left of the MKL26. .... I have 3 .1uf and 1 2.2uf caps for decoupling, attempting to directly match the Teensy LC schematic.

You might as well using only a single 0.1 uF with this poor layout choice. There's no point to have 3 of these capacitor in parallel if they are all in the same location. The purpose of 3 separate capacitors is to locate each as close as possible to a VCC & GND pair of pins. Merely duplicating the schematic is not good enough. Those capacitors are pretty much no value if they're not located close the VCC & GND pins.


This may be as simple as me not knowing the initialization procedure on new boards. According to this (http://www.appfruits.com/2015/03/building-your-own-custom-teensy/), it sounds like I have to pull PROGRAM to low, then wait a second, then pull PROGRAM to low again. I may have been missing that 'wait and then pull again' step if that's the case.

No, only a single low pulse on PROGRAM is needed. If the hardware is good, it should go into bootloader mode within milliseconds. The main factor determining how long until Teensy Loader responds are delays in the PC side device drivers. On Macintosh and Linux and Windows 8 & 10, you should see about 1 second delay from the end of the pulse until Teensy Loader shows the board is present. On Windows 7 & XP, it can be in the 2-3 second range.


Also, I'm wondering if my ground plane design may be contributing to inductance issues causing intermittent behavior.

That isn't a ground plane. Don't fool yourself by calling it "plane". It's at best several small islands. As far as establishing a low impedance ground, it's probably no better than using traces.


Any feedback on this?

Did you try hacking one of your boards to solder a 0.1uF capacitor very close to pins 22 & 23, as I tried to recommend with that yellow rectangle?
 
You might as well using only a single 0.1 uF with this poor layout choice. There's no point to have 3 of these capacitor in parallel if they are all in the same location. The purpose of 3 separate capacitors is to locate each as close as possible to a VCC & GND pair of pins. Merely duplicating the schematic is not good enough. Those capacitors are pretty much no value if they're not located close the VCC & GND pins.




No, only a single low pulse on PROGRAM is needed. If the hardware is good, it should go into bootloader mode within milliseconds. The main factor determining how long until Teensy Loader responds are delays in the PC side device drivers. On Macintosh and Linux and Windows 8 & 10, you should see about 1 second delay from the end of the pulse until Teensy Loader shows the board is present. On Windows 7 & XP, it can be in the 2-3 second range.




That isn't a ground plane. Don't fool yourself by calling it "plane". It's at best several small islands. As far as establishing a low impedance ground, it's probably no better than using traces.




Did you try hacking one of your boards to solder a 0.1uF capacitor very close to pins 22 & 23, as I tried to recommend with that yellow rectangle?

Hey Paul, I'm waiting for a new soldering iron tip and haven't had a chance to hack the board yet. I did, however move things around a little bit for the next revision board. I moved one of the .1uf caps right next to pin 22, but the other filter caps seem to be about as close to the pins (1, 5 and 9 on the MKL26) as I can get them. Does this look reasonable? Sorry if it's a beginner question. I'm still getting my feet wet and the finer points of circuit board layout are a bit lost on me. Once again, the financial sense of doing this custom teensy board does not at all make sense, but it's a helluva good learning process. Also, is the fact that my ground plane is not ideal going to effect the reliability of the board? Any suggestions you have to improve that I'm all ears.Screen Shot 2019-02-16 at 10.06.55 AM.jpgScreen Shot 2019-02-16 at 10.06.41 AM.jpg
 
Status
Not open for further replies.
Back
Top