1. Disconnect the negative battery cable..
2. Remove the front map light..
3. Verify that the continuity between the sunroof switch terminals is as indicated in the table.

If not as indicated in the table, replace the sunroof switch.

Sunroof Switch Removal/InstallationCamshaft Position (CMP) Sensor Removal/Installation
CAUTION:
When replacing the CMP sensor, make sure there is no foreign material on
it such as metal shavings. If it is installed with foreign material, the sensor
output signal will malfunction resulting from fluctuation in magnetic flux and
cause a deterioration in engine control.
...
Keyless Antenna [Keyless Entry System]
Purpose
Outputs a request signal and specifies the remote transmitter location.
Function
The keyless antennas output request signals based on the signals from the
start stop unit.
Construction, Operation
Request signals are output by the keyless antenna installed ...
Customer Assistance (Canada)
Satisfaction Review Process
Your complete and permanent satisfaction is of primary concern to Mazda. All
Authorized Mazda Dealers have both the knowledge and tools to keep your Mazda in
top condition. In our experience, any questions, problems, or complaints regarding
the operation of your Ma ...