URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
Subversion Repositories neorv32
Compare Revisions
- This comparison shows the changes necessary to convert path
/neorv32/trunk/sw/bootloader
- from Rev 12 to Rev 13
- ↔ Reverse comparison
Rev 12 → Rev 13
/bootloader.c
242,7 → 242,8
// ------------------------------------------------ |
neorv32_uart_print("\n\nAutoboot in "xstr(AUTOBOOT_TIMEOUT)"s. Press key to abort.\n"); |
|
uint64_t timeout_time = (uint64_t)(AUTOBOOT_TIMEOUT * clock_speed); |
uint64_t timeout_time = neorv32_mtime_get_time() + (uint64_t)(AUTOBOOT_TIMEOUT * clock_speed); |
|
while ((UART_DATA & (1 << UART_DATA_AVAIL)) == 0) { // wait for any key to be pressed or timeout |
|
if (neorv32_mtime_get_time() >= timeout_time) { // timeout? start auto boot sequence |
574,6 → 575,7
neorv32_cpu_dint(); // deactivate IRQs |
neorv32_gpio_port_set(1 << STATUS_LED); // permanently light up status LED |
|
asm volatile ("wfi"); // power-down |
while(1); // freeze |
} |
|