Close

First Successful Programming of MAX32660

A project log for MAX32660 Motion Co-Processor

Super-small, ultra-low-power 96 MHz Cortex M4F co-processor manages sensors and processes data allowing the MCU host attend to other things.

Kris WinerKris Winer 08/14/2018 at 01:297 Comments

August 13, 2018

As soon as we tried to program our custom MAX32660 motion co-processor board we knew we had a problem. The MAX32625 PICO DAP debugger which came with the MAX32660 evaluation kit and the MAX32625 PICO debugger we bought separately both interface with the MAX32660 target via a 2 x 5 SWD 0.05-inch connector, which of course, we didn't put on our tiny 0.7-inch x 0.5 inch breakout board; no room! We did expose SWDIO and SWDCLK as well as nRST on the breakout board edges. That is, we expected to have to use the SWD port to program our breakout. We just didn't think it would be so hard to do so.

First we tried to use the edge pins on the MAX32625 debugger which are supposed to connect to SWD and nRST, etc but we couldn't make this work. Not sure why. Programming via the SWD connector did work on the evaluation board so we ordered some SWD cable breakout boards from Adafruit (faster than making our own), which allowed access to all of the SWD signals from the 0.05 inch cable. And...success! Simply connecting SWDIO, SWDCLK, GND, nRST, and VREF to 3V3 and we were able to program the custom board MAX32660 to toggle one of the GPIOs we exposed as WAKE on our breakout. The toggled GPIO then actuates an led and voila:

Here we have GND_detect also connected but we subsequently learned this is not needed.

Yes, it is a little clunky but for prototype hardware and firmware development this works just fine. In the end-user application, once programmed with firmware the breakout doesn't need to be programmed again. The breakout will communicate with the host MCU via I2C in use. So in reality for the final product we don't need SWD and nRST exposed to the user; and it is a shame to waste valuable board edge just for one-time programming. So we will likely expose the SWDIO/SWDCLK, and nRST along with GND and 3V3 as a 2 x 3 test pad pattern on the back of the board that can be programmed at the fab using a pogo pin connector.

This was the last technical hurdle to overcome for proof of concept. Now we will continue our firmware development and, in a few days, test the board as a motion co-processor to an STM32L4 host MCU. Very exciting!

Discussions

Sorsly wrote 02/07/2019 at 03:25 point

Hi Kris, I see that you managed to use the SWD interface to program the MAX32660 instead of I2C. Besides connecting the pins mentioned, what script was run to flash the chip? I'm having trouble finding any documentation related to the SWD in the bootloader software package or the user guide.

  Are you sure? yes | no

Kris Winer wrote 02/07/2019 at 03:48 point

I am using the Eclipse IDE supplied by Maxim for the MAX32660 which compiles and flashes the program onto the MAX32660 via SWD. Of course, I had to write the program. Not much more to it. Not sure I understand what the question is...

  Are you sure? yes | no

Sorsly wrote 02/10/2019 at 05:29 point

Oh, are you running on Windows? I was looking for some sort of flashing script on Linux. Thanks!

  Are you sure? yes | no

Tom Fleet wrote 09/13/2018 at 14:58 point

Hi Kris!

(Big fan of your work by the way, just wanted to say!)

Tom M makes a good point on the TagConnect, but I agree, they are prohibitively expensive, and I have seen them fail (single core wire in the ribbon doesn't stand up to much). Our production teams have been through at least 5 cables over the span of a few years. 

I found a project that looks pretty well thought out, leaving it here for consideration and for others to look at. Notable points include a smaller pad footprint on the target board, and a replaceable FPC ribbon between the 20 pin debugger connector and the pogo pin head. 

http://protofusion.org/wordpress/2016/02/open-source-swd-programming-adapter/

Cheers,

Tom

  Are you sure? yes | no

Kris Winer wrote 09/13/2018 at 16:59 point

Thanks for the kind words Tom! I don't like the tag-connector for another reason--namely, it requires three through holes and takes up a lot of board area. This is just not going to work on a pcb as small as the MAX32660 motion co-processor. The link is interesting, and validates our idea to simply use pogo pins in line to connect GND/SWDIO/SWDCLK/3V3 to the board via 2-mm-pitch test points out of the way on the back of the board. This is the simplest solution and easy to do.

  Are you sure? yes | no

Kris Winer wrote 08/22/2018 at 16:16 point

Thanks Tom, we already use this on some of our development boards. The 3 x 2 pads are fine for this board but the threealignment holes are a deal breaker. This is why I mention making a connector out of pogo pins. I suppose I could just cut off the steel pegs of the tag connect but it seems like a pretty expensive way to obtain a pogo pin connector!

  Are you sure? yes | no

Tom Magnier wrote 08/22/2018 at 08:52 point

Nice project :)

If you have a bit of room left on your PCB, the de facto industry standard for the SWD connector issue is this type of cable : http://www.tag-connect.com/ (I'm not related to them, just using their products).

The cable itself is a one off purchase and at least uses a "standard" footprint ! The no-legs version has a tiny footprint (2*3 test pad + 3 alignment holes).

  Are you sure? yes | no