What does it mean?
OBD II fault code P0504 is a generic code that is defined as “Brake switch -A/B correlation”, and is set when the PCM (Powertrain Control Module) detects a failure either in the brake light control circuit, or when one or more systems that are coupled to the brake light circuit do not activate/deactivate when the brake light switch is activated by pressing the brake pedal.
Note that in the context of this code, the word “correlation” refers to whether or not an associated system reacts when the brake light circuit is energized. On most applications, the brake light switch is a simple analogue (ON/OFF) switch that is normally open when the brake pedal is in the fully extended position. When the brake pedal is depressed, the pedal acts on the switch, which closes a circuit, causing the brake lights to illuminate.
However, the brake light circuit is tied into several other circuits/systems, with the cruise control and shift interlock safety systems being the most common. In practice, if the cruise control system is in operation, applying the brakes will both illuminate the brake lights momentarily, and deactivate the cruise control system. Similarly, on some, if not most applications it may be impossible to move the gear selector from “P” or “N” unless the brake light circuit is activated.
Thus, if the PCM detects that an associated system is energized/activated/deactivated along with the brake light circuit, a “failure to correlate” situation is recognized, and it will set code P0504 as a result, and may illuminate a warning light as well. The image below shows a typical brake light switch, as well as its typical location.
Note though that access to the switch for testing purposes can be problematic, and in some cases, parts of the dashboard and even seats have to be removed to get to the switch comfortably.