0
\$\begingroup\$

I have designed a custom board for a STM8S105C6T6 microcontroller intended for commercial use. I have coded the program and tested it using the stm8s discovery board.

Now I find myself not knowing what would be the best to mass program the microcontroller. I had thought about adding a port to the board that is connected to the swim interface so I can program them by hand, but that would be very tedious when scaling production. On the other hand, I do not want to order a pre-programmed chip because I would like to make modifications to the code once the PCB arrives.

Please, I would appreciate any input to help me decide what method is best in this scenario.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

The usual method is to have a programming fixture with pogo pins or something similar that connects to the board. You can test and program the MCU at the same time. The STM8 is a modern MCU with a small memory and will program quickly.

Typically you'd want to spend about a similar order of magnitude of design time on designing the testing as on the board itself (it's not unusual to design another PCB as part of that). Ideally you want to have a lot of test points and verify that everything is working 100% and there are no shorts, opens, missing or wrong components populated etc.

If you search on "test fixture" you'll find a plethora of approaches including very professional bed-of-nails fixtures and many viable DIY approaches (Adafruit has some good ideas for small-scale production in this regard).

For small scale you can make good use of 3D printing and simple machining to create such a fixture. You can also consider putting self-test firmware in the device itself.

Here (from Grabcad) is one such fixture (including STL files for the custom parts):

enter image description here

For higher volume the testing and programming can be outsourced to the assembly house, with or without the MCUs being pre-programmed.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.