Open pascalgouedo opened 7 months ago
Technically not a bug, but a design decision. There are a number of options, which trade performance against flexibility when using hardware loops within interrupt handlers. For now we shall just document the issue in the GCC user manual.
Documentation added in commit b34f9d1cf13
When Hardware Loop feature is automatically generated and used in exception handlers, HWloop CSRs are not saved/restored. So when returning to main program from exception handler using HWloop, it is corrupted if exception happened during main program HWloop execution. This could happen with illegal exception, interrupt, debug code and maybe other situations.