Hello,
I have to modify _c_init00() to handle an external watchdog connected to nRST. I know this module has evolved over many years of HALCoGen versions on many processors, so I don't take this change lightly.
My first question is:
Only one cause of a reset is processed each pass of _c_init00(). The TRM says that the reset source status bits in SYSESR are not automatically cleared if a new reset occurs. If more than one bit is set in SYSESR (with the exception of PORST), one will be processed and cleared while the others will remain set and unprocessed. Is there any reason not to check all reset sources by using an "if" rather than an "else if"?
Thanks, Charlie Johnston