why would my breaks pulsate and my check engine light come on. on 2003 Mazda Mazda6

the pulsation occurs when applying brakes to stop and the check engine light is on or it blinks on and off.

Asked by for the 2003 Mazda Mazda6
Agree with #1. Get the engine code read for free at a parts store and post the code here.
1 more answer
Sounds like 2 differant problems...pulsating when applying brakes typicaly means you have warped brake rotor disc and a flashing check engine light typicaly means the computer is detecting a miss fire in engine...that could damage catalytic converter if it not repaired.