Skip to content
Snippets Groups Projects
Commit d724d58f authored by dam1n19's avatar dam1n19
Browse files

Fixed Watchdog test (Print taking too long so interrupt triggered before entering loop)

parent a26a980b
No related branches found
No related tags found
1 merge request!1changed imem to rom to allow initial program loading, updated bootloader code...
......@@ -424,6 +424,7 @@ module nanosoc_region_sysio #(
// Interrupt outputs
.apbsubsys_interrupt (SYS_APB_IRQ),
.watchdog_interrupt (SYS_NMI),
// reset output
.watchdog_reset (WDOGRESETREQ)
);
......
......@@ -158,11 +158,11 @@ void main_prog_part_1(void)
}
}
puts("\n- Program watchdog for 10000 cycles");
watchdog_init(10000, 1); /* Generate NMI */
nmi_occurred = 0;
nmi_expected = 0;
puts("- Run loop with watchdog set regularly 10 times\n");
i = 0;
watchdog_init(10000, 1); /* Generate NMI */
while (i<10) {
read_data = CMSDK_WATCHDOG->VALUE;
if (read_data < 8000) //the threshold must be large enough so that the NMI interrupt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment