mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-23 13:47:33 -04:00
[bootloader] go to sleep on error
This commit is contained in:
parent
b7bb900618
commit
d458937ee9
2 changed files with 6 additions and 3 deletions
|
@ -203,7 +203,7 @@ is no valid boot image found, and error code will be shown.
|
|||
==== Bootloader Error Codes
|
||||
|
||||
If something goes wrong during bootloader operation an error code and a short message is shown. In this case the processor
|
||||
is halted, the bootloader status LED is permanently activated and the processor has to be reset manually.
|
||||
is halted (entering <<_sleep_mode>>), the bootloader status LED is permanently activated and the processor has to be reset manually.
|
||||
|
||||
[TIP]
|
||||
In many cases the error source is just _temporary_ (like some HF spike during an UART upload). Just try again.
|
||||
|
@ -219,5 +219,5 @@ In many cases the error source is just _temporary_ (like some HF spike during an
|
|||
|=======================
|
||||
|
||||
[TIP]
|
||||
If an unexpected exception has been raised the bootloader prints hexadecimal debug information showing
|
||||
If an unexpected exception has been raised, the bootloader prints hexadecimal debug information showing
|
||||
the <<_mcause>>, <<_mepc>> and <<_mtval>> CSR values.
|
||||
|
|
|
@ -701,7 +701,10 @@ void system_error(uint8_t err_code) {
|
|||
}
|
||||
#endif
|
||||
|
||||
while(1); // freeze
|
||||
// endless sleep mode
|
||||
while(1) {
|
||||
asm volatile("wfi");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue