Skip to content

LIB-31 Footprint's SMD or through-hole attribute disagrees with its pads

Severity Status Implementation
warning runs in better_erc easy, depends on TOOL-3

Data it needs: graph, layout. Folds in: BOM-3.

Looks at. The board file: each footprint's attribute and pads.

What it catches. A footprint whose attribute (attr smd or attr through_hole) says one mount type while its pads say the other. A footprint is through-hole when at least one soldered pin is a plated through-hole pad. Three kinds of through-hole pad do not count. A thermal via has the number of an SMD pad, or is a drill of 0.5 mm or less inside one. A shell or mounting peg is unnumbered, has a shield or mount number or pin name (SH, S1, MP, SHIELD), or carries KiCad's mechanical fabrication property. A pad marked heatsink or castellated counts as one of these too. A footprint with SMD pins and through-hole shell pegs is SMD: the pegs are soldered as pin-in-paste in the same reflow pass. An SMD footprint whose thermal vias or pegs have no fabrication property is a suggestion of its own.

Why it matters. The attribute decides whether the footprint goes into the pick-and-place and position files, and how the assembly house quotes the board. KiCad's own DRC compares the attribute with the pads, counting every plated through-hole pad without a fabrication property, so libraries often mark a QFN with thermal vias through-hole to keep it quiet. The board then looks like it needs a through-hole soldering step it does not have (BOM-3).

Example. b153b: U201, U202, U301, U401 and U501 are QFNs whose thermal vias are through-hole pads of the exposed pad's number, and J401 and J501 are SMD USB-C connectors with through-hole shell pegs. All seven are marked through-hole; only the pin headers J701 and J702 are.

How to check. Each placed footprint's pads (erc_analysis::package::PadMount) against its attribute, one finding per library footprint with all its parts. Footprints with no attribute or no soldered pad are not looked at.

Fix. Set the footprint's attribute to SMD in the library (Footprint Properties, Component type) and update the board from the library. Mark the thermal vias as heatsink pads and the pegs as mechanical pads (Pad Properties, Fabrication property), so KiCad's DRC agrees with the new type.

References. KiCad PCB, footprint type mismatch DRC (footprint_type_mismatch).

Test schematics

Each schematic below is in test_schematics/sources. The block under it is what berc check --only LIB-31 reports on it.

lib-31_mount_attribute

The test schematic lib-31_mount_attribute The test schematic lib-31_mount_attribute

  warning    LIB-31 #86r    Fixture:USB_C_Receptacle_ShellPegs (J1): attribute through-hole, but every soldered pin is SMD; its through-hole pads are shell or mounting pegs (pad SH)
                            part J1
                            attr = through_hole (pcb lib-31_mount_attribute.kicad_pcb)
                            fix: set the footprint's attribute to SMD in the library (it drives the pick-and-place and position files) and update the board from the library; mark the shell or mounting pegs (pad SH) as mechanical pads (Pad Properties, Fabrication property), so KiCad's DRC footprint type check agrees
                            input in1:1fadb5d68f5b88d5
  warning    LIB-31 #6zy    Fixture:PinHeader_1x02_AttrSmd (J3): attribute SMD, but pins 1, 2 are plated through-hole
                            part J3
                            attr = smd (pcb lib-31_mount_attribute.kicad_pcb)
                            fix: set the footprint's attribute to through-hole in the library and update the board from the library
                            input in1:43deb947f2e50c08
  warning    LIB-31 #tws    Fixture:QFN-2-1EP_ThermalVias (U1): attribute through-hole, but every soldered pin is SMD; its through-hole pads are thermal vias (pad 3)
                            part U1
                            attr = through_hole (pcb lib-31_mount_attribute.kicad_pcb)
                            fix: set the footprint's attribute to SMD in the library (it drives the pick-and-place and position files) and update the board from the library; mark the thermal vias (pad 3) as heatsink pads (Pad Properties, Fabrication property), so KiCad's DRC footprint type check agrees
                            input in1:488d8530866d5627
  suggestion LIB-31 #3jn    Fixture:QFN-2-1EP_UnmarkedVia (U3): SMD, but its thermal vias (unnumbered) are plain through-hole pads: KiCad's DRC reports footprint_type_mismatch
                            part U3
                            attr = smd (pcb lib-31_mount_attribute.kicad_pcb)
                            fix: in the library, mark the thermal vias (unnumbered) as heatsink pads (Pad Properties, Fabrication property), so KiCad's DRC footprint type check agrees
                            input in1:f028d9f3e24e8735