Last Updated on November 24, 2026

The P0504 code means the engine or powertrain computer has detected a disagreement between two brake pedal signals. The computer expects each input to change in a particular way when you press and release the pedal. A switch that sticks, a misadjusted switch, or a wire that interrupts one of the signals can leave the computer seeing two different pedal states.
Start by checking the brake lights while parked, then compare both brake inputs in live scan data. If the lights work and one scan value stays fixed, you have a specific circuit to test.
What Does the P0504 Code Mean?
P0504 is the brake switch A/B correlation code. The names on the data list vary. On the 2009 Toyota Corolla with the 2.4-liter engine, for example, the stop light switch supplies signals called STP and ST1−. The engine computer checks them together and can set P0504 if it detects indications of both an applied and a released pedal within the conditions in the service chart.
Two inputs can be electrically opposite by design. One contact can open while the other closes when the pedal moves. Check the expected states for your brake system at rest and with the pedal applied. If your scan tool shows only a single stop lamp status, use the service diagram and a tool that can display the other input or test its circuit directly.
If the ABS module also reports a fault, save that code separately. The guide to the Brake system Switch circuit explains how the ABS module can receive a different input on some GM vehicles. Start with the code description and wiring diagram for the module that reported your fault.
Common Causes of the P0504 Code
- One switch contact is worn or sticking. The lights may still work if the other contact controls them. Watch both inputs through several slow and normal pedal presses.
- The switch is out of position. A loose bracket, an incorrect part, or a switch installed out of adjustment can change one signal before the other. Check pedal return and the specified clearance or installation procedure.
- A connector or wire interrupts the signal. Check near the top of the pedal for a loose latch, damaged insulation, corrosion, or a terminal that moves when the pedal travels.
- One input has lost its feed. Use the diagram for your vehicle to identify the supply and fuse for each input. A blown fuse can interrupt a switch signal if that fuse feeds the circuit. If it opens again, trace the fault before replacing it a second time.
If the warning began right after work near the pedal, trim panel, or switch, start with the disturbed parts. If one rear lamp is dark while the others behave normally, check that lamp and its connector. Use the condition of the lamps as one observation alongside the scan data.
What Are the Symptoms of Code P0504?

The check engine light may be the first thing you notice. The rear brake lights may stay on, come on late, flicker, or fail to come on. Cruise control and the shift interlock may also act differently if the vehicle uses the affected brake input for those functions. Record the actual symptom so you can compare it with the data on the scanner.
With the vehicle parked, ask a helper to watch the rear lamps, including the center lamp if fitted. Press and release the pedal a few times. If the lamps fail to show when you are braking or stay on after release, arrange service before driving. If the red brake warning stays on with the parking brake released, or the pedal or braking feels abnormal, park safely and arrange assistance.
How to Diagnose the P0504 Code
1. Save the Code and the Freeze Frame
Use a scan tool that supports the pedal input data for your OBD2 system. Save whether P0504 is current, pending, or stored, and record any other brake input, voltage, or ABS codes. Check the freeze frame for the conditions when the code set. A fault stored when the pedal was released gives you a different starting point from one that appeared during pedal movement.
2. Compare Both Brake Switch Inputs
Secure the vehicle and set the ignition as the service chart directs. Note both readings with the pedal released. Press and hold the pedal, then release it and watch each reading return. Compare those changes with the chart and the lamp test. A switch that works when you press quickly may hesitate when you move the pedal slowly.
Write down the names of the data items and what each one does. A display can report the switch contact as open or closed, or it can show the computer’s interpretation of the pedal position. That distinction matters when comparing reports from two modules.
For example, suppose all the lamps turn on when you apply the pedal but one input on the scanner never changes. Check the second switch contact and the path from that output to the computer. If both scan values move correctly on repeated presses, look for an intermittent connection and use the freeze frame to guide the next check.
3. Check the Switch and the Wiring Where the Signal Stops
Verify the switch mounting and make sure the pedal can return fully. Inspect the connector before using a meter. Check the supply and each output at the terminals listed in the diagram while operating the pedal. Use the procedure for the switch or sensor fitted to your vehicle. If the manufacturer calls for a resistance or continuity check, isolate the circuit and follow its instructions for power and connector position.
If the code appeared after a switch replacement, verify the part number and whether its mounting or initial adjustment differs from the old part. If the switch has a solid power supply and one output drops only when its harness moves, inspect that terminal and the wire immediately behind it.
If the output changes correctly at the switch and stays wrong at the receiving computer, trace the wiring and intermediate connectors. Check for an open, a short, or a terminal that makes poor contact. If the correct signal reaches the module and the scan data still disagrees, follow the remaining factory tests before considering a module repair.
How to Repair and Verify a P0504 Fault

Fix the circuit or part that failed its test. Replace a switch that shows an incorrect output with a good supply and the correct adjustment. Use the specified installation procedure so the new switch engages at the right point in pedal travel. Repair loose or damaged terminals with approved parts and return the harness to its original clips.
Confirm the lamps respond promptly and both scan values match the specified states. Clear the fault only after saving the original diagnostic information. Follow the vehicle’s confirmation procedure once the brake lights and brakes work normally, then scan again for current or pending codes. If the fault returns, compare the new freeze frame with the first one before revisiting a test.
How Much Does It Cost to Fix the P0504 Code?
Ask which test confirmed the fault and what the quote covers. A switch adjustment, a switch replacement, and a repair to a wire buried in the harness involve different work. An intermittent complaint may need more diagnostic time. Include any required adjustment or calibration when comparing estimates.
Common Mistakes When Checking P0504
- Using the brake lamps as the only test. Confirm both inputs at the module even when the lamps look normal.
- Expecting the two voltages to match. Compare each input with the manufacturer’s state chart in both pedal positions.
- Clearing the codes before recording them. Save the freeze frame and current data so you can see whether the repair changed the original fault.
Russell D. Steele writes trouble-code and repair guides for The Effective Guide. His work helps drivers understand what a code means, what might cause it, and which checks to make first.
1 thought on “How to fix failure in the brake light circuit P0504 code?”
Thanks for sharing.