If you plan to mass produce your device, you need to think about testing it.
For small batch production (a few dozen or hundreds of devices per year), you will probably be fine with manual or semi-automated testing. Your testing and programming setup will probably look something like this. This setup is also ideal for developing and producing samples for marketing.
If you plan to produce a larger number of devices (tens of thousands of devices per year), you will need a device with a higher level of automation. Such a device should also ensure ease of mounting and removal of the tested board.
Such a setup will probably be equipped with one or more PCBs designed for testing programming and communication with a computer.
The usual steps performed by such a setup are:
All steps are usually performed automatically. In this case, the operator only needs to install a new board in the test adapter and press the button to start the process.
* if the DUTs memory allows, we recommend including the test code in the production code of the device. This saves time during mass production. If this practice is not applicable in your case, then use two binaries, one for testing, the other one for normal operation. If you use one binary, then provide a mechanism for activation of testing SW. Such a mechanism can be a implemented using a test pin or a flag in the non-volatile memory of the device.
** necessary if you use a simgle binary for different subsystems, which are configurable.
*** we recommend using a licensing mechanism for manufactured boards. This will protect your software from unauthorized copying. Without obtaining a separate license from a license server under your control, your device will remain non-functional.