2016-12-20 06:02 AM
Hey there!
I wanted to know if someone could help me on building up a GUI on a PC for usage with an STM32F303VET. I am new to this and I am not sure exactly on how to implement that.
So far I am reading the AN4323 on STemWin library, but I am not sure if this is only useful for LCDs on a product and not for GUI usage on a PC.
Basically I want to have a GUI when I connect my STM32F303VET with a host PC via USB and that I can program my application parameters via the GUI on the STM32. I think this might be a combination of a HID or CDC class USB device and the STemWin library. Also it would be nice to have a DFU class implemented, but I don't know if both are possible via one USB-port.
I would be happy if someone could help me with some starting points.
best regards
Benjamin
#cdc #stm32f303 #dfu #usb #gui #hid2016-12-22 05:06 AM
Dear
Brammer.Benjamin
, I Suggest you start with pre-configuredapplications within package firmware.You may find USB projects in this folder as : STM32Cube_FW_F3_V1.6.0\Projects\STM32303C_EVAL\Applications\USB_DeviceYou can also get more details on the HID class referring to
(STM32Cube USB host library) and UM1734 user manual for more details on how to use the STM32Cube USb device library.For using DFU on STM32, I recommend you
referring
to thishttps://st-videos.s3.amazonaws.com/BOOTLOADER.mp4
andthe 'Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension'.Hope this helps you
Best Regards
Imen
2016-12-23 07:02 AM
Hey Imen,
thanks for your answer. And concerning the GUI, do you have any ideas?
Benjamin Brammer
2016-12-23 09:44 AM
It depends on the GUI user.
The simplest way would be to use Teraterm PC console configured with the right COM port.
This way using USART or USB/VCP can be addressed from the same tool.
If the protocol is simple, just transfer text strings and capture the LF character to process the string.
If you'd like to have a more advanced protocol mixing control and data messages, most connectivity modules (WiFi, Bluetooth, Cellular) use a scheme called 'AT command set' which is basically an escape header...
Developping an application on PC or Phone side would require some skills and maintainance.
Some web browsers support COM port communication (USB) such as Chrome and there is a trend for browsers to have possibility to access USB remote devices from the web page.
Hope this helps!
2017-01-02 04:46 AM
Hello Seb,
first of all, I wish you a happy new year!
Thanks for your answer. I want a really simple GUI where you only have some buttons to change some basic operation mode, and the possibility to enter numeric values to change a LO frequency given by a PLL which is configured via SPI through the STM32F303VET. Best would be over USB.
Would it be possible to also have a DFU button in the GUI, where the STM32 then resets and uses USB for DFU? That would be perfect. So that the STM32 can change between CDC or HID and DFU via the GUI. I know this will be quite complicated to handle the routines and USB stack initialization on the STM32 but in general this would be possible, or am I wrong?
best regards
Benjamin
2017-01-03 01:17 PM
Hi Benjamin,
may be this can inspire you somehow.
https://github.com/nichtgedacht/mini-sys
Regards
Dieter
2017-01-05 03:56 AM
thanks for all the replies!
I definetely have some good starting points now.best regards
Benjamin
2017-01-05 04:22 AM
To make your life simpler, for starting you may want to take over a serial COM port from your GUI.
You can use a FTDI cable, suchs as in this link:
http://www.ftdichip.com/Products/Cables/USBRS232.htm
You can then implement the PC side USB device driver, once you have the core GUI software and replace UART with USB communication.
You can implement the GUI in C# or Python. Both of them have built 'device drivers' for talking over serial port.
2017-01-05 05:49 AM
thanks. This might be a good idea for usage with a Nucleo-Board. But for my custom board I don't want so much interfaces. Ideally only the USB.