Skip to content
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: arm: add support for WeAct STM32G431 Core #63889

Merged
merged 2 commits into from Nov 21, 2023

Conversation

andysan
Copy link
Collaborator

@andysan andysan commented Oct 12, 2023

Add support for the WeAct STM32G431 Core board. This is a low-cost STM32G431 board with a USB-C connector. The board supports USB-C PD if the right solder bridges are modified correctly.

This PR depends on #63886.

Note to reviewers: Please pay close attention to the clock configuration. I don't have a lot of experience with this particular corner of STM32 MCUs. The DTS file configures the MCU to use the HSE to drive the USB subsystem instead of the HSI48 clock unlike many of the other boards. My understanding is that this is the recommended way to drive the USB block since it provides a more stable clock source.

Testing: Bard has been tested with the USB-C PD example which works as expected and prints its log on the attached UART. Some of the other basic examples have also been tested to ensure that the user button and LED are both mapped correctly.

Update:

  • Included support for the OpenOCD (tested with ST-Link) and Blackmagic Probe runners.
  • Switched from USART_1 (PA9/PA10) to USART_2 (PA2/PA3) to avoid pin conflict with DBCCx.
  • Updated board documentation.
  • Clarified that dead battery support needs to be enabled for the bootloader to work if the CCx pull-downs are disconnect.

@erwango erwango added this to the v3.6.0 milestone Oct 13, 2023
Copy link
Collaborator

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit, and please address the flash partitioning comment as well as take a look at the CI failures.

Rest looks .

boards/arm/weact_stm32g431_core/doc/index.rst Outdated Show resolved Hide resolved
@andysan andysan force-pushed the weact_stm32g431_core branch 2 times, most recently from 0282e5e to abe2ab7 Compare October 13, 2023 09:55
@andysan
Copy link
Collaborator Author

andysan commented Oct 13, 2023

Given that PD support requires some board modifications, would it be a good idea to represent the PD-enabled board as a variant board? I.e., create a weact_stm32g431_core_base.dtsi and then derive weact_stm32g431_core.dts and weact_stm32g431_core_pd.dts from the base configuration? The latter would then have then describe all of the PD stuff and enable it by default.

Edit: Looking at the documentation, this might not be possible without abusing the revision system.

Copy link
Contributor

@mbolivar-ampere mbolivar-ampere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting a -1 on this until the chosen node is switched to an alias, as discussed in another PR where this change was split out on its own.

Copy link
Contributor

@mbolivar-ampere mbolivar-ampere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DT changes look OK to me, thanks

@andysan andysan force-pushed the weact_stm32g431_core branch 2 times, most recently from 7eb2801 to 88e1239 Compare October 27, 2023 11:28
boards/arm/weact_stm32g431_core/doc/index.rst Outdated Show resolved Hide resolved
boards/arm/weact_stm32g431_core/doc/index.rst Outdated Show resolved Hide resolved
boards/arm/weact_stm32g431_core/doc/index.rst Show resolved Hide resolved
Add support for the WeAct Studio STM32G431 Core Board.

Tested with:
 - `samples/basic/blinky`
 - `samples/basic/button`

Flashed samples using dfu-util.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
Add support for the WeAct Studio STM32G431 Core board. Note that this
board does not support USB-C PD in its default configuration. See the
board documentation for the necessary hardware reconfiguration.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
@andysan
Copy link
Collaborator Author

andysan commented Nov 7, 2023

Ping @kartben. I should have fixed the issues you pointed out.

@andysan
Copy link
Collaborator Author

andysan commented Nov 20, 2023

Hi @kartben, it's been 3 weeks. Any chance you could have a look at the updated changeset and see if it addressed your comments?

Copy link
Collaborator

@kartben kartben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, sorry that i missed your earlier ping

@fabiobaltieri fabiobaltieri assigned erwango and unassigned sambhurst Nov 21, 2023
@carlescufi carlescufi merged commit b544855 into zephyrproject-rtos:main Nov 21, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants