I am working on a PCB which includes an microcontroller (STM32), some sensors and a BLE module. Right now it is still a prototype, only 3 units have been produced.
- To program the microcontroller, I am using the programming probe provided by STMicroelectronics (ST-LINK/V2).
- To check that the hardware is fine, I send a BLE command to the PCB : the microcontroller verifies that all the sensors are responding and if the test is passed, a green LED is turned on (otherwise a red LED). It is not an exhaustive test procedure but it is convenient for my needs (for example I do not test the red LED nor the values of all the resistors nor the measurements of the sensors).
That works for small quantities, but if the prototyping phase is conclusive it might be produced in large quantites (some thousands), so I will have to change the way the MCU is programmed and the PCB tested. I have never done this before, so I have trouble finding what is expected of me and of the EMS.
How can the MCUs be mass-programmed ? Let's consider I will not ask STMicroelectronics to deliver the MCUs with my custom firmware (because that solution is "easier"). I suppose I will need to make the programming pins of the MCUs accessible. But can I just send the .bin file to the EMS who will take care of the whole programming procedure ? Do I need to specify the programming procedure ? Or do I need to design another electronical card whose goal will only be to program the MCUs ?
I do not have any idea how to industrialize a testing procedure. Once again : can the EMS take care of the whole procedure based on my schematics/layout ? Or do I need to design another electronical card ?