Homogeneous charge compression ignition (HCCI) engines are a promising alternative to traditional spark-and compression-ignition engines, due to their potential to achieve a high thermal efficiency and near-zero emissions of NOx and soot. In this work, the heat transfer from the bulk gas to the cylinder wall is measured during motored and HCCI operation in a single cylinder (CFR) engine fueled with n-heptane. Heat flux measurements in the cylinder wall and head show small spatial variation of the heat flux in the combustion chamber. Design of Experiments methods are applied to study the effect of the engine settings on the heat transfer. It is found that the inlet air temperature does not affect the heat flux under motored operation. Under fired operation, all engine settings affect the heat transfer, but none of their interactions are significant. The compression ratio and inlet air temperature have a quadratic effect on the peak heat flux and peak convection coefficient, whereas the mass fuel rate has a linear effect. For the total heat released, the compression ratio and inlet air temperature have a linear effect and the mass fuel rate has a quadratic effect on it. All engine settings affect the instantaneous heat flux. (C) 2016 Elsevier Ltd. All rights reserved.