Skip to content

Conversation

otac0n
Copy link

@otac0n otac0n commented Aug 29, 2025

Pull Request template

Summary

Adds the STM32F411E-DISCO board.

This PR fixes/implements the following bugs/features

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.

@otac0n otac0n marked this pull request as draft August 30, 2025 00:08
@otac0n otac0n force-pushed the main branch 2 times, most recently from d2ae5f7 to 24fc105 Compare August 30, 2025 14:35
@otac0n
Copy link
Author

otac0n commented Aug 31, 2025

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
Author

otac0n commented Aug 31, 2025

I also do not know where to grab the pinout definitions for the specific board. The guide 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 commented Sep 1, 2025

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. The guide 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 */
#define PC1 0
#define PC3 2
...
/* P1 connector left side */
#define PC1 19

Or
For Example:

/* P1 connector */
#define PC1 0
#define PC3 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.*

@otac0n otac0n marked this pull request as ready for review September 2, 2025 04:24
@otac0n otac0n force-pushed the main branch 2 times, most recently from 4da418d to 32f041a Compare September 3, 2025 23:22
Signed-off-by: John Gietzen <john@gietzen.us>
@otac0n
Copy link
Author

otac0n commented Sep 3, 2025

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

fpistm commented Sep 4, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants