Skip to content

Commit 245f5f4

Browse files
committed
move the update_trigger to before the SysTick_Config call
1 parent fabfa84 commit 245f5f4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test-app/app_imx_rt.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -124,25 +124,25 @@ void rt1050_init_pins(void)
124124

125125
void main(void)
126126
{
127-
hal_init();
128-
if (wolfBoot_current_firmware_version() == 1) {
129-
wolfBoot_update_trigger();
130-
return;
131-
}
132-
133127
imx_rt_init_boot_clock();
134128
#if defined(CPU_MIMXRT1062DVL6A) || defined(CPU_MIMXRT1064DVL6A)
135129
rt1060_init_pins();
136130
#elif defined(CPU_MIMXRT1052DVJ6B)
137131
rt1050_init_pins();
138132
#endif
139133
SystemCoreClockUpdate();
140-
SysTick_Config(SystemCoreClock / 1000U);
141-
init_debug_console();
142134

143135
PRINTF("wolfBoot Test app, version = %d\r\n",
144136
wolfBoot_current_firmware_version());
145137

138+
if (wolfBoot_current_firmware_version() == 1) {
139+
wolfBoot_update_trigger();
140+
return;
141+
}
142+
143+
SysTick_Config(SystemCoreClock / 1000U);
144+
init_debug_console();
145+
146146
while (1) {
147147
/* 100ms delay */
148148
SDK_DelayAtLeastUs(100 * 1000, SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY);

0 commit comments

Comments
 (0)