Fix ch32v103 hardfault & Add CH32V103C8T6 Bluepill board#3620
Open
UMRnInside wants to merge 2 commits into
Open
Fix ch32v103 hardfault & Add CH32V103C8T6 Bluepill board#3620UMRnInside wants to merge 2 commits into
UMRnInside wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2674 has a startup issue in
board_init():__disable_irq()from CH32V103 EVT callscsrc mstatus, 0x88in U-mode (which is only allowed in M-mode)https://github.com/openwch/ch32v103/blob/f99a84c4c42b6fb676560a9b8b7c737401efe0ad/EVT/EXAM/SRC/Core/core_riscv.h#L144-L155
__disable_irq()in CH32V307 EVT (probably also in CH32V203), however, uses vendor-defined CSR 0x800. This CSR is writable in U-mode, according to QingKeV3 Processor Manual:https://github.com/openwch/ch32v307/blob/7e33c66cd91008054d2a37db534b10162d1f0c6e/EVT/EXAM/SRC/Core/core_riscv.h#L141-L145
Now you can see the LED blinking, log outputting from UART(if
LOG=2), but cdc_msc example is still not working.