C0040: Brake Pedal Switch A
C0040 reports a fault on brake pedal switch A, the first of two switch signals that tell the brake, engine and transmission modules the pedal is pressed. Mazda defines C0040:24 as a circuit malfunction of brake switch signal no. 1; on the 2024 CX-90 it appears with P0504 and a push button start warn
Can you drive with C0040?
Severity: Fix promptly. Yes, carefully — the brakes still work, but ABS (and usually traction/stability control) is disabled.
If you ignore it: You lose the anti-lock safety net exactly when you need it — a panic stop or a wet road. Wheel-speed faults can also confuse the transmission and speedometer.
This is the #19 most common code in our top-150 library, in the abs & brakes (c-codes) family (Chassis system). Severity is Number Nest's editorial triage — if the light is flashing or the car feels unsafe, stop driving it whatever any page says.
What C0040 means
C0040 reports a fault on brake pedal switch A, the first of two switch signals that tell the brake, engine and transmission modules the pedal is pressed. Mazda defines C0040:24 as a circuit malfunction of brake switch signal no. 1; on the 2024 CX-90 it appears with P0504 and a push button start warning, and service alert SA-062-23 cures it by moving the switch one adjustment notch. Ford sees C0040 with P0504 on 2020-2022 F-Super Duty trucks that cannot be moved out of park, pointing to corrosion inside the battery junction box or a damaged shift-interlock circuit. Typical effects are stop lamps that stay lit (Ford TSB 22-2044), a start system warning and a shift interlock that will not release. Older GM vehicles use C0040 for a wheel speed sensor circuit in their own scheme.
Systems involved: brake pedal switch a.
Causes, ranked by likelihood
| # | Cause | Likelihood |
|---|---|---|
| 1 | Brake switch out of adjustment (Mazda SA-062-23) | most likely |
| 2 | Water or corrosion in the battery junction box (Ford TSB 22-2044) | possible |
| 3 | Damaged switch or shift-interlock wiring | possible |
| 4 | Brake switch failed internally | less common |
Check them in order — the list is ranked so the likely, cheaper causes come before the expensive part.
Symptoms you may notice
- Stop lamps stay on or do not light
- Vehicle will not shift out of park
- Push button start malfunction warning (Mazda)
Misdiagnosis traps
- Replacing the part named by the code title without testing. The code reports a failed self-test; the cause list above is ranked so the likely, cheap causes are checked before the expensive part is condemned.
- Clearing the code and declaring victory when the light stays off for a day — the monitor that sets this code runs only under specific driving conditions.
(General diagnostic guidance for this code family — no code-specific trap is published for this code.)
How a good shop confirms it
- Confirm the code and record any companion codes — companions narrow the system fast.
- Inspect the affected components and their wiring/connectors for damage, corrosion and looseness.
- Test the top-ranked cause with live data or a multimeter before replacing anything.
(Standard diagnostic path for this family, labeled as general guidance.)
Repair options & costs
| Repair | Shop total (parts + labor) | DIY (parts only) | Difficulty |
|---|---|---|---|
| ABS wheel speed sensor | $123 – $350 | $60 – $200 (parts only) | 2/5 |
National ranges from Number Nest's cost model (midsize car, independent shop, US-average labor). Published cross-check — ABS wheel speed sensor: CarMD 2026 national average $314.
OBDex repair data for this code rates the job difficulty easy with a typical labor time in the 0.3–1 hour range and DIY possible: yes.
Price this repair in your state
Estimated total: — (midsize car, independent shop)
Frequently asked questions
How much does it cost to fix C0040?
The fix most associated with this code — abs wheel speed sensor — runs $123 – $350 at an independent shop for a midsize car in our cost model (parts + labor, US average). The code names a system, not a part, so confirm the cause before spending: the ranked causes above are ordered by likelihood.
Can I drive with C0040?
See the can-you-drive verdict above — it is based on the system involved and the cascading-damage risk, and it is our editorial triage, not a manufacturer instruction. If the light is flashing or the car feels unsafe, stop driving it regardless of any code.
Will C0040 clear itself?
If the fault was a one-off (a loose cap, a cold-start glitch), the light can go out after several clean trips and the code ages into history. A fault that is still present re-sets the code as soon as the car runs that self-test again — monitors run under specific conditions, which is why "it hasn't come back in two days" is not proof of a fix.
Will my car fail inspection with C0040?
In states with OBD-based emissions inspection, yes — an illuminated check-engine light or an incomplete readiness monitor fails the test regardless of what the tailpipe would show. C-codes (ABS) fall under safety inspection instead in states that have one.
What should I check first for C0040?
The first item on the ranked-causes list above — it is ranked likelihood-first for exactly this reason — plus the free checks: recent work in the area (connectors left loose are a classic), fluid levels, and the battery and grounds on electrical codes.
Where this data comes from
Code facts, causes and symptoms come from OBDex — an open dataset of independently authored descriptions of the standardized generic OBD-II codes (CC0 1.0, public domain; github.com/foerbsnavi/OBDex). The SAE J2012 document itself is copyrighted and is not reproduced here. Cost ranges are Number Nest's own US planning model: national parts and labor ranges cross-checked against the CarMD Vehicle Health Index 2026 published averages, with labor adjustable by the BLS OEWS May 2025 state wage index for auto technicians (occupation 49-3023) — a wage index, not a surveyed shop rate. Severity and can-you-drive notes are our editorial triage, not a manufacturer instruction.