Displaying analog voltage value on TouchGFX GUI using STM32F746G-DISCO kit.

  Рет қаралды 34,701

EE by Karl

EE by Karl

Күн бұрын

In this tutorial i will show you how to use the ADC input of STM32F746G-DISCO and displaying the value on the display that uses a wildcard. The ADC conversion uses the DMA and Timer interrupt to save the values to an array for processing. I also show you how to use FreeRTOS to notify the View of a new ADC conversion and pass the value from the Model to the View.
If you're using TouchGFX 4.13.0 and STM32CubeIDE 1.2.1, more than likely you're having trouble getting a working project.
Use this link to get a working project going • STM32CubeIDE 1.2.1 and... .
Give me thumbs up if you like this tutorial. If you like to see another tutorial about some other feature then leave a comment below.
STM32F746G-DISCO amzn.to/3Pbt8Td

Пікірлер: 47
@mehmetinci1510
@mehmetinci1510 4 жыл бұрын
Thank you very much. Very helpful and well explained.
@yusufalperklc1662
@yusufalperklc1662 4 жыл бұрын
Excellent hands on tutorial.
@romandunduk5832
@romandunduk5832 3 жыл бұрын
Great stuff, Karl. Thank you.
@chaaalyy
@chaaalyy 4 жыл бұрын
WOW :) Your Videos about the 746 Disco, TouchGFX, Integration and last but not least the most important Part: How to connect to the "real World" ... THAT´s the Stuff, ST should have made , when they released their ecosystem ! Very well explained, absolutely no problem to understand, what´s going on and you save a LOT of Time for MANY people :) Thank you so much for that :)
@EEbyKarl
@EEbyKarl 4 жыл бұрын
You're welcome!
@eduardodelarosaferrer2205
@eduardodelarosaferrer2205 4 жыл бұрын
Great tutorial !!!
@crazyboy200x
@crazyboy200x 4 жыл бұрын
Thank you for this useful video, Karl. Your tutorial really helped me to get my Capstone project going, most definitely. I'm currently interfacing voltage, current, temperature, and relay sensors into my STM32F429-DiSCO board for the purpose of creating a monitoring system for a smart power supply. I have been able to display two tasks (temperature and humidity) concurrently on the LCD screen. Now, I'm trying to read and display voltages (3.3V, 5.0V, 12.0V, and 24.0V) and currents on the same screen. Hopefully, I will be able to pull it off with such a little time I have left near the end of the semester. Once again, thank you for sharing your knowledge.
@floalbaux8706
@floalbaux8706 3 жыл бұрын
I have a similar information monitoring project. How did you find the number of analog and digital pins available? I can't find this information that would allow me to choose my board.
@abdeldjalilettaharboucetta2238
@abdeldjalilettaharboucetta2238 2 жыл бұрын
hi can you share with me your project please?
@huguesbelmiro1854
@huguesbelmiro1854 2 жыл бұрын
Thank you my dude!
@EEbyKarl
@EEbyKarl 2 жыл бұрын
You bet!
@betulguncaldi4676
@betulguncaldi4676 3 жыл бұрын
Hi, thanks for videos. They are amazing. I have a question. I'm trying to save the text i entered from keyboard, on flash memory, how can i do? I'm new to Touchgfx. Could you help me? Thank you :)
@CrizzyD91
@CrizzyD91 3 жыл бұрын
Hi, these are the best STM32 tutorials by far. I got the ADC working, but I don't fully understand everything that is going on in this tutorial. Outside of learning more FreeRTOS (which i'm doing right now), are there any good resources that you could recommend to help me understand more about how the touchgfx works? How to know what files do what and how to write code for them (for example, I'd have no idea about Model.cpp and Screen1Presenter.cpp, Screen1viewer etc). How have you managed to understand, what steps are needed? Thanks for any advice you could give. Thanks.
@edwin7543
@edwin7543 Жыл бұрын
It is working, thank you.
@niravbhatt2878
@niravbhatt2878 3 жыл бұрын
Hey, in this example where did u called the function Screen1View::analogUpdate??
@babursapayev188
@babursapayev188 4 жыл бұрын
Thanks Bro! how can i flash original firmware of the stm32f746 discovery board
@lebohangndungane1747
@lebohangndungane1747 2 жыл бұрын
Greetings Karl, awesome video! This is exactly what I intend to do for my final year project, however the implementation I am working with requires 4 ADC inputs. I have set the GUI up using TouchGFX and used Keil as my IDE to adjust the coding according to your video. My code compiles but all I get is a blank screen. What would change in this implementation if I am using more than one ADC input? Any assistance will be greatly appreciated.
@EEbyKarl
@EEbyKarl 2 жыл бұрын
Sounds like the external memory was not used. STM32CubeIDE has an option for the external loader. I don't know if Keil can do that?
@chaaalyy
@chaaalyy 4 жыл бұрын
Just two small hints for "not so experienced" users (like me...) ;) at 21:15, when you place the code in Model::tick, one parameter should be changed... So the according line should look like " if (osSemaphoreWait(binarySemAnalogHandle, 0) == osOK) ". changing the "100" to "0" switches off the timeout, which causes a complex gui to slow down like hell ;) At 19:31, when you place the HAL_ADC_Start_DMA, you should cast the pointer to the expected type :) Otherwise you get a compiler warning, because the array has to be uint16_t and the HAL function expects a uint32_t* ... So just change the code to " HAL_ADC_Start_DMA(&hadc1, (uint32_t*) &uhADCxConvertedValue[0], 10); " and the warning is gone :)
@powerproton9139
@powerproton9139 4 жыл бұрын
yes. or. change uint16_t is unint32_t, and &uhADCxConvertedValue is uhADCxConvertedValue. waring is impossible
@powerproton9139
@powerproton9139 4 жыл бұрын
when i change uint16_t is unint32_t, and &uhADCxConvertedValue is uhADCxConvertedValue. waring is impossible but, value on lcd display not true. i change about author. value lcd display very good. exactly. difficult uint16_t and unint32_t. why ?
@chaaalyy
@chaaalyy 4 жыл бұрын
@@powerproton9139 As i wrote: The HAL_ADC_Start_DMA - function expects a POINTER type for a unsigned 32bit variable, so what you try to give it is the variable itself and not it´s adress, like expected. It would be als possible to declare the variable as uint32_t, but it´s an array and so you waste some bytes (10x32bit instead of 10x16bit) of stack, what can be painful later on, if you use FreeRTOS.... so just change the &uhADCxConvertedValue[0] in that HAL-function to (uint32_t*) &uhADCxConvertedValue[0] and everything is good :)
@powerproton9139
@powerproton9139 4 жыл бұрын
@@chaaalyy thanks
@powerproton9139
@powerproton9139 4 жыл бұрын
hi. you use variable uint16_t uhADCxConvertedValue[10] and HAL_ADC_Start_DMA(&hadc1, &uhADCxConvertedValue, 10);. Program do not waring ?
@vovamzzuk
@vovamzzuk 3 жыл бұрын
hey. i have a little question. i'll do everything like you. But ide tell's me that textAreaADBuffer not declarated. Can someone help me?
@MultiPowerAid
@MultiPowerAid 7 ай бұрын
Hey, in terms of osSemaphoreRelease(...Handle) function, I understand that this functionality lock/unlock code access of the exectuted thread so that other threads do not have a potential acess to the updating value (of the ADC in this case). So this works like mutexes in terms of lock/unlock for pthread_create() in RTOS, am I understanding the use of osSemaphoreRelease in this sense, correctly?
@ttkoh123
@ttkoh123 4 жыл бұрын
Thanks but pretty wide loop on the semaphore concept.
@alvisyah3126
@alvisyah3126 Жыл бұрын
Can you send all the link such as the library please
@enzocoudreuse2887
@enzocoudreuse2887 3 жыл бұрын
Hello, I don't understand the utility of PollingRoutine whith nothing in it. Could you explain it ? Thanks for your video
@EEbyKarl
@EEbyKarl 3 жыл бұрын
It's not needed for this tutorial. But if you need to write code to be polled during a task, that is the main for loop for StartTaskAnalogInput task.
@user-tw9wm3hi9h
@user-tw9wm3hi9h 6 ай бұрын
Hello. I would like to ask a question. How is that LCD fixed to the pcb? I checked the PCB file provided by STM, but I have no idea how it is fixed. I would appreciate it if you could tell me in detail how it is fixed to the PCB.
@EEbyKarl
@EEbyKarl 6 ай бұрын
With VHB?
@edwin7543
@edwin7543 Жыл бұрын
Hi, thanks for sharing touchGFX tutorial , I am new to touchgfx, and trying to display float value on TextArea , using following code is working w/o problem. Unicode::snprintf(textArea2Buffer, TEXTAREA1_SIZE, "%d", gTvalue); textArea2.invalidate(); But if I change with floating Unicode::snprintf(textArea4Buffer, TEXTAREA4_SIZE, "%3.1f", gTvalue); I get text -- %3.1f is there anything setting I missing? please advics, thank you.
@EEbyKarl
@EEbyKarl Жыл бұрын
Try using snprintfloat. support.touchgfx.com/4.20/docs/api/classes/classtouchgfx_1_1_unicode
@danrudn
@danrudn 3 жыл бұрын
Link: support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/texts-and-fonts
@usrrsr
@usrrsr 3 жыл бұрын
Create a video from scratch starting from cubemx touchgfx and the keil or cubeide with spi and fsmc display complete coding
@user-ne5vl2wj9p
@user-ne5vl2wj9p 3 жыл бұрын
It compiles well, but the ADC value is not updated on the LCD screen. For what reason is the ADC value not updated?
@JC-iq9gv
@JC-iq9gv 3 жыл бұрын
김상용 I am having the same problem. I can livewatch that uhADCxConvertedValue array values are continuously updated. I instrumented and discovered that Model::Tick is called only 2 times after start and that the callback of the ADC only once. If no callback, no semaphore and so no update of the value on the screen. I did not figure out yet why the callback does not occur. I used this tutorial starting from a blank project from TouchGFX 4.13 Designer then opened the .project file in CubeIDE 1.30.
@JC-iq9gv
@JC-iq9gv 3 жыл бұрын
Made it run by setting NVIC / DMA2 stream0 global interrupt Preemption Priority to 15 (lowest one). Was 0 before.
Importing TouchGFX 4.16.0 project into STM32CubeIDE 1.6.1
15:26
EE by Karl
Рет қаралды 14 М.
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 6 МЛН
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 10 МЛН
The joker's house has been invaded by a pseudo-human#joker #shorts
00:39
Untitled Joker
Рет қаралды 11 МЛН
Vivaan  Tanya once again pranked Papa 🤣😇🤣
00:10
seema lamba
Рет қаралды 23 МЛН
STM32F429I-DISCO & TouchGFX Setup
10:47
EE by Karl
Рет қаралды 10 М.
Round GC9A01 240x240 display and  gauges
11:12
Volos Projects
Рет қаралды 98 М.
STM32CubeIDE 1.2.1 and TouchGFX 4.13.0 with STM32F746G-DISC0 kit
12:19
How to integrate TouchGFX in a custom board (The long way round)
1:28:39
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 2,9 МЛН
Automotive CAN, Sending & Receiving Data
8:54
Block Harbor
Рет қаралды 4,9 М.
12 Useful & Interesting ESP32 Projects for Beginners!
9:41
ToP Projects Compilation
Рет қаралды 588 М.
How to Update the TouchGFX GUI from other tasks
23:27
embryonic.dk
Рет қаралды 12 М.
#miniphone
0:16
Miniphone
Рет қаралды 3,6 МЛН
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 240 М.
В России ускорили интернет в 1000 раз
0:18
Короче, новости
Рет қаралды 236 М.