P0504 (Brake Switch 'A'/'B' Correlation) means the powertrain control module is receiving contradictory inputs from the vehicle's brake pedal position switch. Most modern vehicles use a brake switch with two internal signals, and this code sets when Signal A and Signal B disagree about whether the pedal is pressed or released.
The dual-output brake switch is a wear item; the internal contacts of one circuit often fail before the other, causing the A and B signals to disagree.
If the pedal stopper, pedal height, or switch mounting is off, the two switch circuits may open or close at the wrong pedal position, producing a correlation error.
Corroded, bent, or backed-out pins in the switch connector, or a chafed/break in the harness, can cause one signal to read incorrectly relative to the other.
A cracked pivot, weak return spring, or worn pedal pad can prevent the pedal from fully releasing, keeping one switch circuit engaged.
Sticking pedal, floor mat interference, or aftermarket pedal extensions can alter pedal travel just enough to confuse the two switch circuits.
Genuine PCM/ECM failure is rare for this code; the module simply compares two input voltages and is usually not the cause.
No. Despite what some online sources suggest, replacing the PCM is almost never the correct fix for P0504. The code is set when two input signals disagree, and the far more common causes are the brake switch itself, its adjustment, or its wiring. The PCM is a suspect only after the switch and harness have been ruled out.
Usually the vehicle will still drive, but it may not be safe to leave unrepaired: brake lights can fail or stay on, cruise control may not disengage, and shift-interlock or push-button-start functions can be affected. It should be diagnosed promptly.
Many vehicles use the brake switch input to release the torque converter lockup, disengage cruise control, allow shifting out of Park, and (on automatics) confirm a 'brake applied' condition before a gear change. If the PCM cannot confirm brake state, it may disable those features as a safety precaution.
With the connector disconnected, a multimeter is used to check continuity between the switch's pins in both the released and depressed pedal positions for each of the two circuits; the readings should change crisply and at the same pedal point. A scan tool showing both switch parameters in real time is the quickest confirmation.