Short answer. Programming is a process step, not a rework step. Where it sits in the flow - on incoming parts, on the assembled board, or inside final test - decides the yield, the cycle time and whether the version that shipped can be proven afterwards. Decide that before the first build, because moving it later means re-qualifying the test.
Where programming sits in the build
There are three positions, and each one buys something different.
- Before assembly, on the part. The device is programmed and verified in a socket, then placed. It suits parts that are hard to reach after assembly, and it lets a bad device be rejected before it is soldered down. It costs an extra handling step and an extra electrostatic discharge exposure per unit.
- After assembly, through a header or pads. The board is programmed in circuit, which is closest to how it will be used and catches assembly faults that a socket cannot. It occupies a test position for the length of a programming cycle, and that cycle is usually longer than the functional test that follows it.
- Inside final test. Programming is folded into the functional test sequence, so one fixture does both. This costs the least per unit at volume and the hardest to change afterwards, because the fixture and the test programme are built around a specific image.
Four ways to get code into a board
| Method | Best for | What it needs on the board | Limit |
|---|---|---|---|
| Offline socket programmer | Parts programmed before placement, or a device with no accessible interface | Nothing | One handling cycle per device, and the part must be programmed again if it is replaced |
| In-system through a header | Prototypes and low volume | A header or a set of pads with a defined pinout | Connector wear, and a header that must be added to the layout |
| Bed of nails, gang programming | Production volume | Test points with adequate spacing and a keep-out around them | Fixture cost, and a fixture that must be rebuilt when the pad layout changes |
| JTAG or boundary scan | Boards that already carry a scan chain | A debug port left accessible | Slower per unit, and only as good as the chain the design provides |
What has to be fixed before the build
- The image and its version. A hex or bin file with a version number that appears in the build record, not a filename on someone's desktop.
- Verification. Whether every unit is read back and compared, or a sample is. A read-back that is not recorded is a read-back that did not happen.
- Serial numbers. Whether the number is written by the programmer, read from a label, or generated by the test station, and where it is stored.
- Blank and programmed stock. How the two are kept apart physically, because a tray of blank parts next to a tray of programmed parts is the most common cause of a board that passes test and does nothing in the field.
- Replacement policy. What happens to the image when a device is replaced during rework, and who is allowed to authorise a different version.
The security question
Firmware is the customer's property, and a build that handles it casually is a build that will eventually leak it. The working rules are simple: the image is not attached to a purchase order, not sent to a shared drive, and not stored on a machine that is also used for general work. Production runs from an encrypted file with an authorisation that expires, and the device is locked for read-back after programming where the part allows it. The customer keeps the only copy of the key.
If a supplier asks you to email the binary and the unlocking key in the same message, that is the whole security model in one line: there isn't one.
Traceability after the board ships
For each unit or each panel, record the image version, the programming station, the time and the result. That record is what makes a field return diagnosable: without it, a failure three months later can only be answered with "it was tested", which is not an answer. Where the customer's own system holds the serial number, the two records are matched at shipment rather than reconstructed afterwards.
The failures that repeat
- A blank part in a programmed batch. Almost always a stock-handling problem, not a programming problem.
- The wrong version. An engineering change that reached the customer but not the line. Version control on the image, not on the email thread.
- Read protection set too early. The board cannot be updated in the field without a full erase, which turns a firmware patch into a return.
- A worn socket. Contact resistance rises gradually and shows up as intermittent failures that move between units.
What Kilandu does
Firmware loading and software programming are carried out as a production step, either on incoming devices or in circuit after assembly, and the image version is recorded against the build. Where programming is combined with functional test, the sequence and the fixture are agreed at DFM so that the programming time is inside the test cycle rather than added to it. The test scope that follows programming is described on the PCBA testing page, and the fixture and stencil decisions that go with it on the SMT assembly page.
Not sure where programming should sit in your build?
Tell us the device, the interface and the monthly volume at alden@kilandu.com, and we will come back with the position in the flow and the fixture it needs.