The device has a communication unit that enables communication between an external programming device and an implanted medical device (IMD) by utilizing alternating electromagnetic fields. A detection unit senses magnetic resonance tomography (MRT) interference fields where voltage pulses are induced in a programming coil (310'). A control unit receives an MRT detection signal from the detection unit to indicate that communication with the external programming device is not detected via the programming coil. An independent claim is also included for a method for detecting pulsed magnetic alternating fields using an IMD equipped with a control unit and a programming coil.