94 #include "HL_sys_common.h"
95 #include "HL_system.h"
96 #include "HL_sys_vim.h"
97 #include "HL_sys_core.h"
99 #include "HL_sys_mpu.h"
100 #include "HL_errata_SSWF021_45.h"
111 #define STU_PLL_RETRIES (5u)
139 register resetSource_t rst_source;
141 if ((SYS_EXCEPTION & (uint32)POWERON_RESET) != 0U) {
143 rst_source = POWERON_RESET;
144 }
else if ((SYS_EXCEPTION & (uint32)EXT_RESET) != 0U) {
146 if ((SYS_EXCEPTION & (uint32)OSC_FAILURE_RESET) != 0U) {
148 rst_source = OSC_FAILURE_RESET;
149 }
else if ((SYS_EXCEPTION & (uint32)WATCHDOG_RESET) != 0U) {
151 rst_source = WATCHDOG_RESET;
152 }
else if ((SYS_EXCEPTION & (uint32)WATCHDOG2_RESET) != 0U) {
154 rst_source = WATCHDOG2_RESET;
155 }
else if ((SYS_EXCEPTION & (uint32)SW_RESET) != 0U) {
157 rst_source = SW_RESET;
160 rst_source = EXT_RESET;
162 }
else if ((SYS_EXCEPTION & (uint32)DEBUG_RESET) != 0U) {
164 rst_source = DEBUG_RESET;
165 }
else if ((SYS_EXCEPTION & (uint32)CPU0_RESET) != 0U) {
167 rst_source = CPU0_RESET;
170 rst_source = NO_RESET;
177 #pragma CODE_STATE(_c_int00, 32)
178 #pragma INTERRUPT(_c_int00, RESET)
183 register resetSource_t rstSrc;
186 _coreInitRegisters_();
189 _coreInitStackPointer_();
211 if (rstSrc != POWERON_RESET) {
219 _coreEnableEventBusExport_();
225 if ((esmREG->SR1[2]) != 0U) {
226 esmGroup3Notification(esmREG, esmREG->SR1[2]);
233 _coreEnableIrqVicOffset_();
243 case OSC_FAILURE_RESET:
247 case WATCHDOG2_RESET:
256 _coreEnableEventBusExport_();
Assert macro implementation.
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define FAS_TRAP
Define that evaluates to essential boolean false thus tripping an assert.
void _c_int00(void)
Startup Routine.
static void STU_HandlePllLockFail(void)
Handler for a failed PLL lock.
static resetSource_t STU_GetResetSourceWithoutFlagReset(void)
Get reset flag.
void __TI_auto_init(void)
initialize global variable and constructors
int main(void)
main function of foxBMS