EE by Karl
EE by Karl
  • Видео 11
  • Просмотров 174 021
How to use a Timer Callback to debounce a push button and more!
I see a handful of people in forums asking how to debounce a button. Then I see a few people replying saying never use external interrupts for a button. One person was saying rule #1 is not to use external interrupts, which i find bs. In my 20+ years of firmware programming I've never heard of this Rule #1, lol. Then those replying give brief explanation of using timers or Systick but don't give real examples that helps those in need of help.
Well in this video I will gladly share and show you my TimerCallback.c file and its many uses with examples.
Some of the uses are and not limited to are:
- Have callback call a function at a given time continuously or as a one shot
- Button debouncing
-...
Просмотров: 4 034

Видео

STM32F429I-DISCO & TouchGFX Setup
Просмотров 12 тыс.2 года назад
It seems that some people are having trouble exporting a STM32F429I-DISCO project from TouchGFX and importing it into STM32CUBE-IDE. So in this video I will show you how to export the project from TouchGFX, rename the project to a useful name then import it into STM32CUBE-IDE. I will also show you how to link to the IOC file so you can open it up in STM32CUBE-IDE. In this tutorial I am using To...
Importing TouchGFX 4.16.0 project into STM32CubeIDE 1.6.1
Просмотров 17 тыс.3 года назад
When I first started this RUclips channel it was to help other Engineers get TouchGFX 4.13.0 to work with STM32CubeIDE 1.2.1 ST has recently acquired TouchGFX and they released version 4.13.0 and the generated files did not import very well with STM32CubeIDE 1.2.1 at the time of making that video. The project would compile with errors. I had to show you how to copy files, link to include folder...
Use toggle button to disable another button in TouchGFX
Просмотров 3,4 тыс.4 года назад
There was a question asked in ST's forum about using a toggle button to disable a next button from taking you to another screen. I wrote a reply to set the button touchable to true or false but I don't think he understood what to do. If you want to disable another button on a 2nd screen using a toggle button that's on the 1st screen, then check out this tutorial ruclips.net/video/dQoy4wQpcTI/ви...
Displaying analog voltage value on TouchGFX GUI using STM32F746G-DISCO kit.
Просмотров 37 тыс.4 года назад
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 ...
STM32CubeIDE and TouchFGX - How to control hardware from the GUI and send UART messages.
Просмотров 13 тыс.4 года назад
WARNING! This video is very long. 1 hour 38 minutes long! This is part 3 of my STM32CubeIDE v1.2.1 and TouchGFX v4.13.0 tutorial. I am using a STM32F746G-DISC0 board and a project from previous tutorial. See links below. In this tutorial I will show you how to enable/disable a toggle button inside a second screen from a toggle button on the 1st screen. If enabled, the toggle button will turn on...
TouchGFX - sending uart data to GUI on a STM32F746G-DISC0
Просмотров 18 тыс.4 года назад
In this tutorial I will show you how to save your uart data to a global variable to be access by the View. I'll show you how to notify the View that there is a message ready using a binary semaphore within a task. Here is the link to the project that is being using in this tutorial ruclips.net/video/12KXreXaLp0/видео.html You may want to see this video which explains more in detail how TouchGFX...
TouchGFX communication between hardware and GUI
Просмотров 6 тыс.4 года назад
In this tutorial i'll explain how TouchGFX generates code and what the View Model works. I'll also show you how to effectively access data between the hardware and GUI.
STM32CubeIDE 1.2.1 and TouchGFX 4.13.0 with STM32F746G-DISC0 kit
Просмотров 27 тыс.4 года назад
Update 05/04/2021 If you are using the latest version of TouchGFX 4.16.0 and STM32CubeIDE 1.6.1 then watch this video ruclips.net/video/Q-mfuzW6S-0/видео.html Please note that this is a old video using the older versions of TouchGFX and STM32CubeIDE. With the newer versions you don't have to follow this video to get a project up and running. I'll show you how to get a project up and running qui...
CANable open source CAN bus analyzer firmware
Просмотров 20 тыс.4 года назад
Here I will show you how to set up the CANable CAN bus adapter with custom firmware. Here is more information on the CANable device canable.io/ You can buy it here store.protofusion.org/ I've bought mine from Aliexpress.com You'll need STM32CubeIDE to compile and generate code from here www.st.com/en/development-tools/stm32cubeide.html And to program the CANable you'll need CubeProgrammer from ...

Комментарии

  • @hertz7588
    @hertz7588 Месяц назад

    Thanks for video. Not many that show real life applications using ST’s IDE and GFX

  • @ScottSD-t3l
    @ScottSD-t3l 2 месяца назад

    When I go through this process it does work, but I think you might be missing some steps. I am using TouchGFX Designer 4.24.1 and Stm32CubeIDE 1.16.0. However, the file structure in the Project Explorer is not correct. For example, the TouchGFX files inside the 'STM32CubeIDE\Application\User' directory do not have a 'src' and 'include' subdirectories in either the 'gui' or 'generated' directories. The files do exist inside the TouchGFX directory on the file system, but this is not pulled into the Stm32CubeIDE project structure correctly. When I attempt to edit the screen files from the project explorer, there are many compile problems. I attempted to copy the entire TouchGFX directory and go with that, but have even more problems. Also, there is no 'include' or 'src' in the 'Application\User\Core' directory. Where do I find the main.h file in the Project Explorer?

    • @EEbyKarl
      @EEbyKarl 2 месяца назад

      TouchGFX engineers chose not to show header files. You can just import them into their respective folder or your own created folder, as a file system, but link to them only. The Project file structure does not have to follow the Windows file structure. That's why the Core folder has 2 actual files and the rest of the files are linked files. They are 2 Core folders shown as 1.

    • @ScottSD-t3l
      @ScottSD-t3l 2 месяца назад

      @@EEbyKarl I appreciate the quick response. I am used to the file structure created when starting a project from Stm32CubeIDE so this really through me off.

  • @tjprivat1563
    @tjprivat1563 3 месяца назад

    Nice! Thanks! For some MCUs, notably for H7, DO NOT use replace->all, as this would rename important folder-names referenced in the file, which contain the string you are replacing. So you get a lot of broken references. Otherwise, perfect! And kind of rediculous that this procedure is necessary at all...

  • @ichGluck
    @ichGluck 5 месяцев назад

    огонь!

  • @WHAJONNALAGADDAHEMASREE
    @WHAJONNALAGADDAHEMASREE 6 месяцев назад

    can this be used for STM32H747I - DISCO as well?

  • @YAKITEMiguel
    @YAKITEMiguel 6 месяцев назад

    Hello, thank you for this tuto but i want to know if it´s possible to interface a SmartEmbedded screen with an toshiba inverter and read out the inverter frequency on the screen by using RS485 wire with Stm32cubeIde and TouchGFX ?

  • @uguraltunbilek
    @uguraltunbilek 6 месяцев назад

    thanx for this beatifuly share

  • @khanghoangvan7407
    @khanghoangvan7407 6 месяцев назад

    i hope you know how this means to me. Thank you so much.

  • @WaelBenHarzalla
    @WaelBenHarzalla 7 месяцев назад

    you saved me man may god bless you

    • @onslakhal4594
      @onslakhal4594 7 месяцев назад

      Did u find prob with #include "PollingRoutine.h"

  • @jeronymjuran6617
    @jeronymjuran6617 7 месяцев назад

    Hello, how did you make the buttons and text background blue? The image assets are grey. Thank you

  • @IsaMohammadi-xf7fe
    @IsaMohammadi-xf7fe 7 месяцев назад

    Hi, thank you very much for your tutorial. Could it be possible to have the source code?

  • @jdjenzano6660
    @jdjenzano6660 8 месяцев назад

    Used this to test Smart Riverdi Display 50STM32U5A9 RS232 - Arduino RS232 shield to expansion port P4-USART1_TX-D1- PG9 -P4-25 AND USART1_RX-D0- PG10 -P4-27 Used TouchGFX v4.23.2, STMCubeMX v6.11.0, X-CUBE-FREERTOS STM32H5/U5/WBA/C0 v1.2.0 and STMCubeIDE v1.5.0 The code had to be updated to use "cmsis_os2.h" and of course all the other STM update improvements? Works with some work! The basic Path “Simple” explanation of what it takes to use TouchGFX is good best I have seen so far.

  • @DjordjeKostic
    @DjordjeKostic 10 месяцев назад

    Hi, great video, by the way, in TouchGFX Designer, there are 3 buttons. Generate code, build (window pops up to test) and build & run. When you finish designing, you just need to click the build & run, and the code is automatically flashed to the board. No need for this complicated stuff. If I understanded this right, this is the same you did. Regards.

    • @EEbyKarl
      @EEbyKarl 10 месяцев назад

      Yes i know you can program the development directly from TouchGFX. But then how do you set up UART, PWM, ADC, I2C from TouchGFX? How do you run the debugger from TouchGFX?

  • @양홍렬-m2k
    @양홍렬-m2k Год назад

    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.

  • @MultiPowerAid
    @MultiPowerAid Год назад

    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?

  • @amorftor
    @amorftor Год назад

    Hello carl, xSemaphoreGive function not avalible in cmsis_os2. What can i do about it

    • @EEbyKarl
      @EEbyKarl Год назад

      use osSemaphoreRelease and osSemaphoreAcquire

  • @fernandoprudencio5521
    @fernandoprudencio5521 Год назад

    Dear Mr. Karl First of all, congratulations for you tutorial and to share with us. Dear Karl in my project if I enable freeRTOS, the programs stops working and the display turn off.How can I send data from touchGFX (GUI) to main task (MCU) wthouy freeertos.Could you please send an example. Thanks best regards.

  • @mohaarhly2950
    @mohaarhly2950 Год назад

    please help, i want to go back to the factory condition on this board. After i debug it with stm32cube i can only see a white screen. I used a binary factory but the touch screen not responsive ther was a game in factory condition and now nothing work. Please help

  • @alvisyah3126
    @alvisyah3126 Год назад

    Can you send all the link such as the library please

  • @Chang-cy1lp
    @Chang-cy1lp Год назад

    Hi Karl, I am using STM32F469I-DISCO (DK32F469I$AU1), TouchGFX is version 4.21.1. My app is just a box with a button on it. Code generation and flashing onto the board show no error in TouchGFX, so is building app in STM32CubeIDE (with firmware version FW_F4 V1.27.1) but it just gives blank screen. Tried a few examples and demos on the board too, none worked. I have another made in China board, i can created TouchGFX app and runs fine, but this STMF469I-DISCO just drives me nuts, just could not get it run even a simple app. Any clue ?

    • @embedded_eng
      @embedded_eng Год назад

      Almost 6 months later, I have exactly the same error and it seems Stm32Ide is resulting for this bug and it is buggy anyway.

  • @amalbabu9361
    @amalbabu9361 Год назад

    Hi i am getting error like this when i debug the project....Drivers/BSP/STM32746G-Discovery/stm32746g_discovery_sd.c:459:35: error: unknown type name 'SD_HandleTypeDef'; did you mean 'TIM_HandleTypeDef'? can you please help me with this

  • @EEbyKarl
    @EEbyKarl Год назад

    Leave some comments if you found this tutorial helpful and what you use the timercallback for

  • @casualnoises2808
    @casualnoises2808 Год назад

    Great tutorial Karl!!! It got me started on my discovery board real fast, thank you!!!

    • @EEbyKarl
      @EEbyKarl Год назад

      You're welcome! Glad the video helped you out.

  • @Red_Fang.
    @Red_Fang. Год назад

    excuse me, for this video how to make long press button using timer ? thank you

    • @EEbyKarl
      @EEbyKarl Год назад

      Long press to do what?

    • @Red_Fang.
      @Red_Fang. Год назад

      @@EEbyKarl well, like shut down system, or when you're going to turn on/off the LED for the simple application

    • @EEbyKarl
      @EEbyKarl Год назад

      @@Red_Fang. well instead of debouncing for 20ms you can do 2000ms which is 2 seconds which will call your shut down function TimerCallbackTimerStart(&timerCallback, ShutDownFunction, 2000, TIMER_NO_REPEAT);// one shot

  • @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

  • @Pellemolle
    @Pellemolle Год назад

    Wow, thank you! Been struggling with this for a long time and you solved it for me! 🙏 ST's documentation leaves a bit to be desired.

  • @Bob-Is-A-PotterNow
    @Bob-Is-A-PotterNow Год назад

    I ran across a note in the STM community "rename STM32CubeIDE project". It seems the process is much simplified. All that needs be done is to open the .project file and on the first line correct the default name supplied by touchgfx designer (which is the board name). Then when importing the project into the STM32Cube-IDE it will be named appropriately AND there won't be a conflict with the board name attached to the ioc file.

    • @EEbyKarl
      @EEbyKarl Год назад

      You're partly correct that you only need to rename the one line. But you can't add the IOC file to the project tree without renaming it to the same name as the project. CubeIDE won't open it because it's not the same name as the project. But I did stumble on an easier way to add the IOC file to the project tree and to rename it. Then I realized that it fixes the issue with TouchGFX not finding the board name unless you rename the text as the project name in the .gfx files. But with your insight it helped me find an easier solution😀. I will have to replace this video soon.

    • @Bob-Is-A-PotterNow
      @Bob-Is-A-PotterNow Год назад

      @@EEbyKarl Love your videos! For such a noob as myself, they are very useful and informative. As to the naming of the *.ioc file, yep, after posting my original comment I ran across that. It seems ST's product dev teams, as good as they obviously are, could do a bit better job of communicating how the various apps should communicate and interact. It feels like they are SOOO close to having a fairly seamless integration between the gfx design and the Cube-IDE code & compile aspects of development. Distantly related to all the preceeding: I ran across a new channel (STM32 Research) with only a single video so far (posted about 4 months ago). What I found very, very useful was his approach to using the F429i disc1 board and adding a new (2nd) OLED ssd1306 display by hand. First starting the project as if it's a bare mcu (not a board version), configuring the pins for spi, then adding touchgfx to the project and showing the manual edits to get the display up. I found his workflow very straightforward. I need to try his approach to see if it finally gets me to a nice, orderly and repeatable approach to developing some apps for my own use. Please keep publishing! Your information is so very useful!!!🤩

  • @김상우-z9d
    @김상우-z9d Год назад

    thank u so much!! :D

  • @RanjeetSingh-jx2qx
    @RanjeetSingh-jx2qx 2 года назад

    hello sir,touch not working in stm32 after reset,how i can solve this issue ?

    • @EEbyKarl
      @EEbyKarl 2 года назад

      I have no idea. I never had a situation where the touch screen didn't work so I've never had to troubleshoot something that's not broken

    • @RanjeetSingh-jx2qx
      @RanjeetSingh-jx2qx 2 года назад

      @@EEbyKarl ok,i will make a video and then share with you,can you also make a video in which after reset it will work ?

  • @madGambol
    @madGambol 2 года назад

    The very first operation is to select something from TouchGFX Designer -- how is that installed?

  • @mehmetakifcokren8263
    @mehmetakifcokren8263 2 года назад

    Thx Karl ! It works good. I am using TouchGFX 4.20.0 and STM32CubeIDE 1.10.1. But ioc file doesnt create or linked. So i added link code to .project file then when i created project, it linked a ioc file.

  • @svvelanautica2374
    @svvelanautica2374 2 года назад

    Hello, I like your STM videos! May you eventually do an updated one where you install some GFX example? Thanks

  • @NoBody-bm9if
    @NoBody-bm9if 2 года назад

    Has anybody an idea on how to implement hw button control for the keygoard? I am currently stuck on integrating it on a non touch screen.

  • @colletteanderson4566
    @colletteanderson4566 2 года назад

    Thanks Karl!!!

  • @maikengelbrecht8259
    @maikengelbrecht8259 2 года назад

    Can you Debuging with VSCode? Can you MAKE A VIDEO 😊

  • @randomtuber5358
    @randomtuber5358 2 года назад

    Nice video.I followed your video for stm32f469i disco but it doesn't work.I tried many times but the screen remain black.can you make a video for stm32f469i disco.thanks in advance

    • @luisdc1855
      @luisdc1855 2 года назад

      Did you manage to solve your problem? I've been looking for a solution for hours but can't find anything

    • @randomtuber5358
      @randomtuber5358 2 года назад

      @@luisdc1855 I didn't find solution yet on Touchgfx .

    • @EEbyKarl
      @EEbyKarl Год назад

      For anyone who are running into the black screen issue. The latest TouchGFX fixes the issue due to the different LCD with revision B-07 they are using. When starting a new project just select the correct development board.

  • @최희우-c6x
    @최희우-c6x 2 года назад

    stm32F429 ?? stm32F469?

  • @knightrousoxide
    @knightrousoxide 2 года назад

    The video is titled STM32F469I-DISCO but you go on to do everything on a STM32F429I-DISCO. Is this on purpose and the advise universal for the DISCO boards or an error?

    • @EEbyKarl
      @EEbyKarl 2 года назад

      Sorry, I accidently titled it wrong and even said the wrong part # in the video.

  • @TheKoba30
    @TheKoba30 2 года назад

    Great have you back.

  • @mursalaboobacker3593
    @mursalaboobacker3593 2 года назад

    Waiting for feature videos on touchgfx

  • @mursalaboobacker3593
    @mursalaboobacker3593 2 года назад

    Good video sir

  • @lucadebs7872
    @lucadebs7872 2 года назад

    I am using the STM32F429I In some of the files that you have modified, in addition to having 'STM32F429I-DISCO' I also have the following: "STM32F429I_DISCO_REV_E01" Should I replace this as well?

  • @lucadebs7872
    @lucadebs7872 2 года назад

    I cannot see the .ioc file generated when I import THE existing project into Workspace (as you did at 4:37)

  • @denishnatiuk921
    @denishnatiuk921 2 года назад

    "You have a bad pixel on your screen" 🤣😂

    • @EEbyKarl
      @EEbyKarl 2 года назад

      Haha! Good comeback. 😆

  • @TheKoba30
    @TheKoba30 2 года назад

    Good day, great video, Does anybody knows why the .ioc file is not imported? is there some procedure during installation of STM cube ide or touchGFX ?

  • @khaledsaleh664
    @khaledsaleh664 2 года назад

    I compiled the github project with errors such as /Middlewares/ST/touchgfx_backup/framework/source/platform/hal/simulator/sdl2/HALSDL2.cpp:18:10: fatal error: SDL2/SDL.h: No such file or directory. Please advise

  • @yahyaaouledamer1466
    @yahyaaouledamer1466 2 года назад

    For me, it only worked when I copied also "TouchGFXJAL.hpp and TouchGFXJAL.cpp"

  • @rajdeeproychowdhury7301
    @rajdeeproychowdhury7301 2 года назад

    Is it same process on STM32F469I-DISCO Board...Can i follow that steps on my DISCO board. please reply me...If any video you have then link send me please...

  • @korhanefe40
    @korhanefe40 2 года назад

    The great shepherd has given me a great deal. Thank you. Biji Karl in the Kurdish language

  • @mursalaboobacker3593
    @mursalaboobacker3593 2 года назад

    when you are post the next parts, i waiting for thats one