Problem Programming Blank MK20DX256 with MKL04

Status
Not open for further replies.

KaDubb

New member
I've built a custom board with a MKL04 and MK20DX256. I tried to follow the design rules strictly, including Vbatt and the oscillator.

When I power up, the reset pulse is on the reset line as expected. No problem.

The program button drives reset low, then high.
The oscillator turns on; 16 MHz. There is no noise on the oscillator. The waveform looks just like a Teensy oscillator.
There is some data on USB P/M.

Cycling power at this point restarts this process.

So far, so good. It seems like a lot is correct so far. The MKL04 must be good, oscillator must be good (?), etc.

To program, I select Raw HID (Serial gives same result) from Arduino. The Upload process invariably causes a "Download Error" message when I try to load Blink and the processor resorts back to the reset pulse mode. A couple of times, a program loaded into flash, but it was not a working Blink. I'm guessing a corrupted Blink. I can download Blink to a genuine Teensy, no problem.

I suspect that the USB lines are not optimum, but I expected the USB lines to be pretty robust.

I can re-spin the boards with new USB routing, but I just wanted to toss this out for a sanity check first.

Anybody have any thoughts?
 
Wow, sounds like it's so very close to working.

You might investigate power supply issues. Several people have reported something else on their PCB interfering with the power enough to mess up the Teensy section of their board. I recall one recently where we never saw any detail like a schematic, layout or photos, but after spending way too much time on the oscillator it turned out to be power issues. I believe there was a mention of something oscillating with the USB cable, maybe making 20+ volts and destroying the MK20 chip. All sorts of crazy unknown things can happen on custom boards....

Anyway, before you go to a lot of trouble redoing the USB routing, try hacking up a board to run just the MK20 on "clean" power.
 
Status
Not open for further replies.
Back
Top