876 views
in System Integration by
Hello everyone,

I am currently trying to work with a GUI on the STM32F469I-Disco I have (after weeks of struggling with the STM32CubeIDE). I followed the tutorial about Embedded Wizard and getting started with the STM32F469 and I can already flash the generated code on the board.

I tried to modify the HelloWorld example by simply including the "stm32f4xx_hal_gpio.h" file using an inline with #include "stm32f4xx_hal_gpio.h" inside it but it seems like it cannot find it. I placed the inline in the application unit and made his order "bottom". Any advice about using GPIO with Embedded Wizard? What I try to do for the moment is just to toggle an led using a PushButton on the screen.

Also, it seems like sometimes, even if the compiling has been done successfully and everything is green in the command window, the board isn't flashed properly because nothing shows up on the screen. Is it something anyone experienced?

One side question is it possible to react to interruption? I would like to increase a counter every time an on/off switch is activated (up to 50 times a second).

Thank you a lot,

Nicolas.

1 Answer

0 votes
by

Hi Nicolas,

well, I assume within your inline statement you need "#include "stm32f4xx_hal.h"” instead of "#include "stm32f4xx_hal_gpio.h”". Then all further includes will be managed within "#include "stm32f4xx_hal.h", which itself is configured by "TargetSpecific/stm32f4xx_hal_conf.h" within our preconfigured STM32CubeIDE project.

In “stm32f4xx_hal_conf.h” you can find all available HAL modules right at the beginning:

As you can see, the GPIO Module is already enabled and its corresponding .c is already included into the project. You can find the C file under “ThirdParty/STM32Cube_FW_F4/Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal_gpio.c ". So, in your case you do not have to reconfigured the HAL. You can use all GPIO HAL function right inside your inline statement after including "stm32f4xx_hal.h".

But I would recommend to take a look into the Emedded Wizard example “DeviceIntegration” in combination with “Application/Source/DeviceDriver.c”, “TargetSpecific/ew_bsp_inout.c”  and “TargetSpecific/stm32f4xx_it.c”. This example demonstrates how to use an interrupt sensitive button to perform an action within the Embedded Wizard HMI. It contains everything what you are looking for. Generally speaking the correct interface between an Embedded Wizard UI and the IDE Project is well documented in our doc article Device Interface.

If you have any further questions, please do not hesitate to ask again.

Best regards,

Tim

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...