[Help] Panel Programmer - Page 1
Forum section: electronics / projects

author: BadeBhaiya
author_rank: Regular Contributor
timestamp: May 20, 2025, 09:58:01 am
content: Hello all, hope you are doing well.I am making a custom board for work that will let us program 9 boards (in a panel) in one go. I am planning on using a PCIe x4 connector on the custom board, and a board edge connector on the panel.Anyway, the plan is simple, to have a USB powered board with STM32F1 MCU on board running BlackMagicProbe firmware to program the boards one after the other, using a 4051 analogue switch array to switch the SWD lines. Maybe an additional line to output UART data. Here's an image to explain what I'm planningDoes anything sound wrong here?

author: coromonadalix
author_rank: Super Contributor
timestamp: May 20, 2025, 08:52:21 pm
content: and how the gang switching #1 up to #9 occurs ? pc send some commands ?

author: BadeBhaiya
author_rank: Regular Contributor
timestamp: May 21, 2025, 07:28:59 am
content: Yes the BlackMagicProbe firmware is open source, it can be modified to toggle a few pins when it receives a custom command from the PC. So when the STM32 gets a command from the PC, it swaps out the board programming lines using the 4051 chips

author: Smokey
author_rank: Super Contributor
timestamp: May 21, 2025, 07:45:06 am
content: I've done pretty much that same setup. Works great. I did a 6:1 SWD/UART multiplexer board that also has switchable power to each port. Since everything cables over to the rest of the system I can use the same multiplexer board for multiple products.One point of note: Card edge connectors aren't rated for a huge number of cycles, so put your card edge connector on it's own board and cable it over to the multiplexer fixture. That way it's easy to swap when it wears out. It's also easier to orient your panel during test.

author: BadeBhaiya
author_rank: Regular Contributor
timestamp: May 21, 2025, 08:30:35 am
content: Glad to hear I'm on the right track. Did you too use 4051 switches or something else like a discrete transistor design?

author: PGPG
author_rank: Frequent Contributor
timestamp: May 21, 2025, 11:43:48 am
content: Quote from: Smokey on May 21, 2025, 07:45:06 amMay be you will find it useful:Since over 15 years we use 3 pins from 1.27mm pin-header to connect programmer to PCB.'Socked' I have designed by taking 2x2 1.27mm footprint, deleting one pad (to ensure clarity), and shifting the left 3 a little (to ensure pin-header get in contact).In production 'Socked' need to withstand only one cycle. I don't know about any problems with pin-header being destroyed by too many use cycles.

author: Smokey
author_rank: Super Contributor
timestamp: May 22, 2025, 07:42:13 pm
content: Quote from: BadeBhaiya on May 21, 2025, 08:30:35 amI used SN74CB3Q3251RGYR, but as long as the switches can handle the voltage and data rate, it should probably be fine.

author: Smokey
author_rank: Super Contributor
timestamp: May 22, 2025, 07:44:36 pm
content: Quote from: PGPG on May 21, 2025, 11:43:48 amBy card edge, I'm talking about stuff like PCIe. Not pin headers. You don't want pin headers on your panel because that's just one more part that needs to be installed and then thrown away with the panel parts. Just build the card edge into the panel and it's essentially free. Plus since the panel side only needs to survive one insertion, there is no need for hard gold or any other actual card edge treatment. Just normal ENIG works fine.

author: PGPG
author_rank: Frequent Contributor
timestamp: May 23, 2025, 10:21:17 am
content: Quote from: Smokey on May 22, 2025, 07:44:36 pmI supposed I was precision enough but it looks that not.We are using only one pin-header (2x2 with one pin removed) that is connected with programmer. At PCB I place 3 hole footprint made by modifying 2x2 1.27mm pin-header footprint. Thanks to little shifting of holes the pin header gets enough contact for several seconds needed for programming (also essentially free and takes little space).I imagine that routing these tracks to the card edge can be problematic sometimes. I place my programming 'socket' just near the controller.You can see it at this PCB (small white region):https://forum.kicad.info/t/approaching-pcb-track-routing-for-a-newbie/36302/8

author: BadeBhaiya
author_rank: Regular Contributor
timestamp: May 23, 2025, 12:26:09 pm
content: I think PGPG seems to be talking about a test point based footprint to program the boards.I appreciate the advice, although it is not applicable in my case, since I want to program multiple boards on a panel, maybe run a few POST tests on them, with a relatively secure connector.We have a similar test point based programming setup right now. The assembly folk aren't too happy with it.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: May 23, 2025, 05:46:12 pm
content: I would keep the whole switching thing with the 4051 on a separate PCB. For the panel, you can either route all PCB's towards a single connector, or make a jig the same size as the PCB and use a bed of nails with pogo pins approach.Also, JTAG can daisy chain multiple devices. It's original design goal is to daisy chain all (complex enough) devices on a PCB together and then use it both for fault testing (you can test tracks and soldering faults in between your FPGA and your microcontroller) and for programming devices. JTAG also has commands to bypass a part of the chain, so an IC can be shortened to a single flipflop delay. As far as I know, the more advanced parts of the JTAG protocol are not used very often. It's either unknown, not supported well by either software or devices (bugs and such) or it's simply deemed to complex to be worth the effort to set it up.uC's with simple SPI protocols can sometimes be wired parallel to each other. So you program one device, and the data goes to all of them. Verifying the data can not be done this way.And as with all engineering tasks, it's a tradeoff between design time and production time and cost.