• Week 278

    23 April 2018

    Firing all cylinders this week, with a full slate of work and good progress.

    A day on Selworthy spent discussing infrastructure with the team, fixing some minor issues, and continuing the work last week on replacing a key video library.

    Several days on Selside with the Sensible Object team. Lots of features added including on-the-fly transcoding, helping the content team preview that transcoding, working to integrate the management tool with development, and chatting to the audio and content teams about quality-of-life improvements. It’s really become an end-to-end tool already, which is great – what it needed to be – and it was satisfying when, after a lot of measuring twice before I cut once, we successfully back-transcoded all the files that had been uploaded before I added that functionality.

    After last week’s slightly unsatisfying end to the week on the Longcrag R&D, this week was much more successful. On Monday I sat down with a hot-air gun to debug the shorts on the board I’d made last Friday, and sure enough, it was paste that had flowed under the chip. So I started fresh, using the Makerversity stereo microscope to triple-check my work. The microscope helped, but now I’m definitely happier about soldering QFP packages by hand! I added the few patch wires I knew I needed, and still no joy.

    I returned to the EFM32 datasheet. Bear in mind that when we say ‘datasheet’ for a 32-bit microcontroller, these things can be hundreds to thousands of pages long. Anyhow, early on, it was made clear that regardless of whether or not I was using the ADC, I needed to be supplying the analog voltage reference with power as well for the chip to even function. I was a bit stumped on how to do that – the two pins weren’t connected to anything. It looked like it was time to tweak the board layout and order a new prototype.

    After bashing heads with a friend on Friday lunchtime, I realised that we could just bridge a whole pile of pins on the south-side of the chip to connect the AVDD pins to VCC. So one more big blob of solder… and all of a sudden, the J-Link I’d connected to the headers I’d broken out detected the chip. One click from the Silicon Labs IDE and the code was flashed to the chip.

    This was hugely exciting, and I quickly populated all the remaining parts on the board to confirm functionality. Sure enough, everything worked as expected: backwards. I’d added transistors to all the outputs for protection and to lift the voltage… so all my outputs that were driving them high now needed to drive them low. I rewrote some code, and it just compiled, flashed to the board… and worked first time.

    After Monday’s debugging, Friday’s fixes were only an hour or so after office hours, but hugely successful: I had confirmation that, largely, the board layout was fine and the only issues were my understandings of MCU power requirements. I had the confirmation that my code works, and the confirmation that my custom programming header was fine. I also had confirmation that for all the pain points, this was definitely the best 32-bit MCU environment for my needs for now – I was seriously considering junking all this and moving to STM32.

    So now the board looks like this:

    Photo 20 04 2018 18 34 54

    …and it works. All those jumper wires and that huge solder blob at the bottom of the chip are my fixes and patches – what hardware bugfixing looks like!

    Whilst last week’s R&D was frustrating, I know that the plan of attack I formulated for Monday was the right one, and as expected, it was a minor error on my part that was leading to major frustration. Firmware and hardware always demand a calmer mind on my part, and good to see it paid off. And, best of all: I immediately know what the next steps are, and I have the platform to build upon.

    So: some successful days of client work, and an eventually-successful period of R&D with some good learnings; that feels like a strong week.