A method for characterizing a time-of-flight sensor and/or a cover covering the time-of-flight sensor, the method comprising: performing at least one coded modulation measurement with the time-of-flight sensor for obtaining measurement data for light reflected from the cover back to the time-of-flight sensor, wherein a measurement range of the time-of-flight sensor is configured to end shortly after the cover for the at least one coded modulation measurement, wherein an illumination element of the time-of-flight sensor for emitting the light generates the light for the at least one coded modulation measurement based on an illumination signal exhibiting an alternating series of high and low pulses of varying duration, and wherein electronic circuitry of a light capturing element of the time-of-flight sensor for measuring the light reflected from the cover is driven for the at least one coded modulation measurement based on a reference signal exhibiting an alternating series of high and low pulses of varying duration; and determining characterization data based on the measurement data, wherein the characterization data indicate a quantity related to the time-of-flight sensor and/or the cover, wherein the pulse durations of the high and low pulses in the illumination signal and the reference signal and a time-shift between the illumination signal and the reference signal are adjusted by means of selecting the at least one modulation code underlying the illumination signal and the reference signal, to have a steep slope to mitigate a response of the time-of-flight sensor to reflections of objects behind the cover for the at least one coded modulation measurement. performing at least one coded modulation measurement with the time-of-flight sensor for obtaining measurement data for light reflected from the cover back to the time-of-flight sensor, wherein a measurement range of the time-of-flight sensor is configured to end shortly after the cover for the at least one coded modulation measurement, wherein an illumination element of the time-of-flight sensor for emitting the light generates the light for the at least one coded modulation measurement based on an illumination signal exhibiting an alternating series of high and low pulses of varying duration, and wherein electronic circuitry of a light capturing element of the time-of-flight sensor for measuring the light reflected from the cover is driven for the at least one coded modulation measurement based on a reference signal exhibiting an alternating series of high and low pulses of varying duration; and determining characterization data based on the measurement data, wherein the characterization data indicate a quantity related to the time-of-flight sensor and/or the cover, wherein the pulse durations of the high and low pulses in the illumination signal and the reference signal and a time-shift between the illumination signal and the reference signal are adjusted by means of selecting the at least one modulation code underlying the illumination signal and the reference signal, to have a steep slope to mitigate a response of the time-of-flight sensor to reflections of objects behind the cover for the at least one coded modulation measurement. <EOS>