code 42 and code 31 on 1992 Buick Park Avenue

i done a check engine test on my car and it came back code 42 and 31 .i have a 92 buick park avenue ive replace the control module and the map sensor and its still doing it and when the car gets hot it cuts off and when it cools it starts right back up.the code 42 is saying electronic spark timing circut open or shorted.what can i do to fix it ,thanks

Asked by for the 1992 Buick Park Avenue