Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

variant(f4): add the DISCO_F411VE (STM32F411E-DISCO) board#2805

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 1 commit intostm32duino:mainfromotac0n:main
Sep 9, 2025

Conversation

@otac0n
Copy link
Contributor

@otac0notac0n commentedAug 29, 2025
edited by fpistm
Loading

Summary

Adds the STM32F411E-DISCO board.

Fixes#2808

I have the board and would like to use it along with SimpleFOC, an Arduino library.

Validation

I could use some advice on validating this, as I was using PlatformIO to work with my board previously.

@otac0notac0n marked this pull request as draftAugust 30, 2025 00:08
@otac0notac0nforce-pushed themain branch 2 times, most recently fromd2ae5f7 to24fc105CompareAugust 30, 2025 14:35
@otac0n
Copy link
ContributorAuthor

When I try to create a generic layout, the STM32CubeMX cannot find a clock solution for any configuration without an external input frequency. It basically says that PLL Source Mux should be HSE.

image

Should I enable HSE for the generic board or should I try to ignore the warning given that it reaches 48MHz for USB, etc.

@otac0n
Copy link
ContributorAuthor

otac0n commentedAug 31, 2025
edited
Loading

I also do not know where to grab the pinout definitions for the specific board. Theguide I am using does not specify how to add a specific board, it cuts off after adding the generic board.

@fpistm
Copy link
Member

fpistm commentedSep 1, 2025
edited
Loading

Hi@otac0n

Should I enable HSE for the generic board or should I try to ignore the warning given that it reaches 48MHz for USB, etc.

No, generic have to use the internal clock only. If user wants to use HSE then he have to redefine the system core clock config at sketch level.
Dedicated variant can defined by default the HSE if they have one as the hardware is known.

I also do not know where to grab the pinout definitions for the specific board. Theguide I am using does not specify how to add a specific board, it cuts off after adding the generic board.

Well in general at least the Arduino connector have top be properly defined D0-D15 and A0-A5 but this Disco has no Arduino connector so you can simply defined them following each connector.
For Example:

/* P1 connector right side */#definePC1 0#definePC3 2.../* P1 connector left side */#definePC1 19

Or
For Example:

/* P1 connector */#definePC1 0#definePC3 1...

You can refer to this one as example:
https://github.com/stm32duino/Arduino_Core_STM32/blob/main/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_DISCO_F407VG.cpp
https://github.com/stm32duino/Arduino_Core_STM32/blob/main/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_DISCO_F407VG.h

So you have to create the variant_DISCO_F411VE.*

@otac0notac0n marked this pull request as ready for reviewSeptember 2, 2025 04:24
@otac0notac0nforce-pushed themain branch 3 times, most recently from32f041a to5a50ba7CompareSeptember 3, 2025 23:40
@otac0n
Copy link
ContributorAuthor

So, I have

  • generated and copied the ldscript.ld
  • generated the clock code for Generic and for the DISCO_F411VE variant.
  • copied the variant_generic.c/h files to make variant_DISCO_F411VE.c/h
    • reordered and renumbered the pins in the same order as the DISCO_F407VG board
    • updated LED, BUTTON, SPI, and I2C sections.
    • defined HAL_DAC_MODULE_ENABLED

That puts it on par with the DISCO_F407VG. Let me know what steps can be taken to validate these files on hardware.

@fpistm
Copy link
Member

That puts it on par with the DISCO_F407VG. Let me know what steps can be taken to validate these files on hardware.

You can use this examples to check if the pin mapping is correct:
https://github.com/stm32duino/STM32Examples/tree/main/examples/NonReg/CheckVariant

@otac0n
Copy link
ContributorAuthor

otac0n commentedSep 9, 2025
edited
Loading

I had to order a USB Serial connector to test this out. Using the generic variant I get this:

#####NUM_DIGITAL_PINS = 81NUM_ANALOG_INPUTS = 16#####Checking digital pins...End check digital pins#####Checking analog pins definition...End check analog pins#####Checking IP instances (I2C, UART, SPI)...End check IP instances (I2C, UART, SPI)############################################ Test PASSED########################################

Using myvariant_DISCO_F411VE I get errors that I'm unsure where they originate:

<path>2.11.0\libraries\SrcWrapper\src\stm32\analog.cpp:340:17: error: 'DAC_CHANNEL_1' was not declared in this scope; did you mean 'ADC_CHANNEL_1'?<path>2.11.0\libraries\SrcWrapper\src\stm32\analog.cpp:364:6: error: variable or field 'HAL_DAC_MspInit' declared void...

Edit: Fixed that. Now it just locks up due to bad clock config?

I will say that I had trouble following step 1 here:https://github.com/stm32duino/Arduino_Core_STM32/wiki/Using-git-repository

@otac0notac0nforce-pushed themain branch 2 times, most recently from0942d2a tod2412a1CompareSeptember 9, 2025 03:34
@otac0n
Copy link
ContributorAuthor

OK, with a change toRCC_HSE_ON (instead ofRCC_HSE_BYPASS) my board passes the tests.

#####NUM_DIGITAL_PINS = 81NUM_ANALOG_INPUTS = 16#####Checking digital pins...End check digital pins#####Checking analog pins definition...End check analog pins#####Checking IP instances (I2C, UART, SPI)...End check IP instances (I2C, UART, SPI)############################################ Test PASSED########################################

I believe this to be ready, but I would appreciate a critical look-over as this is my first Arduino board.

@fpistm
Copy link
Member

Yesterday, I've made a review and force push on your branch to fix all the issue you made 😉
But forgot to warn you.
To sum up: no DAC, HSE on instead of bypass.

@fpistm
Copy link
Member

Will end review this morning.

Signed-off-by: John Gietzen <john@gietzen.us>
@fpistm
Copy link
Member

I had to order a USB Serial connector to test this out. Using the generic variant I get this:

You can simply connect the default Serial to the STLink. SB10 and SB11 not fitted on the board,if you add SB then you will have the VCP functional.

@fpistm
Copy link
Member

I've pushed some updates on your branch.

@github-project-automationgithub-project-automationbot moved this fromIn progress toReviewer approved inSTM32 core based on ST HALSep 9, 2025
@fpistmfpistm merged commit93d9973 intostm32duino:mainSep 9, 2025
24 checks passed
@github-project-automationgithub-project-automationbot moved this fromReviewer approved toDone inSTM32 core based on ST HALSep 9, 2025
@fpistmfpistm linked an issueOct 16, 2025 that may beclosed by this pull request
@fpistmfpistm mentioned this pull requestOct 16, 2025
88 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fpistmfpistmfpistm approved these changes

Assignees

No one assigned

Labels

new variantAdd support of new bard

Projects

Milestone

2.12.0

Development

Successfully merging this pull request may close these issues.

[New Variant] Please add board STM32F411E-DISCO [New Variant]

2 participants

@otac0n@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp