-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
boards/gd32vf103c-start: new board #20270
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.
ToDos:
|
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:
|
I don't think the remaining PWM issues are related to this board and rather are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.
Wooohooo 🎉 Thx :) |
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