A method of processing a signal supplied by a piezoelectric sensor, said signal indicating a pressure value, called the cylinder pressure, prevailing in a cylinder chamber of a piston engine such as a heat engine, said signal having a value in the form of pulses separated by components of greater length, called plateaux, corresponding to values of the cylinder pressure which are at least substantially constant, in which method: - undesirable variations in the value corresponding to said plateaux of said signal supplied by said sensor are compensated by a processing circuit comprising a compensation circuit forming a closed-loop servo control, wherein said processing circuit, when said closed-loop servo control is is active, is capable of supplying an output signal with a value set to a predetermined constant value Sr, called the reference value Sr, independently of any undesirable variations in the value corresponding to said plateaux of said signal supplied by said sensor, - said signal supplied by said sensor is treated by an operational amplifier, said operational amplifier receiving said signal as an input and supplying said output signal as an output, - said closed-loop servo control supplying a corrective voltage signal Ucorr to a resistor which transforms it into a corrective current Icorr, wherein said corrective current Icorr is supplied as an input of said operational amplifier and added to said signal supplied by said sensor, characterized in that: - the value of said output signal is measured and stored for successive sampling moments at a sampling frequency greater than the maximum frequency of said pulses, - at each sampling moment, a value indicating a variation ΔS in the output signal with respect to a past sampling moment is calculated, - at each sampling moment, if the absolute value of said variation ΔS is less than a predetermined comparison value V, said servo control is kept active to set the output signal to said reference value Sr, the value of said output signal being a value corresponding to a plateau. - undesirable variations in the value corresponding to said plateaux of said signal supplied by said sensor are compensated by a processing circuit comprising a compensation circuit forming a closed-loop servo control, wherein said processing circuit, when said closed-loop servo control is is active, is capable of supplying an output signal with a value set to a predetermined constant value Sr, called the reference value Sr, independently of any undesirable variations in the value corresponding to said plateaux of said signal supplied by said sensor, - said signal supplied by said sensor is treated by an operational amplifier, said operational amplifier receiving said signal as an input and supplying said output signal as an output, - said closed-loop servo control supplying a corrective voltage signal Ucorr to a resistor which transforms it into a corrective current Icorr, wherein said corrective current Icorr is supplied as an input of said operational amplifier and added to said signal supplied by said sensor, - the value of said output signal is measured and stored for successive sampling moments at a sampling frequency greater than the maximum frequency of said pulses, - at each sampling moment, a value indicating a variation ΔS in the output signal with respect to a past sampling moment is calculated, - at each sampling moment, if the absolute value of said variation ΔS is less than a predetermined comparison value V, said servo control is kept active to set the output signal to said reference value Sr, the value of said output signal being a value corresponding to a plateau.