92 #include "HL_sys_common.h"
93 #include "HL_system.h"
94 #include "HL_sys_vim.h"
95 #include "HL_sys_core.h"
97 #include "HL_sys_mpu.h"
98 #include "HL_errata_SSWF021_45.h"
115 #define PLL_RETRIES 5U
135 register resetSource_t rst_source;
137 if ((SYS_EXCEPTION & (uint32)POWERON_RESET) != 0U)
140 rst_source = POWERON_RESET;
142 else if ((SYS_EXCEPTION & (uint32)EXT_RESET) != 0U)
145 if ((SYS_EXCEPTION & (uint32)OSC_FAILURE_RESET) != 0U)
148 rst_source = OSC_FAILURE_RESET;
150 else if ((SYS_EXCEPTION & (uint32)WATCHDOG_RESET) !=0U)
153 rst_source = WATCHDOG_RESET;
155 else if ((SYS_EXCEPTION & (uint32)WATCHDOG2_RESET) !=0U)
158 rst_source = WATCHDOG2_RESET;
160 else if ((SYS_EXCEPTION & (uint32)SW_RESET) != 0U)
163 rst_source = SW_RESET;
168 rst_source = EXT_RESET;
171 else if ((SYS_EXCEPTION & (uint32)DEBUG_RESET) !=0U)
174 rst_source = DEBUG_RESET;
176 else if ((SYS_EXCEPTION & (uint32)CPU0_RESET) !=0U)
179 rst_source = CPU0_RESET;
184 rst_source = NO_RESET;
191 #pragma CODE_STATE(_c_int00, 32)
192 #pragma INTERRUPT(_c_int00, RESET)
198 register resetSource_t rstSrc;
201 _coreInitRegisters_();
204 _coreInitStackPointer_();
218 if (_errata_SSWF021_45_both_plls(
PLL_RETRIES) != 0U)
228 if(rstSrc != POWERON_RESET)
237 _coreEnableEventBusExport_();
243 if ((esmREG->SR1[2]) != 0U)
245 esmGroup3Notification(esmREG,esmREG->SR1[2]);
252 _coreEnableIrqVicOffset_();
262 case OSC_FAILURE_RESET:
266 case WATCHDOG2_RESET:
275 _coreEnableEventBusExport_();