634 views
in System Integration by
I want to interface this Nucleo module with the STM32F746-Discovery boar : tne connectors are well designed but how to get the software to drive this boerd ? Is ther a specific device class / device driver to access properly to the peripherals or is it necessary to build it ? The project has to drive two DC motors with a GUI developped on STM32.

1 Answer

0 votes
by

Hello,

of course, the device class / device driver to access your hardware has to be implemented by yourself according your requirements.

Please have a look into the example 'DeviceIntegration' that you will find in the subdirectory /Examples of the Build Environment for the STM32F746-Discovery board. This example shows the principles of hardware interaction, like how to start a certain action, how to get a certain value from the underlying hardware,...

For all general aspects concerning the device integration, let me refer to the article Integration with the device.

I hope this helps...

Best regards,

Manfred.

by
Yes, thanks, I am working with this "device integration help" on line. There is no problem for lighting the Led or using the User button, but hwo can I define the used pins for Arduino connector (ARD Dx, Ax, ...) ? For example, with the daughter board connected, I have to drive Ard D2, D4 and D5 and read Ard D12. Is there a maping for these pins ?

Thank you for any help.
by

In this case let's have a look into the schematics of the STM32F746 Disco board:

  • ARD_D2 -> PG6
  • ARD_D4 -> PG7
  • ARD_D5 -> PA8
  • ARD_D12 -> PB14
Best regards,
Manfred.
by
Ok, but where can I define it in the software in order to use it with the GUI ?

Best regards,

Pascal
by
The Device Driver is the API to your device - it doesn't matter if you switch on/off a LED or if you set the speed of a motor. You define the API of your device.

The GUI is accessing this API in order to read current status or start a certain action. This should be demonstrated with the mentioned example and documentation.

Concerning the access to GPIOs - let me recommend to inspect the examples that are part of the STM32CubeF7 firmware.

If you still have no progress, please try to explain more detailed what you did so far and what is missing...

Best regards,

Manfred
by
For an exemple, could you tell me how to set a bit (PG6 or PB14 or...) when pressing the start button in the project DeviceIntegration. I know there is a method "Command Print" used to send a message and I would like to use the same method to set a bit when the button is pressed.

Thank you for any answer.

Best regards
by

Hi Pascal,

in principal, the GUI should be separated from the underlying system which controls a certain machine or reads from a certain device.

The binding between the GUI application and the underlying system is implemented within the Device Class / Device Driver. From the GUI perspective, the Device Class is the abstraction of the underlying machine (e.g. to start/stop an engine, or to read the current speed). The Device Driver is the API to control the machine.

As a result, the two parts can be implemented separately: The GUI application can be developed without having the real machine and the machine control logic can be implemented without having a GUI.

O.k. this means: Please try first to implement the machine control (e.g. by setting the GPIOs) and then implement the binding between the GUI and the machine.

The provided example 'DeviceIntegration' demonstrates this binding. According to your last post, the question is how to implement this machine control logic. 

For that purpose, please have a look into the STM32CubeF7 embedded software - there you will find several examples that accesses the GPIOs.

Best regards,

Manfred. 

by
HI Manfred,

In fact, I have made all my hardware tests under MBED and I am abble to drive the Arduino connector to have 2 digital inputs, 4 digital outputs and two PWM outputs. All of them are declared by DigitalIn, DigitaOut and PwmOut : then, I can use the properties .period and .write for the two Pwm outputs. My question is to include these declarations to my GUI application : where can I declare the IN/OUT ? Is it in the file DeviceDriver.c/ewmain.c/main.c of the Application/source ?

Best regards.

Pascal
by
Hi Pascal,

the intialization of the device is part of the Device Driver. Typically, a Device Driver contains a function to initialize the underlying system and a couple of functions to control / access the device (e.g. to set the speed or direction of a motor control unit).

Best regards,

Manfred..

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...