An implantable medical device (IMD) adjusts a sensing configuration of a sensing module prior to or immediately subsequent to entering an environment having an external source that generates the interfering signal. The IMD may, for example, adjust a sampling frequency, resolution, input range, gain, bandwidth, filtering parameters, or a combination of these or other sensing parameters of the sensing module. These adjustments enable the sensing module to obtain a more detailed representation of the sensed signals, including the noise components of the sensed signals caused by the interfering signal. Without having an adequate representation of the noise components of the sensed signal, it is difficult to separate the noise components of the sensed signal from the cardiac electrical signal.