boards/gd32vf103c-start: new board #20270
Merged
maribu merged 9 commits intoRIOT-OS:masterfrom Jan 20, 2024
Merged
Conversation
Allow setting `OPENOCD_TRANSPORT` to `default` for when a transport to not explicitly set the transport. This is useful when the target or interface script already specify the transport.
When `stdio_cdc_acm` is used, prefer selecting the USB devices with vendor `RIOT-os.org` and model `$(BOARD)` and only fall back to `$(TTY_BOARD_FILTER)` if no such TTY was found. This makes it possible to add a TTY board filter matching only an integrated USB to UART bridge, but still do the right thing when the user explicitly uses `stdio_cdc_acm` instead of the default `stdio_uart`.
The API doc clearly states that arbitrary high PWM frequencies can be requested and the driver should reduce the frequency while keeping the resolution, when required. So change the code to just do that rather than blowing assertions.
Member
Author
|
ToDos:
|
Member
Author
|
With one hardware issue (PA1 / Arduino pin A0 not connected) on the board solved and Arduino Pin D2 (PB4) no longer being part of the JTAG interface, it looks better now: |
Member
Author
|
I don't think the remaining PWM issues are related to this board and rather are |
15 tasks
benpicco
reviewed
Jan 19, 2024
Contributor
benpicco
left a comment
There was a problem hiding this comment.
Looks good, just some minor things - please squash directly.
740717c to
3e69c96
Compare
Expose the compile time configuration knob `CONFIG_AFIO_PCF0_SWJ_CFG` to allow freeing some/all JTAG pins and use them as GPIOs. As default, PB4 is remapped from NJTRST to be usable as regular GPIO. This still allows using the JTAG interface for debugging/flashing, but makes an GPIO exposed by some boards available.
Let boards explicitly use the common OpenOCD config if it works for them, rather than having boards with specific needs opt out.
This adds support for the GD32VF103C-START, the official "starter board" for the GD32VF103C MCU by the MCU vendor.
3e69c96 to
7f27e6c
Compare
benpicco
approved these changes
Jan 20, 2024
C has this feature that the order of struct members in the
initialization doesn't need to match the order in the declaration.
C++ has not yet caught up:
boards/common/gd32v/include/cfg_usbdev_default.h:50:1: error: designator order for field 'dwc2_usb_otg_fshs_config_t::type' does not match declaration order in 'const dwc2_usb_otg_fshs_config_t'
So, just reorder the fields for now by hand.
Member
Author
|
Wooohooo 🎉 Thx :) |
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.
Contribution description
This pull request adds support for the GD32VF103C-START board, the official evaluation board of the GD32VF103C MCU by the MCU vendor. Sadly, there is relatively little documentation provided on the board.
Testing procedure
Output when testing with the selftesting shield:
Note: There are apparently some issues with at least the ADC. (The ADC is used to test the PWM output via a "low-pass filter DAC", but also via an R-2R DAC. Both tests fail. But just something broken with the ADC would be sufficient to explain this.)
Otherwise, the test result indicates correct configuration and Arduino mapping.
Issues/PRs references
None