P0504 Toyota Code: Fix the Brake Switch Fault Before Your Lights Fail
14 min read · by Nicole Bennett · Last updated: November 25, 2026
A p0504 toyota fault code means the engine computer has received brake switch signals that do not agree with each other. P0504 stands for “Brake Switch A/B Correlation,” a generic SAE code, so its core meaning matches across most makes. The code points to the brake switch, the wiring between the switch and the computer, or the computer’s input circuit. It is a starting point for diagnosis rather than a final answer, so the cause needs confirmation before any parts are replaced.
On a Toyota, the brake switch does two jobs. It tells the engine computer that the driver has pressed the pedal, and it controls power to the brake lights. According to RepairPal, the computer sets P0504 when it receives an incorrect signal from the switch. Because the same switch also feeds other systems, a fault here can affect cruise control as well as the lights.
This guide covers what P0504 means on a Toyota, which signals the computer compares, the symptoms, the usual causes, how to check the fault with a scanner, whether the car is safe to drive, and what drives repair cost. The steps here are for diagnosis only. Switch replacement and brake system work carry real risk, so send that part of the job to a qualified technician if you are not experienced with brake systems.
What P0504 Means on a Toyota
P0504 is a generic code, so its basic meaning is the same from make to make. The Toyota-specific detail lies in how the brake switch signals are named, wired and checked by the computer.

The second character of an OBD-II code shows whether the definition is generic or manufacturer-specific. A zero means a generic SAE definition, and P0504 starts with P0. That makes the basic fault, a disagreement between two brake switch inputs, standard across vehicles. Manufacturers still control the wiring, the signal names and the detection logic, which is why the same code can call for different tests on different cars. CarParts makes this point directly, noting that diagnosis steps vary by vehicle.
In the Toyota service manual excerpt quoted on a Tacoma enthusiast forum, the two inputs are named STP and ST1-. The engine computer is called the ECM in that excerpt, while many repair guides use PCM. Both names describe the same job: the computer that reads the switch inputs and decides whether they are valid. Signal names can differ by model year and engine, so confirm them for your specific vehicle before you test.
How the Brake Switch Signals Work
The brake switch changes state when the pedal moves, and the computer reads that change as driver braking. On a Toyota, the computer compares two signals that should always sit in opposite states.
CarParts describes the switch as normally open. A spring closes it when the driver presses the pedal, which completes the circuit that lights the brake lights. The switch draws current from a constantly hot fuse, so the lights and the computer input both depend on that fuse and its wiring.
The same switch also serves as an input for cruise control, anti-lock brakes, and the brake shift interlock. That is why a switch fault can show up as more than one problem, and why P0504 is not only a lighting issue. The role in shift control also explains the shifting complaints covered later in this guide.
The Toyota excerpt describes the expected states with the pedal released: STP should be off and ST1- should be on. The pedal-pressed state is the reverse. The excerpt describes a fault when both inputs read active at the same time, and the table below lays out the combinations.
| Pedal condition | STP input | ST1- input | Result |
|---|---|---|---|
| Pedal released | OFF | ON | Normal, expected pattern |
| Pedal pressed | ON | OFF | Normal, the reverse of released |
| Both inputs active together | ON | ON | Fault condition described in the excerpt |
| Both inputs inactive | OFF | OFF | Not the expected pattern, so check the switch and wiring |
The same excerpt lists three enabling conditions that must hold for 0.5 seconds or more before the fault sets: ignition on, brake pedal released, and STP off while ST1- is off. It labels this as 1 trip detection logic. The wording is not fully consistent. One spot writes STP1- where the rest of the text uses ST1-, and the enabling check reads differently from the normal pattern. Treat the exact logic as a starting point, and confirm it against the service information for your specific vehicle.
Tip: If your scanner shows the brake switch inputs, log the readings with the pedal released and then pressed before you replace anything. Save those notes with the freeze frame data so the repair history is clear if the code returns. For the same trouble code on a different platform, read P0504 Lexus.
Symptoms of P0504
Symptoms follow the job the brake switch does, so lighting and cruise control problems are the most direct signs. Shifting and stalling complaints also appear in the sources and should not be dismissed.
RepairPal lists two symptoms: brake lights that may not illuminate, and cruise control that will not operate. Its P0504 page does not describe diagnosis or repair steps, so use it for the symptom list only. CarParts adds shifting issues, engine stalling when braking, and inoperative cruise control to the picture. Stalling during braking is an unusual complaint, and it deserves a scan before it gets worse.
When P0504 is stored, look for these signs together:
- Brake lights that do not come on when the pedal is pressed
- Cruise control that will not engage or stays inoperative
- Shifting issues
- Engine stalling when braking
- A check engine light with P0504 stored in the computer
Brake light failure carries the most risk. NHTSA’s description of a Toyota stop lamp switch recall says that without working brake lights, other drivers do not receive warning that the vehicle is decelerating, which raises crash risk. Treat dark or stuck brake lights as the top priority, even when the check engine light is the only warning you see.
Common Causes of P0504 on a Toyota
Causes vary by model year and engine, but the sources repeat the same handful of faults: the switch itself, its wiring, a fuse, pedal adjustment, and the computer. The table sorts them by where a technician would normally begin.
Causes listed in the sources
CarParts lists four causes: a failed brake light switch, a brake pedal out of adjustment, wiring issues, and PCM failure. RepairPal names three: brake switch failure, PCM failure, and wiring issue. The Toyota excerpt lists a short in the stop light switch signal circuit, the STOP fuse, the stop light switch, and the ECM. The overlap is the switch and its wiring, so start there before suspecting the computer.
| Cause | What it can look like | Where to start |
|---|---|---|
| Failed brake light switch | Signals disagree or do not change with the pedal | Confirm with live data and a meter |
| Short in the stop light switch signal circuit | One input stuck in one state | Inspect the harness for chafing and pinched wires |
| Blown or faulty STOP fuse | Brake lights out along with signal faults | Check the fuse and its feed |
| Brake pedal out of adjustment | Switch position does not match pedal travel | Check pedal height and travel against the service manual |
| Wiring or connector problem | Intermittent faults that come and go | Check connectors while watching live data |
| PCM or ECM failure | Switch and wiring test fine | Rule out the switch and wiring first |
The Toyota stop lamp switch recall
Toyota has had documented stop lamp switch problems before. According to the NHTSA recall file for stop lamp switches, the defect covered certain 2009 Camry and 2009 to 2011 Venza vehicles, with about 186,798 potentially affected units. NHTSA said silicone grease could contact the switch surface during assembly of the contact-type switch, creating contact resistance. The letter says that could illuminate warning lamps or stop the brake lights from working.
If your Toyota is one of those models, a dealer can check the vehicle by VIN. The recall matters only when the symptoms match its description. Causes vary by model year and engine, so do not assume the recall applies to every Toyota that sets P0504. Seeing the code on another make? Start with P0504 Hyundai Code.
How to Diagnose P0504 With a Scanner
A scanner shows the conditions when the code set and whether the brake switch signal changes with the pedal. Use freeze frame and live data first, then confirm the result with a meter.

Start with the freeze frame data. It captures engine and vehicle values at the moment the fault set. Note whether the car was idling, cruising or braking when the code set. A code that sets only during braking points toward the switch or its wiring. A code that sets at random can point toward a power supply or computer input problem. Record stored and pending codes first, because clearing the code erases the freeze frame.
Work through these steps in order:
- Connect the scanner to the 16-pin OBD-II port, which is usually under the dashboard on the driver side, within reach of the steering column. Turn the ignition on with the engine off.
- Read and record all stored and pending codes, plus the freeze frame data for P0504.
- Open live data and find any brake switch or stop lamp status line. If your scanner has none, go straight to the meter checks in step 5.
- Have a helper watch the brake lights. Press and release the pedal slowly three times, and log whether the scanner status changes on each press and release.
- With a meter, check battery voltage at the switch feed. A healthy battery should read about 12.6 volts at rest. A much lower reading or no voltage points to the feed or its fuse.
- Check the STOP fuse, since the Toyota excerpt lists it as a possible cause. A blown fuse can cut power to both the brake lights and the switch circuit.
- After any repair, clear the code, retest with the pedal, and confirm the brake lights respond every time before the car returns to service.
| Check | Normal result | Suspect result |
|---|---|---|
| Scanner brake status with pedal pressed and released | Changes with each press and release | Does not change, or changes out of step with the brake lights |
| Battery feed at the switch, engine off | About 12.6 volts | Much lower reading or no voltage |
| STP and ST1- inputs with the pedal released | STP off, ST1- on | Both on together, or both off |
| Brake lights on each press | Illuminate every time | Dim, dead, or stuck on |
Mode 06 results are not the first place to look for a switch correlation fault. Freeze frame and live data give faster answers, so use them before any advanced test.
Pending versus confirmed status matters for the test. A pending code means the fault was seen once and has not yet been confirmed, so retest before changing parts. A confirmed code is stored and turns on the check engine light, which calls for a repair.
Driving Safety With P0504 on a Toyota
Driving with a P0504 is not recommended until you confirm the brake lights work. The switch controls the lights that tell other drivers you are slowing, so the risk is immediate.
CarParts advises avoiding driving the vehicle until a bad brake light switch is replaced. That advice matches the risk. When brake lights may not illuminate, following drivers get no warning when you slow or stop, and that is the crash risk NHTSA describes.
The switch also feeds cruise control, anti-lock brakes, and the brake shift interlock. A P0504 with cruise or shifting complaints is not a cosmetic code. Schedule the repair soon, and do not treat it as a light to ignore for weeks while the car is driven daily.
Safety tip: Before every drive, have a helper confirm the brake lights come on each time you press the pedal. If they fail, or the pedal feels different, do not drive the car. Arrange a tow to a qualified shop. Never bypass the switch, jumper the brake lights, or cut wires to clear the code. A second fault on the same model is covered in P0500 Toyota Code.
Repair Cost Factors and DIY Versus Shop Work
Repair cost depends on the cause the scanner and meter confirm, the parts involved, and the labor hours the job takes. A switch replacement usually sits at the low end of the range, while computer replacement sits at the high end.
A failed brake light switch is usually the simplest repair. A wiring repair takes more labor hours because the harness must be traced and the damaged section located. Replacing the computer is the costliest path, so replace it only after the switch, fuse and wiring have been cleared.
| Cost factor | Effect on the total | Notes |
|---|---|---|
| Failed brake light switch | Lower parts cost and modest labor | Confirm with live data before buying a part |
| Wiring or connector repair | Higher labor hours | Depends on harness access and how far the fault traces |
| Blown STOP fuse | Low | Confirm the fuse is the cause, not a short that keeps blowing it |
| Brake pedal adjustment | Low labor | Follow the service manual procedure |
| PCM or ECM replacement | Highest parts and labor cost | Rule out the switch and wiring first |
CarParts recommends that less experienced owners consult a certified mechanic. DIYers should use the vehicle’s repair manual, and the article names Chilton and ALLDATA as examples. A repair manual gives the connector layout and test values that a general code page does not.
Shop work bills for diagnostic time, parts and labor. DIY work removes the labor line but adds risk if the diagnosis is wrong, and a wrong diagnosis often means buying parts that do not fix the fault. Weigh the cost of a shop diagnosis against the cost of parts you might not need.
Tip: Ask the shop to show live brake switch readings before they replace parts. A clear reading before and after the repair protects you from paying for a switch when the wiring is the real fault.
Frequently Asked Questions
These answers cover questions the sections above do not address directly, from clearing the code to the recall and fuel trims.
Will clearing a P0504 code fix the problem?
No. Clearing a stored code only removes it from memory, and the code returns if the switch, fuse or wiring still fails. A permanent code does not clear with a scanner; it clears only after the fault is fixed and the monitor passes on its own.
Which Toyota vehicles were built in the recall’s production windows?
NHTSA’s recall file lists two production windows for the affected vehicles. The first runs from July 1, 2008 through February 28, 2009, and the second runs from October 20, 2008 through January 4, 2011.
What happens inside the switch when I let go of the pedal?
CarParts says releasing the pedal depresses a plunger that turns the lights off. Because the switch has to change state in both directions, a stuck or misadjusted switch can leave the two signals in the wrong pattern.
Can a brake switch problem keep the shifter in Park?
It can, according to the NHTSA recall file for these Toyota models. The letter lists a shift lever unable to leave Park and a no-start condition among the possible results of the contact resistance problem. If you see those signs with P0504, treat the switch as the first suspect.
Do fuel trim readings help diagnose P0504?
Not for this fault. Short-term plus long-term fuel trim beyond roughly plus or minus 10 percent combined points to a mixture problem, and the brake switch circuit does not control fueling. If fuel trim codes appear with P0504, treat them as separate issues.
A P0504 on a Toyota means the brake switch signals disagree, so start with live data, the STOP fuse and the switch circuit before you consider replacing the computer. Treat any brake light fault as a safety repair, and do not drive with lights you cannot confirm. Retest after the repair and confirm the brake lights respond every time.
-
Nicole Bennett, Technical Content Editor at BestOBD2Picks Nicole turns OBD-II standards, service bulletins, and repair data into step-by-step diagnostic guides anyone can follow. Technical Content Editor
Related guides
LearnP0500 Toyota Code: Meaning, Causes and How to Check It
LearnP0505 Toyota Tundra: Find the Idle Problem and Avoid Wrong Repairs
LearnP0505 Toyota Prius: Diagnose Idle Problems and Find the Right Repair
LearnP0507 Toyota: Diagnose High Idle and Find the Cause
LearnP0505 Toyota Tacoma: Diagnose Idle Problems and Find the Right Repair
LearnU0101 Code: Lost Communication With the TCM Explained