|
|
|
|
|
|
|
|
IOMUXC_GPR_GPR29 = 0xFFFFFFFF; |
|
|
IOMUXC_GPR_GPR29 = 0xFFFFFFFF; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// Undo PIT timer usage by ROM startup |
|
|
|
|
|
CCM_CCGR1 |= CCM_CCGR1_PIT(CCM_CCGR_ON); |
|
|
|
|
|
PIT_MCR = 0; |
|
|
|
|
|
PIT_TCTRL0 = 0; |
|
|
|
|
|
PIT_TCTRL1 = 0; |
|
|
|
|
|
PIT_TCTRL2 = 0; |
|
|
|
|
|
PIT_TCTRL3 = 0; |
|
|
|
|
|
|
|
|
|
|
|
// must enable PRINT_DEBUG_STUFF in debug/print.h |
|
|
// must enable PRINT_DEBUG_STUFF in debug/print.h |
|
|
printf_debug_init(); |
|
|
printf_debug_init(); |
|
|
printf("\n***********IMXRT Startup**********\n"); |
|
|
printf("\n***********IMXRT Startup**********\n"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
asm volatile("nop\n nop\n nop\n nop": : :"memory"); // why oh why? |
|
|
asm volatile("nop\n nop\n nop\n nop": : :"memory"); // why oh why? |
|
|
|
|
|
|
|
|
|
|
|
// Undo PIT timer usage by ROM startup |
|
|
|
|
|
CCM_CCGR1 |= CCM_CCGR1_PIT(CCM_CCGR_ON); |
|
|
|
|
|
PIT_MCR = 0; |
|
|
|
|
|
PIT_TCTRL0 = 0; |
|
|
|
|
|
PIT_TCTRL1 = 0; |
|
|
|
|
|
PIT_TCTRL2 = 0; |
|
|
|
|
|
PIT_TCTRL3 = 0; |
|
|
|
|
|
|
|
|
// initialize RTC |
|
|
// initialize RTC |
|
|
if (!(SNVS_LPCR & SNVS_LPCR_SRTC_ENV)) { |
|
|
if (!(SNVS_LPCR & SNVS_LPCR_SRTC_ENV)) { |
|
|
// if SRTC isn't running, start it with default Jan 1, 2019 |
|
|
// if SRTC isn't running, start it with default Jan 1, 2019 |