Description
Describe the bug
It seems that on CH32V003 platforms, if multiple interrupts are enabled, the CPU stops and cannot even be programmed. What I tested was to have systick interrupt + uart interrupt enabled and the uart transmission stops unexpectedly. If I'm using only the uart interrupt (i.e. disable the systick interrupt) it works as expected. I don't think this was tested by anyone, to have 2 or more interrupts enabled at a time because, as I saw, for now only systick interrupt is enabled. The hang point is not deterministic, it can hang at any point (i.e. after 1 print using UART interrupt, after 2 prints, after n prints, in the middle of a print etc.). I'm not sure if this issue exists on the other SoCs, for now I only have CH32V003 boards.
- Target: CH32V003
- What I tried to diagnose this issue was to keep only 1 interrupt active. With 2 or more active the CPU stops unexpectedly and cannot even be programmed.
- It is not a regression
To Reproduce
Steps to reproduce the behavior:
Download uart_ints.zip, put it on the samples directory and run the following:
west build -b ch32v003f4p6_dev_board samples/uart_ints
west flash
or
west build -b ch32v003evt samples/uart_ints
west flash
Expected behavior
The example should print a message infinitely many times through UART interrupts.
Impact
The board is unusable with multiple interrupts enabled.