This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Multiplexing SWDIO/SWCLK to program panels in production - Why is it a bad idea?

Hello,

I've been researching how to go about programming our devices on the production line. Most of the threads I've seen suggest two options: either to order them pre-programmed or to use several flashers connected to a PC (or use that solution that works with microSD cards).

The first suggestion is not an option for us, we have to produce about 5000 pieces that need to be delivered to Kickstarter backers and if we want to meet our deadline we would have to send the final binaries to the manufacturer now and the firmware is not ready yet. For mass production, we will probably use this option but not right now.

The second option is to use a flasher per device (could be one per 8 or so, depending on the capabilities of the flasher), but we don't have space in the PCB to use a bed of nails or something like that to connect them directly to each device.

One choice would be to draw traces from the SWD pins out to the panel and connect them there. I read in another post asking the same question that this not a good idea at all because the traces might get shorted when the devices are depanelized.

Our panel will have 40 to 50 boards and the PCB has 4 layers. We are planning to use a single J-Link and multiplex the SWD lines to program one device at a time. We would draw the SWD lines from one of the inner layers of the PCB so we doubt we would have problems with traces being shorted when cut.

So my question is: Why is such a bad idea to multiplex the SWD to program a single device at a time?

Parents
  • Not sure it's going to work too well. Even if you have individual traces per board, you're going to have some fairly long lines. You'll have to route them to be about the same length and even then the stray capacitance on the longer ones is going to cause you at the least speed issues, at the worst, programming failures.

    I don't think muxing the SWDCLK is going to work. SWD v1 wasn't designed for that, again I think you'll run into capacitance issues pretty quickly apart from problems with multiple devices trying to respond. ARM designed SWDv2 multi-drop for sort of that and I can't find quickly in the spec how many devices are allowed to attach to SWD even there. And the nRFs don't support multidrop (don't know if anyone does). If they supported JTAG mode that would be a cool way to program lots of them, you could really set the whole array up as a big boundary scan chain, but they don't support that either.

    I've never come across anyone trying to do it this way, which makes me feel that .. there's always a better plan.

    You said the board is too small for a bed of nails. Even the tag-connect size with 3 holes (they're a pain) and 6 pads? I'd recommend trying that again and see if you can find a creative way to get them in.

    Last option I'd probably try if there really is no room is to panelize the boards with a strip of beds of nails between them, one per actual board (you should be able to pack those in), program the boards via their (personal) connector, then snap them off. You'll probably reduce your board count per panel that way because of the extra area, but you have the advantage that it will work, you don't need to make anything complicated to make it work and programming will be super quick. You'll have to work out the economies of getting fewer boards out of each panel and thus how much it'll cost per board to do this, I'd hope for a run of 5000 you'd be talking pennies per board, not insignificant for a kickstarter run, but if it gives you 100% programmability of every board on the panel using a simple method, it may be worth it to get it done.

    I reckon by the time you've done 5000 you'll be quite good at it :)

  • Like I said in another comment: The jumper cables from any bed of nails setup to the JLINKs would be just as long as the traces... (and on the PCB, you could surround them with a ground plane...) But I like the idea of moving the "connector" (large enough testpads for bed of nails) to unused panel space, outside of the individual pcb area... nonetheless, whether bed of nails or another method, the question is still valid: to program 50 devices, you still need either 50 J-links or multiplex SWD lines somehow. Muxing any data-line should be no problem - multidrop on swd is not muxing, but rather having all devices connected to the same two swd lines, and the devices figure out which one is supposed to be programmed now... as far as I understood, the question is about whether muxing just one of the lines (swdio OR swdclk) is enough (and which is better), or if both have to be muxed...

Reply
  • Like I said in another comment: The jumper cables from any bed of nails setup to the JLINKs would be just as long as the traces... (and on the PCB, you could surround them with a ground plane...) But I like the idea of moving the "connector" (large enough testpads for bed of nails) to unused panel space, outside of the individual pcb area... nonetheless, whether bed of nails or another method, the question is still valid: to program 50 devices, you still need either 50 J-links or multiplex SWD lines somehow. Muxing any data-line should be no problem - multidrop on swd is not muxing, but rather having all devices connected to the same two swd lines, and the devices figure out which one is supposed to be programmed now... as far as I understood, the question is about whether muxing just one of the lines (swdio OR swdclk) is enough (and which is better), or if both have to be muxed...

Children
No Data
Related