Maybe the code needs echo some progress messages to the serial port?
Would have to move the InitUART2(); to earlier in the main()
Then have TransmitString() send output to the serial port before and after each event of significance in the main().
Something like this.
Moving EEPROM data to RAM...
EEPROM data moved.
Initialise timers...
Timers initialised.
High pedal lockout check...
Pedal checked OK.
Precharging...
Precharge complete.
Closing main contactor.
Opening Precharge contactor.
PWM interrupt enabled.
Resetting any faults.
Clear Receive Buffer.
Starting Menu...
It would likely go past to quickly to be seen but if you had a fault then it would stop somewhere giving you a clue as to the cause. Or at least an area to look at.
|