A heatsink changes the space a compute module needs in three dimensions. On a CM5 carrier, check clearance above the module, around mounting hardware and along the route used to insert adjacent cables. A lid that closes by compressing the assembly is a poor indicator of a correct fit.

ArmSoM CM5 compute module · ArmSoM
Measure from the same reference plane
Set the carrier on the intended standoffs. Measure the highest point of the installed cooling assembly from the enclosure mounting plane and compare it with the lid drawing, including tolerances. Inspect any nearby cable that must pass over or beside the cooler. Refit the lid and check that it does not shift the module or place lateral force on a connector.
A nominal 1 mm drawing clearance is a starting point. Add the worst-case positive tolerances of the parts that grow into that gap before accepting it as guaranteed clearance.
Run the intended sustained workload inside the assembled enclosure and record ambient temperature. The fit measurement answers a mechanical question. The workload test answers whether heat can actually leave that enclosure during use.
Reference material
ArmSoM CM5 hardware documentation
