RE: P0402 & no start when hot - Miata 2000
the p0402 code is usually a clogged vacuum port that those vacuum lines are hooked onto the (surge tank) intake manifold. usually a drill bit in to the metal nipple on the intake will unclog it. plus the egr port directly behind the throttle body (you have to remove it) will also clog with corbon.
the other code is a Camshaft position (CMP) sensor circuit malfunction. this can be caused by an unconnected crank or cam pos. sensor anytime while cranking. or it could be a failing crank sensor. did you recently have the timing belt done? they could have damaged the sensor, wires, or crank trigger wheel.
the starting issue and misfiresare almost always a coil issue. the ignitoin module is not on t coil though. it is pcm controlled & not a separate unit or anything. i would replace the ignition coil. i've seen bad wires & plugs cause the ign coil to fail.
Mazda's paid for my Ford.