-
Never... Always check your appnotes.
03/25/2015 at 20:17 • 0 commentsGood news is at least half of the functionality of the board seems to work. I rigged it to the external debug port of a FRDM-KL25Z board and pyOCD was able to read out the IDCODE and bulk erase flash. The NMI_b (boot mode select) works as expected to force the bootloader to run after the flash is wiped, and RESET causes a USB disconnect on the host when in the bootloader. The only remaining untested bits are the UART and the LED, which need code to be checked out.
Bad news is I didn't research the software end carefully enough.
First mistake: although the tools for flashing in ROM bootloader mode (blhost) are open, they're Windows-only. I'd assumed that there was a Linux version, or that the bootloader (Kibble) talks plain old USB-DFU. Now my to-do list includes a Python reimplementation of blhost, which sounds like a fun project.
Second mistake: Most of the KLxx chips are supported in pyOCD with nearly the same code. This seems to be true for bulk erase. But for some reason I can't flash the target. I don't have time to look into this now, but in-circuit debug support would be nice for development.
Third mistake: I didn't have a binary to run yesterday, and was hoping that the mbed blinky code compiled for the KL25Z with the mbed online IDE would work. However the mbed build server was offline most of yesterday, and I didn't have the cycles to spend on generating a binary with alternate tools (and the right target). Yeah, TANSTAAFL and all. I also have serious doubts that the KL25Z build will work anyway due to the TBD's use of the internal oscillator, so it might be for the best.
At this point I'm happy that I haven't run into problems that point to board or reflow screwups.
-
Sketchy purchases at Home Depot
03/24/2015 at 17:02 • 0 commentsBits and pieces have been coming in the mail over the last couple of weeks. Finally yesterday the PCBs arrived, so naturally I had to get building.
Unfortunately I hadn't decided on how I was going to reflow the board. I considered one of the cheap death trap $50 hot air stations on eBay, but my bench is small and I'm partial to living in an uncombusted home. I could have picked up a well-regarded (as in: not entirely unsafe) Aoyue station for $100 at the local Fry's, but that was more than I wanted to spend on a merely passable tool. I didn't have time to search thrift shops for the perfect toaster to convert into a reflow oven. I suppose I could have bought a new one, but I get hung up on the allure of reusing an unloved appliance.
Then I stumbled on an old post on piclist mentioning success with butane soldering irons used as small heat guns for SMD work. The catalytic element is the key: it burns the butane at its surface instead of in an open flame, radiating heat while emitting a stream of hot exhaust. The downside is that there's no temperature or airflow control. I figured that I could put a thermocouple probe on the board surface and close the control loop myself.
So that's what I did. I bought a $20 butane iron at Home Depot, along with a cheap ceramic tile as a work surface. The guy at the checkout gave me a funny look, like I was preparing to do... something. Clearly I wasn't remodeling my kitchen or installing a new thermostat. Maybe I was one item short of getting on a watch list.
Anyway, the board soldering was a big success considering it was my first time using stencils and reflow. I set up the board in the jig and stencil, pasted it up, and taped it to the tile. Component placement was fairly easy with some new curved tweezers I bought along with the paste. Unfortunately I fumbled and lost the $0.80 LED, so I left that out for the moment.
I taped the thermocouple to the tile with the tip touching the PCB and fired up the torch. I started slowly, with the torch near its lowest setting, and constantly moving the air stream around the board. I used the torch distance as fine control over the temperature, and when it looked like the board was thoroughly soaked around 160C, I cranked up the torch and watched for the solder to melt while trying to keep the temperature around 240C for about a minute. After everything looked smooth and silvery, I gradually dialed back the torch in a lame attempt to gradually cool down the board.
The result was a reflowed QFN and four parts stuck down to the board on their pads. But the QFN had a solder blob between two pins, and one of the bypass caps wasn't making contact with a pad. The QFN blob was easily fixed with wick, and the cap replaced with an iron. The QFN was probably due to too much paste, so I'll work on my technique next time. The cap however was a silk problem: it looks like the silk was off slightly for the entire backside, and a marker in silk between the pads had partially covered one of the landings.
I found my missing LED stuck to some of the tape I used to secure the board, and added that as well as the 8 pin connector. Turns out that a 1.6mm thick board is way too thin to edge mount a dual row header, so I had to solder-blob one row of pins to the pads. I'm not concerned though, since this header is only for debugging.
I did basic continuity checks as much as I could and cleaned off flux from the hand soldering. By this time it was fairly late and I had to get up early for work today. No time for "Hello World!" but there is that USB bootloader.
I plugged it into my Linux PC and it enumerated on the first try!
Next step: blink an LED.
-
v0.1
03/18/2015 at 14:46 • 0 commentsThe hard requirement on this project is that it use the PCB as the USB contacts. This restricts the total height of the board + components to 2mm. The tallest components are currently the QFN and caps at 0.5mm. There are many PCB houses that will do thin boards (DirtyPCBs will do down to 0.6mm) but I didn't want to wait too long to find out my first pass was broken since this is my first time on KiCAD and using this particular micro.
So for the first board I left the underside of the connector end bare and put the components on a part of the PCB that sits outside the port. I added an edgemount header that brings out SWD, UART, reset, and boot mode select. I also added an LED off a GPIO because "Hello, world" on a micro is better that way. These changes let me get it fabbed at OSHPark which takes just a couple of weeks to get me a 1.7mm thick board. I also ordered a stencil (OSHStencils), paste, and components.
Still need to figure out what I'm going to use to reflow it. Hot air gun? Skillet? Maybe an excuse to make a reflow toaster?