P0504 Mazda: Diagnose Brake Switch Problems and Restore Safe Operation
20 min read · by Nicole Bennett · Last updated: November 25, 2026
The p0504 mazda diagnostic trouble code indicates that the brake switch signals do not correlate correctly, pointing to a possible brake light switch, wiring, connector, or control module problem. Mazda vehicles can use two brake-switch signal circuits so the powertrain control module (PCM) can verify brake pedal operation. When these signals disagree or behave unexpectedly, the computer may store P0504.
A faulty brake switch is a common possibility, but replacing it immediately is not always the right repair. Damaged wiring, poor electrical connections, a power supply problem, or an incorrect control module input can produce the same code. The exact detection conditions and circuit arrangement depend on the Mazda model, engine, and electrical system.
This guide explains what P0504 means, which symptoms to watch for, how to diagnose the fault with an OBD2 scanner, and which repairs may be necessary. It also covers a documented 2024 Mazda CX-90 software issue and explains when continuing to drive could create a safety risk.
What P0504 Means on a Mazda
P0504 is the generic SAE definition for Brake Switch A/B Correlation. It means the vehicle’s computer has detected an unexpected relationship between two brake pedal switch signals. Mazda service information describes the related fault as a brake switch circuit problem, although the exact detection strategy varies across models.
The brake pedal switch communicates whether the driver is pressing or releasing the brake pedal. Depending on the Mazda electrical design, the system can use two internal contacts or separate signal circuits. These signals allow the PCM and other vehicle modules to verify that brake pedal information is plausible.
For example, when the driver presses the pedal, the brake switch signals should change according to their intended operating logic. When the pedal is released, they should return to their normal resting states. If both signals remain ON or both remain OFF when the system expects different states, the PCM may identify a correlation problem.
Understanding the two brake signals
The A and B labels identify related brake-switch signal channels. They do not necessarily represent two separate brake pedal assemblies or two independently replaceable switches. Their electrical arrangement depends on the specific Mazda application.
On a documented Mazda M Hybrid application, the PCM monitors brake switch No. 1 and No. 2. The service information describes a detection condition in which both signals remain ON or both remain OFF for at least 3 seconds, with the condition repeated five times during brake operation. This is a vehicle-specific example, not a universal threshold for every Mazda.
Some older Mazda applications use different signal arrangements. For example, the documented Mazda3 MZ-CD 1.6 diagnostic procedure checks brake switch A and brake switch B separately and uses a BOO scan-tool parameter to observe brake signal operation. This is why technicians should use the correct wiring diagram and diagnostic procedure for the vehicle being repaired.
| Code element | Meaning |
|---|---|
| P | Powertrain-related diagnostic code |
| 0 | Generic SAE code category |
| 504 | Brake Switch A/B Correlation |
| P0504:00 | Mazda diagnostic notation for a brake switch circuit problem |
P0504 is a generic powertrain code, so the basic definition is standardized. However, Mazda’s diagnostic logic, circuit layout, and repair instructions can differ between generations. Do not assume that a procedure for an older Mazda3 also applies to a newer CX-5, CX-30, CX-90, or Mazda3 with a different powertrain. Seeing the code on another make? Start with P0504 Honda Code.
Common Symptoms and Warning Signs
P0504 can cause brake light problems, warning lights, and unexpected vehicle behavior. Some Mazda vehicles may store the code before the driver notices a major change. The most important initial check is whether the brake lights respond correctly to pedal movement.

Because the brake switch provides information to several vehicle systems, the symptoms may extend beyond the rear brake lights. The severity depends on which circuit has failed and how the vehicle responds to the incorrect signal.
Brake lights stay illuminated
If the brake switch incorrectly reports that the pedal is pressed, the rear brake lights may remain illuminated even after the driver releases the pedal. This can confuse drivers behind the vehicle and create unnecessary brake light activation.
Constantly illuminated brake lights can also drain the battery while the vehicle is parked. If the lights remain on, avoid leaving the vehicle unattended with the fault unresolved. A technician should identify whether the switch is mechanically stuck, incorrectly adjusted, or receiving an unwanted electrical signal.
Brake lights do not illuminate
An electrical fault or failed switch contact can prevent the brake lights from illuminating when the pedal is pressed. This is particularly dangerous because drivers behind the vehicle may not receive a warning that it is slowing down.
Check whether the left, right, and center high-mounted brake lights operate normally. A single failed bulb or lamp circuit can create a separate lighting problem, so the entire system should be inspected rather than assuming every lighting symptom comes from the brake switch.
Check engine light or additional warning messages
Depending on the Mazda model and calibration, P0504 may illuminate the check engine light or remain stored in the PCM without an obvious dashboard warning. Some vehicles can also display additional warnings if related modules receive inconsistent brake information.
A warning message does not automatically mean that the hydraulic braking system has lost pressure. P0504 primarily identifies an electrical signal correlation problem. Nevertheless, any change in actual braking performance must be treated as a separate and potentially serious issue.
Other possible driving symptoms
- Cruise control may fail to engage or may cancel unexpectedly because the vehicle cannot reliably determine brake pedal status.
- Automatic transmission or shift-interlock operation may be affected if the brake signal is incorrect.
- Push-button starting may become unreliable if the vehicle does not recognize the required brake pedal input.
- Brake-related warning messages may appear alongside the stored diagnostic code.
- The vehicle may have no noticeable driving symptoms apart from an illuminated warning light.
The presence or absence of these symptoms does not establish which component has failed. Recording the symptoms before clearing the code helps a technician reproduce the original problem and choose the correct diagnostic path.
Most Common Causes of P0504 on Mazda Vehicles
A brake switch fault is an important possibility, but Mazda’s service procedures identify several electrical causes that can produce the same code. The switch, power supply, ground, signal wiring, connectors, BCM, and PCM may all require inspection.

1. Faulty brake pedal switch
The brake pedal switch is responsible for translating pedal movement into electrical signals. Internal contact wear, mechanical damage, contamination, or incorrect adjustment can prevent the signal circuits from changing as expected.
A worn switch may work intermittently. For example, the brake lights may operate normally during one pedal application but fail during another. A scanner may show one brake signal changing while the other remains in the same state.
Do not automatically replace the switch simply because P0504 is present. Confirm that the switch receives the correct power and ground connections and that its output changes according to the vehicle-specific service specifications.
2. Damaged wiring or electrical shorts
Wiring faults are another significant possibility. An open circuit interrupts electrical continuity, while a short to ground or power can force a signal into an incorrect state.
Common areas requiring inspection include the wiring around the brake pedal, harness connectors, ground connections, and circuit sections between the switch and the relevant control module. Damaged insulation, stretched wires, corrosion, and previous repair work can all contribute to intermittent faults.
Mazda’s M Hybrid diagnostic information specifically includes an open or shorted No. 1 power supply circuit, an open No. 2 ground circuit, and signal circuit faults among the possible causes. These examples should not be treated as universal terminal assignments for other Mazda models.
3. Poor connector contact or corrosion
A loose connector, damaged terminal, corrosion, or pulled-out pin can interrupt the brake switch signal. The problem may become worse with vibration or changes in temperature, making the code intermittent.
Technicians should inspect connector locking tabs, terminal condition, pin alignment, and signs of moisture. A connector can appear physically attached while an individual terminal has lost proper electrical contact.
4. Power supply or ground problems
The brake switch needs the correct electrical supply and ground path to generate reliable signals. A blown fuse, damaged supply wire, or poor ground can prevent the switch from operating correctly.
On certain documented Mazda applications, the diagnostic procedure identifies the MAIN 200 A fuse and STOP 10 A fuse as components to inspect when the specified brake switch power supply is missing. These fuse ratings are application-specific. Always check the fuse chart for the exact vehicle instead of using these values on every Mazda.
5. Body control module or PCM problems
The body control module and powertrain control module can influence how brake-switch signals are processed and communicated. A damaged module connector, internal electronic fault, or CAN communication problem can cause an incorrect signal relationship.
Module failure should generally be considered after the switch, wiring, power supplies, grounds, and connectors have been checked. Replacing a PCM without confirming the electrical circuits can lead to unnecessary expense and may not correct the original fault.
6. Mazda-specific PCM software issues
Some P0504 complaints can be related to control module calibration rather than a physically defective brake switch. Mazda issued a service bulletin for certain 2024 CX-90 H3T mild-hybrid and plug-in hybrid vehicles with P0504:00 stored in the PCM.
The bulletin identifies vehicles produced before November 3, 2023, within the specified VIN range. Mazda explained that the PCM could incorrectly read the brake switch input and prescribed a software update when the existing calibration required it.
This is an important distinction. A software-related P0504 on an eligible CX-90 does not prove that the brake switch is defective. Owners of potentially affected vehicles should ask a Mazda dealer to check the VIN, campaign history, and PCM calibration before replacing hardware. The same code can behave differently on other vehicles, so it helps to compare it with P0504 Lexus.
The actual bulletin is available through the NHTSA-hosted Mazda service bulletin.
How to Diagnose P0504 With an OBD2 Scanner
A structured diagnosis can identify whether the problem comes from the brake switch, its electrical circuits, or a control module. Start with the stored diagnostic information and then compare the brake-switch signals with actual pedal movement.
A basic OBD2 scanner can retrieve the generic P0504 code and related powertrain codes. A Mazda-enhanced diagnostic tool may be necessary to access additional module information, individual switch inputs, and manufacturer-specific data parameters.
Step 1: Read stored, pending, and permanent codes
Connect the scanner to the vehicle’s 16-pin OBD2 diagnostic port, usually located beneath the dashboard on the driver side. Turn the ignition on according to the scanner instructions and perform a complete diagnostic scan.
Record all available code categories rather than focusing exclusively on P0504. A related P0703, for example, may provide additional information about the brake switch circuit. Communication codes or other electrical faults may also help identify a common wiring or module problem.
- Stored codes identify confirmed faults recorded by the control module.
- Pending codes indicate that a fault has been detected but has not yet met the conditions for full confirmation.
- Permanent codes remain stored until the vehicle’s onboard monitoring system verifies that the underlying problem has been repaired.
Step 2: Save freeze-frame information
Before clearing anything, save the freeze-frame data associated with P0504. Freeze-frame information records operating conditions when the fault was detected and may help distinguish an intermittent problem from a repeatable electrical failure.
Useful information includes engine speed, vehicle speed, engine load, system voltage, coolant temperature, and any available brake-related parameters. Not every scanner displays every parameter, and some Mazda modules provide additional snapshot information through manufacturer-enhanced tools.
For example, a fault recorded while the vehicle was moving may require a different diagnostic approach from one that appears repeatedly during stationary brake pedal operation. Preserve this information before disconnecting components or erasing diagnostic memory.
Step 3: Monitor brake switch live data
Open the live data menu and search for parameters related to the brake pedal switch. Depending on the scanner and Mazda application, the labels may include Brake Switch, Brake Switch No. 1, Brake Switch No. 2, Stop Lamp Switch, or BOO (Brake On/Off).
With the vehicle stationary and secured, observe the displayed values while the brake pedal is operated. The signals should change according to the manufacturer’s specified logic. Some systems use opposite switching states, so do not assume both parameters must display the same value.
| Scanner observation | Possible interpretation | Next check |
|---|---|---|
| Both signals remain ON | Possible signal correlation fault | Check switch operation and circuit states |
| Both signals remain OFF | Possible missing supply, ground, or switch output | Check power, ground, and switch inputs |
| One signal changes, the other stays fixed | Possible switch contact or circuit fault | Inspect the affected signal path |
| Both signals change according to specification | Fault may be intermittent or software-related | Review freeze-frame data and related service information |
These observations are diagnostic clues, not universal Mazda voltage or switching specifications. The actual expected signal states must come from the correct model-specific service information.
Step 4: Check the brake lights
Verify whether the exterior brake lights illuminate when the pedal is pressed and switch off when it is released. Check the center high-mounted brake light along with the left and right rear lamps.
Compare the physical lamp behavior with the scanner’s live data. If the scanner reports that the brake pedal is pressed while the lights remain off, the fault may involve the switch signal, lamp circuit, or module control logic. If the lights remain on while the scanner reports that the pedal is released, further electrical diagnosis is necessary.
Step 5: Inspect related electrical circuits
After reviewing the scanner results, a qualified technician can inspect the brake switch connector, wiring condition, power supply, ground, and control module connections. Electrical testing should follow the vehicle-specific wiring diagram and terminal specifications.
On the documented Mazda M Hybrid application, the diagnostic procedure checks the No. 1 power supply, No. 2 ground circuit, BCM connector, signal wiring, PCM connector, and CAN communication circuit. It then proceeds to component testing of the brake switch and control modules.
Mazda also advises checking related diagnostic information and recording freeze-frame data before proceeding with component replacement. The full sequence is described in the Mazda M Hybrid P0504 diagnostic procedure.
Tip: Do not remove or reposition a Mazda brake switch simply to see whether the code disappears. Mazda specifically warns that the switch must be inspected while installed on the brake pedal on the documented M Hybrid application. Removing it can affect normal operation, and the service information requires replacement if it has been removed. Electrical measurements, connector repairs, and module testing should follow the correct factory procedure.
Step 6: Clear the code and verify the repair
Clear P0504 only after the suspected problem has been repaired. Operate the brake pedal and monitor the switch signals again. Check whether the rear brake lights respond correctly and whether any warning messages return.
Mazda’s documented M Hybrid verification procedure includes switching the ignition ON with the engine OFF, holding the brake pedal for at least 3 seconds, and then depressing and releasing it five times. The technician subsequently checks whether the pending code returns.
A successful repair should restore correct brake signal behavior and prevent the original fault from returning under the applicable monitoring conditions. Permanent codes may require additional normal driving and successful onboard monitor completion before they disappear. The test is only as good as the tool, so compare options in Best Bidirectional Scan Tools for Mazda.
How Serious Is P0504 and Can You Drive?
P0504 deserves prompt attention because the brake switch is part of an important vehicle safety and control system. Whether a Mazda can be driven depends on the actual brake light operation, pedal response, warning messages, and any additional braking-related symptoms.
The code does not automatically mean that the hydraulic brakes have failed. However, it can indicate that the vehicle cannot reliably interpret the brake pedal position. This can affect brake light activation, cruise control, starting authorization, and other electronic functions.
When driving is not recommended
- The brake lights do not illuminate when the pedal is pressed.
- The brake lights remain illuminated after the pedal is released.
- The brake pedal feels unusually soft, sinks, or requires significantly more force than normal.
- A red brake warning light appears alongside abnormal braking behavior.
- The vehicle displays additional warnings suggesting a brake system malfunction.
- The driver cannot reliably determine whether the brake lights and pedal-related systems are operating correctly.
If the brake lights are inoperative, the vehicle should not be driven on public roads. If actual braking performance is abnormal, stop in a safe location and arrange professional assistance or towing. A functioning hydraulic pedal does not eliminate the danger of missing brake lights.
When a short trip may be possible
If the brake lights operate correctly, the brake pedal feels normal, and there are no additional braking warnings, the vehicle may have an electrical signal fault without an immediate loss of hydraulic braking performance. However, this does not guarantee that every related system is working correctly.
The safest approach is to have the vehicle inspected promptly. Avoid unnecessary journeys, high-speed driving, and situations where unexpected cruise control or starting behavior could create additional risk. If the brake lights behave inconsistently, arrange towing rather than taking chances.
Safety: Never test brake light operation by driving on public roads with an unresolved brake-switch fault. Have another person observe the lights while the vehicle is stationary, or use a suitable inspection method. Do not bypass the brake switch, bridge electrical terminals, or disable a brake-related warning system to keep the vehicle operating. Problems involving the actual braking system require immediate professional inspection.
What about repair costs?
The cost of repairing P0504 depends on the actual failure rather than the diagnostic code alone. A straightforward brake switch replacement generally involves less work than tracing an intermittent wiring fault or diagnosing a control module communication problem.
Several factors affect the final repair bill:
- Parts: The price depends on whether the fault involves a brake switch, connector, wiring repair, fuse, or control module.
- Labor time: Switch access and replacement may be relatively straightforward, while electrical fault tracing can require additional diagnostic hours.
- Diagnostic equipment: Enhanced Mazda scan-tool access may be necessary to examine module data and perform calibration checks.
- Software updates: Certain model-specific concerns may require PCM reprogramming and associated initialization procedures.
- Repair location: Independent repair facilities and authorized Mazda dealers may have different labor rates and diagnostic capabilities.
DIY repairs may be possible for an owner with suitable electrical diagnostic experience and the correct service information. However, brake pedal switch adjustment, circuit testing, and control module programming should not be attempted without understanding the specific vehicle’s electrical system. Replacing parts without testing can increase the total repair cost.
Mazda Model Differences and Important Service Information
P0504 uses the same generic SAE definition across OBD2-equipped vehicles, but Mazda’s diagnostic procedures are not identical across its model range. Different generations can use different brake-switch configurations, module communication paths, and fault detection conditions.
The available Mazda service information provides examples from older Mazda3 vehicles, newer SKYACTIV applications, M Hybrid models, and the 2024 CX-90. These examples demonstrate why vehicle identification and engine configuration matter before beginning a repair.
Mazda3
A documented Mazda3 MZ-CD 1.6 procedure identifies P0504 as a brake switch A/B correlation fault. Its diagnostic process uses the BOO parameter to evaluate brake signal behavior and checks switch connectors, power supply, wiring continuity, and PCM connections.
This older diesel application should not be used as a universal wiring reference for later Mazda3 models. The terminal numbers and circuit arrangement may be different on other engines and model years.
Mazda CX-5 and CX-30
Newer SKYACTIV-G applications use their own P0504:00 detection and diagnostic procedures. Service information for certain CX-5 configurations identifies the brake switch No. 1 and No. 2 signals remaining simultaneously ON or OFF for at least 3 seconds, with the condition repeated five times.
The documented CX-30 M Hybrid procedure includes additional checks involving the BCM, PCM, signal circuits, and CAN communication. On these vehicles, the code should not be treated as a simple instruction to replace the brake pedal switch.
Mazda CX-90
Certain early-production 2024 CX-90 H3T mild-hybrid and plug-in hybrid vehicles have a documented P0504:00 software concern. Mazda identified incorrect PCM interpretation of the brake-switch input and prescribed software reprogramming for eligible vehicles.
The applicable bulletin specifies a VIN production cutoff and different calibration information for the relevant powertrain configurations. An owner should have the dealer check the vehicle identification number and existing software before assuming that the bulletin applies.
The bulletin also describes additional initialization requirements after reprogramming, including recording battery state-of-charge information beforehand on the specified applications. This work should be performed using Mazda’s prescribed diagnostic equipment and procedures.
What information should you provide to a repair shop?
To avoid unnecessary diagnosis, provide the technician with the Mazda’s model year, model, engine, transmission type, and VIN. Include the exact code, any related codes, and whether the problem occurs continuously or intermittently.
Also explain whether the brake lights remain on, fail to illuminate, or operate normally. Mention any recent battery replacement, electrical work, brake pedal repairs, or modifications around the dashboard and pedal area.
If the vehicle is a potentially affected 2024 CX-90, specifically request a check of the applicable Mazda service bulletin and PCM calibration. For other models, the correct repair information should be selected using the VIN and powertrain details. P0500 Mazda covers another issue owners of this vehicle run into.
Frequently Asked Questions
Does P0504 mean my Mazda will fail an emissions inspection?
Not necessarily. P0504 is a brake-switch correlation fault rather than a direct indication of an emissions component failure. However, if the code illuminates the check engine light or affects OBD readiness, it may influence an emissions inspection depending on the state program and vehicle requirements.
Can a weak battery cause P0504 on a Mazda?
Low system voltage can contribute to unusual electronic behavior, but it does not establish the cause of P0504. Mazda’s diagnostic procedures emphasize checking the brake switch power supply, ground, connectors, and signal circuits. Battery and charging system condition should be assessed when other electrical symptoms or related codes are present.
Can P0504 prevent a Mazda with push-button start from starting?
It can contribute to a starting authorization problem if the vehicle cannot recognize the required brake pedal input. Push-button starting systems depend on receiving the appropriate brake signal before authorizing certain starting operations. The exact behavior depends on the model and the nature of the electrical fault.
Will disconnecting the Mazda battery permanently erase P0504?
No. Disconnecting the battery is not a reliable repair or a guaranteed way to remove the code. The underlying fault can cause P0504 to return, and battery disconnection may also reset other learned settings or require additional initialization procedures on some Mazda vehicles.
Can P0504 appear without an illuminated check engine light?
Yes. Some Mazda diagnostic applications can store P0504 in module memory without immediately illuminating the malfunction indicator lamp. An enhanced scan tool can help identify stored or pending information that may not be obvious from the dashboard.
P0504 on a Mazda indicates a brake switch signal correlation problem, not automatic proof of a failed switch. Check brake light operation, preserve scanner and freeze-frame information, and diagnose the switch, wiring, power supply, and control modules before replacing parts. Because brake signal faults can affect important safety functions, arrange prompt professional inspection whenever brake lights or pedal-related systems behave abnormally.
-
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
LearnP0606 Mazda: Diagnose PCM Processor Faults Before Replacing the Computer
LearnP0010 Mazda: Diagnose the Camshaft Actuator Circuit Fault
LearnP0780 Mazda: Diagnose Transmission Shifting Problems
LearnP1000 Mazda: Understand Readiness Monitors and Pass Emissions
LearnP0016 Mazda: Diagnose the Cause Before Replacing Parts
LearnGeorgia Emissions Test Requirements: Counties, Vehicles and Retests