It took me 2 weeks of daily tinkering to bring up my stm32f469i disco with 800x480 dsi screen. Found some libraries where I learned that all default hardware configurations were wrong. Took some extra magic to get it running. Managed to read all existing documentation, datasheets, reference manuals from everything, different code snippets from libraries to figure out how the thing works. To say that I learned a lot would be like to say nothing, after some time I actually started to understand everything in datasheets now. I think I've just been reborn as phoenix - died as Arduino+ developer and born as ARM developer. Still haven't implemented QSPI and touch, they're in work right now, but at least I'm relieved (that I'm not completely hopeless) now, 2 weeks without progress were starting to discourage. Your content was among the most helpful resources!
I will just add to the many people who are saying the same thing; all the parts that you might feel tempted to edit out are incredibly helpful and make up 90% of the projects I have worked on. It's great to see your methodology and also just seeing where someone looks when there is an error is a rare glimpse into experience that is hard to come by. Thank you so much for a great resource!
I really appreciate the unedited parts of the video, it shows similar kinds of problems we might run into when we try and go through this process ourselves and some direction on solving them. Thanks for the great video!
Appreciate for all of efforts to learn us practically, without any cut, ty so much, you push me a lot in my career and save me a lot of time as well, ty again and again
I have used this display: www.buydisplay.com/low-cost-4-3-inch-480x272-tft-lcd-display-w-optl-capacitive-touch-screen The controller is somewhat compatible (except the multitouch stuff)
I would like to know if we can use only QUADSPI for displaying over LCD without initializing FMC(SDRAM). is it possible ? if yes please help me out in that.
The most difficult part here is creating your own STLDR file. How do you think - is it possible instead of this to build the target project as a bin file and write it to memory as is (copy it to SD card or transfer it via some interface from a PC and write it by second project), and then configure XIP execution in a third project ?
Sorry for this question, its quite a long video to watch, are you using LTDC and the QSPI memory for the LTDC to transfer to the screen? Or is the memory just to hold gui images? Are you even using LTDC? lol thanks.
Thanks for sharing. I did not understand how involved it was with the external QSPI Memory when I designed my custom hardware. As fate would have it I am using the same memory and same processor (MT25QL128ABA1ESE-0SIT and STM32F746IG6 respectively) as you. I am mapped: QUADSPI_CLK = PB2, QUADSPI_NCS = PB6, QUADSPI_D0 = PF8, QUADSPI_D1 = PF9, QUADSPI_D2 = PF7, QUADSPI_D3=PF6. Are you mapped the same way and if so could you share your loader with me?
I just finished doing the steps from this video and the previous. I was hoping that creating a project from a previous IOC file would make it easier, but it only helped with the basics. Copying the whole main.c and linker files from the previous project would save a little time. The tGFX + CubeIDE should have a 'save as' or export function to convert the application template based project into a standard (scratch) type project. Thanks for taking the time to create these videos!! If I can assist with these let me know. EEPROM emulation and SD Card FatFS are my next hurdles.
Thanks! It's quite funny how we seem to have the same problems around the same time ;) I am in fact wondering how best to approach the EEPROM issue. I would like to store data either in the flash but apart from the EEPROM emulation I haven't found a good way to do this. Maybe an external EEPROM would in fact be the easiest solution to this! (my custom board have an ESP32 so I could offload the storage to that and save myself a lot of trouble ;)
@@banjohat I did implement the eeprom example from the ST repository, but it executes before the RTOS and TGFX are started. Their strategy seems like it works ok on the F746, I presume it will port to the H735 ok. The calls to it would need to block the OS/TGFX tho. My needs are fairly basic. Keep some config data in eeprom. read it at boot and keep in ram, if any config items are changed by the user, then update the eeprom. The changes will not happen often so blocking the gui is no big deal. Not sure if I want to use the ST stuff, find some generic implementation, or spin up my own. I want to store a large struct, not individual variables, so I think I need to develop something more tailored. I have something I did for a freescale "Coldfire" project that I may port.
@@TurboBobBailey and that is EXACTLY what I want to as well :D Very interesting to know that the EEPROM example is blocking - maybe not something that can be changed due to timing constraints but interesting nonetheless. In the meantime I am also looking into low power modes and how to put the system into some kind of hibernation mode to save power.
Everithing is working with my MT25QL512 memory and with my STM32H743 MCU! However, just like your video, the screen slide animation is not present in the device, while in the simulator is present. Do you know why and how to enable it? Thank you a lot for all your videos!
I think that this should be interesting and informative. Just started watching. Looking ahead: do U use FMC internal peripheral for LCD? And can I use this tutor for bootloading executable code to external memory? And one more question: maybe u have some experience with LVGL?
This is the second part - in the first one I set up the full project and set up FMC and LTDC interface. This is not a tutorial on how to write an external loader - this is to come in the future. However, It goes through the process of putting GUI assets into QSPI flash and loading data from there. I just tried LVGL out yesterday, but experience - I wouldn't call it that ;)
you're already doing that :) If you REALLY want you can find a paypal button on my website (that is woefully outdated since I changed to making videos here)
I'm trying to put some TouchGFX data (images, text, ...) in an external flash (w25q128) on a custom board with STM32H743IIt6 mcu. I'm using the quad-spi. So, I follow the guide to make an external loader and I did it. It seems to work properly: if I load the .stdlr file in the STM32CubeProgrammer I can read, write, erase sector and mass erase the external flash. Also, if I try to debug (STM32CubeIDE) a project using the loader without putting elements into external flash all works and I can see all the memories. The problem occur whe I try to put somenthing inside the external flash. I do that in the linker script with TouchGFX sections: IntFlashSection and TextFlashSection. See the script below: ------------------------------ ------------------------------------------------------------------- STM32CubeProgrammer v2.11.0 ------------------------------------------------------------------- Log output file: C:\Users\ELECTR~1\AppData\Local\Temp\STM32CubeProgrammer_a06572.log ST-LINK SN : 292C05026115303030303032 ST-LINK FW : V2J40S7 Board : -- Voltage : 3.19V SWD freq : 4000 KHz Connect mode: Under Reset Reset mode : Hardware reset Device ID : 0x450 Revision ID : Rev V Device name : STM32H7xx Flash size : 2 MBytes Device type : MCU Device CPU : Cortex-M7 BL Version : 0x90 Memory Programming ... Opening and parsing file: ST-LINK_GDB_server_a06572.srec File : ST-LINK_GDB_server_a06572.srec Size : 309.68 KB Address : 0x08000000 Erasing memory corresponding to segment 0: Erasing internal memory sectors [0 1] Erasing memory corresponding to segment 1: Erasing external memory sectors [0 43] Download in Progress: Error: failed to download Segment[0] Error: failed to download the File
Really amazing video, thank you for helping out. I have the H7 eval board with 4.3 touch, it uses a Macronix NOR FLASH and works in OCTO SPI configuration, this chip is really hard to source. Can I use the Micron chip mentioned in your video, configure my MCU for QUAD SPI and import the micron chip drivers. What's your opinion on it ?
Yes and no. You can use the QSPI I use but the pinouts used in the external loader will not be the same unless you can find one that uses the same pinout with YOUR MCU. if not then you will have to build the external loader yourself - something that I have yet to do. It should be possible but it's not straightforward. Maybe you can find some loaders that are made for the H7 and QSPI? they would be easier to work with. Long story short - the external loaders are both pin specific and chip specific...
Yes, the quad memories can be used off the OCTOSPI of the H7A3 and H723 type parts. Have to use in 8-bit command mode, and only 1, 2 or 4-bit modes. So more prolific Winbond and Micron parts are usable. Strongly recommend using the SOP16(W) 300mil footprint as everyone+dog sells this form-factor cliveone / tesladelorean @ STM32 Forums
Turns out STM32F469 disco (with DSI) is basically strongly undersupported. A month of headbanging and I finally got a fully working picture there, except that the whole thing executes 4 times slower (1 second animation takes like 4 seconds, but it's smooth). A MONTH! So I bought STM32F746 DISCO like the one you have. After 2 hours I already have fully working everything with SDRAM, Flash, Touch and all. Neither community on ST forum nor EE-stackexchange helped me with 469 disco, still can't get it to run correctly, all originally provided scripts don't work (unlike 746 where I configured mx stuff from the first attempt, added drivers for the specific chips and all just worked immediately)
@@banjohat yeah but standard examples for it produce gibberish picture too, and I couldn't google the changes. Now I somehow bruteforced it to work, but it's at 1/4 speed or something, like 1s animation takes smth like 4 seconds. And I can't change LTDC clock (output to DSI) because it produces gibberish too (I change clock setup in standard bsp code and corresponding global value as well as in code generator). I took a little break from programming last week, will give the problem a fresh look.
@@ilyas.7209 That's quite interesting. I didn't spend much time with the 769 board because I was intimidated by the DSI interface. I might give it a go someday and see if I can make it work. the performance should be similar to the 746 but it definitely does not sound like it!
@@banjohat 746 is acting up too tho. No idea why. Sometimes when it powers on, it has the first frame of what it has to show covered with pixels of random colors - and no animation. I press reset 5-6 times, and it works ok. Then I reset again, and it freezes on the first frame without playing anything (I have a square going along the sides of the screen, 1s per screen side, helps to find screen tearing if there is one, after it makes full round, the only screen "changes" to itself and restarts the animation, so it's a forever animation). Tbh, STM32 seem like very unstable MCU with random hiccups and stuff, pretty weird to realize that outdated weak arduino is a lot more stable in my hands. I have 3 boards (2 x 469, 1 x 746), and two of them (a 469 and a 746) sometimes can't get themselves programmed (program is verified, but internal flash is all FFFFFF when I read it back), get stuck in the middle of animation for no reason every time at different moment (until I erase the chip 25 times and then it suddenly works), occasional "core lockup" messages and stuff. FreeRTOS has plenty of memory, have 8192 words stack for touchgfx task. Also, I noticed if I have elements overlap (one element cross another during animation), it is guaranteed to get stuck during overlap (at random moment - on 1st pixel overlap or one widget randomly somewhere in the middle of another element - every time at different moment). Do you have any advice? Maybe you know some article or other useful material on STM32/TouchGFX? I followed your guides and got it to work seemingly ok a pair of weeks back on 746, but now I have all sorts of random stability issues and hardware faults every 3-4 firmware flashes (and any disco I get becomes unstable in 3-4 weeks of daily active programming). (sometimes it works perfectly indefinitely, I power cycle it, and it's stuck for the rest of the day or an hour). I'm getting disappointed in STM32, especially since it's a powerful piece of technology, and there is definitely nothing that I did wrong (I even went all the way to copying your entire workflow when I got totally desperate - same unstable results now). And I can't reset everything to factory. Even if I flash known working program (and I make a copy of program if it works so I have working something if I break things later), it may actually not function at all, it may try to run previous program which is not supposed to be on MCU anymore etc. If you have a few words of advice or useful resources, I would be very grateful, as ST forum seems to have few people, usually people barely reply, same with STM32 and EE stackexchange
@@banjohat flashed demo binary + external loader with cubeprogrammer, works seemingly ok. Will have to start over again. Creating new project STM32F746TRY9 (469 has 19 versions, 0 of which work totally ok). We'll see how it goes, but I'm going desperate :/
Hi embryonic... Thanks a lot for your video.. it was amazing... We were able with your help to set up an application with quadspi using the external loader... But now we want to add the possibility di update the flash and the external flash by using a usb stick... We developed a bootloader just for updating the flash but it is missing the part for updating the external flash (starting from address 0x90000000)... Do you have any ideas or can you provide the steps what you would do in order to change the bootloader ? Thanks a lot Regards.. great work
I want the same thing myself :) Maybe not form a USB stick but from a computer. You would want to integrate the loader functionality into your regular program in order to be able to write to the QSPI. if you already have the regular bootloader running it should only be a matter of being able to write to the memory :)
@@banjohat maybe you are right.. For the moment the current bootloader has only usb functionality .. What do you think I should add ? The quadspi from the configurator ? And then maybe I should add the external loader in the debug section? an then maybe changing the linker file adding the quadspi region ?? And then how can I Flash the addresses ? I don't think I could call HAL_FLASH_Program(TYPEPROGRAM_WORD, Address, data ); because it works only for addresses in the flash region? Maybe I should call some functions that are called from the externel loader ? what do you think ? thanks a lot again
@@simonegasparella3156 you should add the functionality from the external loader. the methods to write (and access in general) the QSPI needs to be available to your bootloader
I have a completely unrelated and positive (for a change haha) question: the code generator can actually create a .c/.h pair of files per peripheral. As a person with clearly more experience than me, what do you prefer? I like the idea of having many files, and if I need to change something in LTDC, I just open ltdc.c, it feels less like clutter**** in main.c. Is there any reason I would NOT want to have every peripheral in its own file? What is your experience?
Well I am actually just using the full clutter in main :P But that's because I was unaware of the option until a few months ago. Personally I have left all init in main and then use the task entry points to enter other files. I think it depens on what you want to do: do you want to have all peripheral code located in the same file as the init? then it makes sense. I have have organised my code in functionality and have created a few high-level blocks such as having a task that checks all the hardware interactions. I think that it makes more sense (to me) to have that block all by itself with its helper functions and have the task start that block directly from main.
You may want to enable this feature of the STM32CubeIDE when you have "external" drivers which may use the HAL library. So for example, if you have a sensor which uses the SPI to communicate with the MCU, you can create the .c/.h pair for your sensor, then just include the "spi.h" into the sensor driver header and you will have all the HAL_SPI resources and functions available for your driver. So it's good to enable this when you have big projects with a lot of code/drivers, since it will allow you to share the HAL/LL peripheral resources easily with all your code, maintaining everything organized. In little projects it doesn't make a lot of difference.
Great video, everything works except the last part for the touchscreen. BSP_TS_GetState(&state); This function creates a "MemManage_Handler" error, after some debug i found that it gets lost in "TIM6_DAC_IRQHandler" and the screen doesn't show anything. Thanks in advance.
i solved it, it was my mistake on the I2C port. But I ask you, is it normal to have a 2.2Giga .BIN file, and how to make the loader separate from cube .., so as to load images and text separately in the QSPI.
I think you can disable the .bin file generation in the builder settings. As far as I recall the .bin file is not used for anything but I might be wrong. luckily it gets overwritten with each build so there is only one at a time :)
Hello! Thanks for this video! I do the same and it works) But i still have one problem. When the framebuffer changes, i see artifacts on the display. Do you know where is refresh signal for LTDC to get the framebuffer? I think that LTDC gets framebuffer periodically, but don't skip when it in changging process. Do u have same problem any timess?
There is a global interrupt that tGFX uses for refreshing. I have had small artifacts in the beginning but that was mainly due to problems with the QSPI and having the GUI assets not loaded properly. If you're using that try to move all pictures to internal flash and see if that helps.
@@banjohat I mean this effect calls tearing. I see artifacts only with framebuffer changing. LTDC gets frame while DMA2D still filling buffer. LTDC don't wait end of DMA2D job. If i store pictures in internal flash, result is the same. I have read on the different resourses, that there is a function "lockDMAToFrontPorch" which don't let do actions with the framebuffer DMA2D and LTDC at the same time. But in version 4.15 it isn't work.
Hi, Can You please do a tutorial using SD card with a touch GFX application. I mean to say how can I write to a SD Card while a touchgfx application is running parallelly using a different task.
@@hanspeterhaastrup-nielsen8446 Ok, Thanks . SD card example works standalone but not with a touch gfx application. Anyways, I'll keep trying till I get it to work
Hi , I got it working . Just thought of sharing the link of community community.st.com/s/question/0D53W00000TGAFZSA5/sdmmc-does-not-work-with-touchgfx-application Might help anybody.
It doesn't really make sense to redo the video with another chip. The procedure is the same - If you don't have the external loader that is where you need to go first.
Thank you for this video which saved me time. I just have a problem when i add elements with text on touchgfx, i have a HardFault error. It is a recurring problem, to solve it i forced the storage of the text elements in the internal memory by modifying the .Id file 😅
It took me 2 weeks of daily tinkering to bring up my stm32f469i disco with 800x480 dsi screen. Found some libraries where I learned that all default hardware configurations were wrong. Took some extra magic to get it running. Managed to read all existing documentation, datasheets, reference manuals from everything, different code snippets from libraries to figure out how the thing works. To say that I learned a lot would be like to say nothing, after some time I actually started to understand everything in datasheets now. I think I've just been reborn as phoenix - died as Arduino+ developer and born as ARM developer. Still haven't implemented QSPI and touch, they're in work right now, but at least I'm relieved (that I'm not completely hopeless) now, 2 weeks without progress were starting to discourage. Your content was among the most helpful resources!
I will just add to the many people who are saying the same thing; all the parts that you might feel tempted to edit out are incredibly helpful and make up 90% of the projects I have worked on. It's great to see your methodology and also just seeing where someone looks when there is an error is a rare glimpse into experience that is hard to come by. Thank you so much for a great resource!
Thank you so much for you comment :)
Thank you very much, you saved me man. I was struggling for almost 3 weeks until I found you.
How I can speak with you please
@@fadial-baghdadi6157 Hello, I added my Email address to my channel/about section
I really appreciate the unedited parts of the video, it shows similar kinds of problems we might run into when we try and go through this process ourselves and some direction on solving them. Thanks for the great video!
Appreciate for all of efforts to learn us practically, without any cut, ty so much, you push me a lot in my career and save me a lot of time as well, ty again and again
This video is not boring. Very useful. Thank you.
This is the most informative kind of videos one can make. Thank you
Much thanks - just got touch on my custom hardware working seconds ago. Your video was a tremendous help.
I have just noticed Crash Bnadicoot figure in the background, awesome!
He's the mascot for our gaming team ;)
Not boring video at all. I found it very useful, thank you.
This is amazing thank you for making a full video like this going through your process
Very useful video. Thank you! Please could you tell me which touch screen controller substitutes the obsolete FT5336 in your application?
I have used this display: www.buydisplay.com/low-cost-4-3-inch-480x272-tft-lcd-display-w-optl-capacitive-touch-screen
The controller is somewhat compatible (except the multitouch stuff)
How can I add the same features in a program keil
Please make a video showing how to make an external loader.
Would you please make a video about making custom external loader? it will help a lot of people, thanks
I know - I have been wanting to do that myself for a long time! But you will have to wait a bit more for that..
Wow that was quicker than expected. Thank you!
Yay after the video before this volume almost blew me off my chair. That volume is perfect now :)
Hah, yeah it was a hard start getting the levels right ;) but I'm glad you can bear with me now :D
Hi can you tell me qspi flash number and tou ic number for my custom board. I want to use capacitive touch display instead of reaistive
I would like to know if we can use only QUADSPI for displaying over LCD without initializing FMC(SDRAM). is it possible ? if yes please help me out in that.
The most difficult part here is creating your own STLDR file. How do you think - is it possible instead of this to build the target project as a bin file and write it to memory as is (copy it to SD card or transfer it via some interface from a PC and write it by second project), and then configure XIP execution in a third project ?
Sorry for this question, its quite a long video to watch, are you using LTDC and the QSPI memory for the LTDC to transfer to the screen? Or is the memory just to hold gui images? Are you even using LTDC? lol thanks.
it's in the videos description - the QSPI is used for storing images. and yes - I am using LTDC....
Thanks for sharing. I did not understand how involved it was with the external QSPI Memory when I designed my custom hardware. As fate would have it I am using the same memory and same processor (MT25QL128ABA1ESE-0SIT and STM32F746IG6 respectively) as you. I am mapped: QUADSPI_CLK = PB2, QUADSPI_NCS = PB6, QUADSPI_D0 = PF8, QUADSPI_D1 = PF9, QUADSPI_D2 = PF7, QUADSPI_D3=PF6. Are you mapped the same way and if so could you share your loader with me?
I just finished doing the steps from this video and the previous. I was hoping that creating a project from a previous IOC file would make it easier, but it only helped with the basics. Copying the whole main.c and linker files from the previous project would save a little time. The tGFX + CubeIDE should have a 'save as' or export function to convert the application template based project into a standard (scratch) type project. Thanks for taking the time to create these videos!! If I can assist with these let me know. EEPROM emulation and SD Card FatFS are my next hurdles.
Thanks! It's quite funny how we seem to have the same problems around the same time ;)
I am in fact wondering how best to approach the EEPROM issue. I would like to store data either in the flash but apart from the EEPROM emulation I haven't found a good way to do this. Maybe an external EEPROM would in fact be the easiest solution to this!
(my custom board have an ESP32 so I could offload the storage to that and save myself a lot of trouble ;)
@@banjohat I did implement the eeprom example from the ST repository, but it executes before the RTOS and TGFX are started. Their strategy seems like it works ok on the F746, I presume it will port to the H735 ok. The calls to it would need to block the OS/TGFX tho. My needs are fairly basic. Keep some config data in eeprom. read it at boot and keep in ram, if any config items are changed by the user, then update the eeprom. The changes will not happen often so blocking the gui is no big deal. Not sure if I want to use the ST stuff, find some generic implementation, or spin up my own. I want to store a large struct, not individual variables, so I think I need to develop something more tailored. I have something I did for a freescale "Coldfire" project that I may port.
@@TurboBobBailey and that is EXACTLY what I want to as well :D
Very interesting to know that the EEPROM example is blocking - maybe not something that can be changed due to timing constraints but interesting nonetheless.
In the meantime I am also looking into low power modes and how to put the system into some kind of hibernation mode to save power.
Maybe a “boring” video , but so helpful. Thank you.
Thank you very much for your video, incredibly useful
Everithing is working with my MT25QL512 memory and with my STM32H743 MCU! However, just like your video, the screen slide animation is not present in the device, while in the simulator is present. Do you know why and how to enable it? Thank you a lot for all your videos!
It's most likely due to the missing 2nd or 3rd framebuffer. Are you using double buffers?
Unfortunately after touchgfx 4.18 everything changed. Almost impossible to create a project from scratch
is that so?? Then I better see of I can make another tutorial :)
thank you for making this video, This is Really amazing!😅
Someone told me these schematics were public but I have not found them can someone point me in the right direction...?
is this what you're looking for? www.st.com/resource/en/schematic_pack/mb1191-f746ngh6-c01_schematic.pdf
I think that this should be interesting and informative. Just started watching. Looking ahead: do U use
FMC internal peripheral for LCD? And can I use this tutor for bootloading executable code to external memory? And one more question: maybe u have some experience with LVGL?
This is the second part - in the first one I set up the full project and set up FMC and LTDC interface.
This is not a tutorial on how to write an external loader - this is to come in the future. However, It goes through the process of putting GUI assets into QSPI flash and loading data from there.
I just tried LVGL out yesterday, but experience - I wouldn't call it that ;)
It was a great video as it showed what could go wrong and how to resolve. Do you have a way of providing a thankyou?
you're already doing that :)
If you REALLY want you can find a paypal button on my website (that is woefully outdated since I changed to making videos here)
Could you share Clive's info? Thanks.
Nope, sorry, you will have to find him in the forums. Should be easy though
"External loader fails to download"
Hi all,
I'm trying to put some TouchGFX data (images, text, ...) in an external flash (w25q128) on a custom board with STM32H743IIt6 mcu. I'm using the quad-spi.
So, I follow the guide to make an external loader and I did it. It seems to work properly: if I load the .stdlr file in the STM32CubeProgrammer I can read, write, erase sector and mass erase the external flash.
Also, if I try to debug (STM32CubeIDE) a project using the loader without putting elements into external flash all works and I can see all the memories.
The problem occur whe I try to put somenthing inside the external flash. I do that in the linker script with TouchGFX sections: IntFlashSection and TextFlashSection. See the script below:
------------------------------
-------------------------------------------------------------------
STM32CubeProgrammer v2.11.0
-------------------------------------------------------------------
Log output file: C:\Users\ELECTR~1\AppData\Local\Temp\STM32CubeProgrammer_a06572.log
ST-LINK SN : 292C05026115303030303032
ST-LINK FW : V2J40S7
Board : --
Voltage : 3.19V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x450
Revision ID : Rev V
Device name : STM32H7xx
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M7
BL Version : 0x90
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a06572.srec
File : ST-LINK_GDB_server_a06572.srec
Size : 309.68 KB
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 1]
Erasing memory corresponding to segment 1:
Erasing external memory sectors [0 43]
Download in Progress:
Error: failed to download Segment[0]
Error: failed to download the File
Really amazing video, thank you for helping out.
I have the H7 eval board with 4.3 touch, it uses a Macronix NOR FLASH and works in OCTO SPI configuration, this chip is really hard to source. Can I use the Micron chip mentioned in your video, configure my MCU for QUAD SPI and import the micron chip drivers. What's your opinion on it ?
Yes and no. You can use the QSPI I use but the pinouts used in the external loader will not be the same unless you can find one that uses the same pinout with YOUR MCU. if not then you will have to build the external loader yourself - something that I have yet to do. It should be possible but it's not straightforward.
Maybe you can find some loaders that are made for the H7 and QSPI? they would be easier to work with.
Long story short - the external loaders are both pin specific and chip specific...
@@banjohat Thank you for your guidance, will check out the possibilities.
Yes, the quad memories can be used off the OCTOSPI of the H7A3 and H723 type parts. Have to use in 8-bit command mode, and only 1, 2 or 4-bit modes.
So more prolific Winbond and Micron parts are usable.
Strongly recommend using the SOP16(W) 300mil footprint as everyone+dog sells this form-factor
cliveone / tesladelorean @ STM32 Forums
Turns out STM32F469 disco (with DSI) is basically strongly undersupported. A month of headbanging and I finally got a fully working picture there, except that the whole thing executes 4 times slower (1 second animation takes like 4 seconds, but it's smooth). A MONTH! So I bought STM32F746 DISCO like the one you have. After 2 hours I already have fully working everything with SDRAM, Flash, Touch and all. Neither community on ST forum nor EE-stackexchange helped me with 469 disco, still can't get it to run correctly, all originally provided scripts don't work (unlike 746 where I configured mx stuff from the first attempt, added drivers for the specific chips and all just worked immediately)
That's super weird. there should be the same support for the 769 board as the 746..
@@banjohat yeah but standard examples for it produce gibberish picture too, and I couldn't google the changes. Now I somehow bruteforced it to work, but it's at 1/4 speed or something, like 1s animation takes smth like 4 seconds. And I can't change LTDC clock (output to DSI) because it produces gibberish too (I change clock setup in standard bsp code and corresponding global value as well as in code generator). I took a little break from programming last week, will give the problem a fresh look.
@@ilyas.7209 That's quite interesting. I didn't spend much time with the 769 board because I was intimidated by the DSI interface.
I might give it a go someday and see if I can make it work. the performance should be similar to the 746 but it definitely does not sound like it!
@@banjohat 746 is acting up too tho. No idea why. Sometimes when it powers on, it has the first frame of what it has to show covered with pixels of random colors - and no animation. I press reset 5-6 times, and it works ok. Then I reset again, and it freezes on the first frame without playing anything (I have a square going along the sides of the screen, 1s per screen side, helps to find screen tearing if there is one, after it makes full round, the only screen "changes" to itself and restarts the animation, so it's a forever animation). Tbh, STM32 seem like very unstable MCU with random hiccups and stuff, pretty weird to realize that outdated weak arduino is a lot more stable in my hands. I have 3 boards (2 x 469, 1 x 746), and two of them (a 469 and a 746) sometimes can't get themselves programmed (program is verified, but internal flash is all FFFFFF when I read it back), get stuck in the middle of animation for no reason every time at different moment (until I erase the chip 25 times and then it suddenly works), occasional "core lockup" messages and stuff. FreeRTOS has plenty of memory, have 8192 words stack for touchgfx task.
Also, I noticed if I have elements overlap (one element cross another during animation), it is guaranteed to get stuck during overlap (at random moment - on 1st pixel overlap or one widget randomly somewhere in the middle of another element - every time at different moment).
Do you have any advice? Maybe you know some article or other useful material on STM32/TouchGFX? I followed your guides and got it to work seemingly ok a pair of weeks back on 746, but now I have all sorts of random stability issues and hardware faults every 3-4 firmware flashes (and any disco I get becomes unstable in 3-4 weeks of daily active programming). (sometimes it works perfectly indefinitely, I power cycle it, and it's stuck for the rest of the day or an hour). I'm getting disappointed in STM32, especially since it's a powerful piece of technology, and there is definitely nothing that I did wrong (I even went all the way to copying your entire workflow when I got totally desperate - same unstable results now). And I can't reset everything to factory. Even if I flash known working program (and I make a copy of program if it works so I have working something if I break things later), it may actually not function at all, it may try to run previous program which is not supposed to be on MCU anymore etc.
If you have a few words of advice or useful resources, I would be very grateful, as ST forum seems to have few people, usually people barely reply, same with STM32 and EE stackexchange
@@banjohat flashed demo binary + external loader with cubeprogrammer, works seemingly ok. Will have to start over again. Creating new project STM32F746TRY9 (469 has 19 versions, 0 of which work totally ok). We'll see how it goes, but I'm going desperate :/
Hi embryonic... Thanks a lot for your video.. it was amazing... We were able with your help to set up an application with quadspi using the external loader... But now we want to add the possibility di update the flash and the external flash by using a usb stick... We developed a bootloader just for updating the flash but it is missing the part for updating the external flash (starting from address 0x90000000)... Do you have any ideas or can you provide the steps what you would do in order to change the bootloader ? Thanks a lot Regards.. great work
I want the same thing myself :) Maybe not form a USB stick but from a computer.
You would want to integrate the loader functionality into your regular program in order to be able to write to the QSPI. if you already have the regular bootloader running it should only be a matter of being able to write to the memory :)
@@banjohat maybe you are right.. For the moment the current bootloader has only usb functionality .. What do you think I should add ? The quadspi from the configurator ? And then maybe I should add the external loader in the debug section? an then maybe changing the linker file adding the quadspi region ??
And then how can I Flash the addresses ? I don't think I could call HAL_FLASH_Program(TYPEPROGRAM_WORD, Address, data ); because it works only for addresses in the flash region? Maybe I should call some functions that are called from the externel loader ? what do you think ? thanks a lot again
@@simonegasparella3156 you should add the functionality from the external loader. the methods to write (and access in general) the QSPI needs to be available to your bootloader
I have a completely unrelated and positive (for a change haha) question: the code generator can actually create a .c/.h pair of files per peripheral. As a person with clearly more experience than me, what do you prefer? I like the idea of having many files, and if I need to change something in LTDC, I just open ltdc.c, it feels less like clutter**** in main.c. Is there any reason I would NOT want to have every peripheral in its own file? What is your experience?
Well I am actually just using the full clutter in main :P
But that's because I was unaware of the option until a few months ago.
Personally I have left all init in main and then use the task entry points to enter other files.
I think it depens on what you want to do: do you want to have all peripheral code located in the same file as the init? then it makes sense.
I have have organised my code in functionality and have created a few high-level blocks such as having a task that checks all the hardware interactions. I think that it makes more sense (to me) to have that block all by itself with its helper functions and have the task start that block directly from main.
You may want to enable this feature of the STM32CubeIDE when you have "external" drivers which may use the HAL library. So for example, if you have a sensor which uses the SPI to communicate with the MCU, you can create the .c/.h pair for your sensor, then just include the "spi.h" into the sensor driver header and you will have all the HAL_SPI resources and functions available for your driver.
So it's good to enable this when you have big projects with a lot of code/drivers, since it will allow you to share the HAL/LL peripheral resources easily with all your code, maintaining everything organized. In little projects it doesn't make a lot of difference.
And is possible to upload ur example to Git?
Sorry - no code. These two videos are meant as a tutorial and the purpose is that you follow along with your own project.
Great video, everything works except the last part for the touchscreen.
BSP_TS_GetState(&state);
This function creates a "MemManage_Handler" error, after some debug i found that it gets lost in "TIM6_DAC_IRQHandler" and the screen doesn't show anything.
Thanks in advance.
i solved it, it was my mistake on the I2C port.
But I ask you, is it normal to have a 2.2Giga .BIN file, and how to make the loader separate from cube .., so as to load images and text separately in the QSPI.
I think you can disable the .bin file generation in the builder settings. As far as I recall the .bin file is not used for anything but I might be wrong. luckily it gets overwritten with each build so there is only one at a time :)
Hello! Thanks for this video! I do the same and it works) But i still have one problem. When the framebuffer changes, i see artifacts on the display. Do you know where is refresh signal for LTDC to get the framebuffer? I think that LTDC gets framebuffer periodically, but don't skip when it in changging process. Do u have same problem any timess?
There is a global interrupt that tGFX uses for refreshing.
I have had small artifacts in the beginning but that was mainly due to problems with the QSPI and having the GUI assets not loaded properly. If you're using that try to move all pictures to internal flash and see if that helps.
@@banjohat I mean this effect calls tearing. I see artifacts only with framebuffer changing. LTDC gets frame while DMA2D still filling buffer. LTDC don't wait end of DMA2D job. If i store pictures in internal flash, result is the same. I have read on the different resourses, that there is a function "lockDMAToFrontPorch" which don't let do actions with the framebuffer DMA2D and LTDC at the same time. But in version 4.15 it isn't work.
@@РусланАкмалов-г6э You should this post in the community forums :) there are a lot of knowledgeable people :)
@@hanspeterhaastrup-nielsen8446 I think ure right) I’ll do so)
Clive, were are you?
Hi, Can You please do a tutorial using SD card with a touch GFX application. I mean to say how can I write to a SD Card while a touchgfx application is running parallelly using a different task.
When I have the need for that I will. I don't ha e that at the moment so don't hold your breath for it :)
@@hanspeterhaastrup-nielsen8446 Ok, Thanks . SD card example works standalone but not with a touch gfx application. Anyways, I'll keep trying till I get it to work
Hi , I got it working . Just thought of sharing the link of community
community.st.com/s/question/0D53W00000TGAFZSA5/sdmmc-does-not-work-with-touchgfx-application
Might help anybody.
Great work!
Very helpful
Thanks for sharing
Thanks
One question
May you repeat this work with winbond qapi flash such as w25q128fv
It doesn't really make sense to redo the video with another chip. The procedure is the same - If you don't have the external loader that is where you need to go first.
This will be good if you learn how i and others create new external loader.
Thanks
Thank you for this video which saved me time.
I just have a problem when i add elements with text on touchgfx, i have a HardFault error.
It is a recurring problem, to solve it i forced the storage of the text elements in the internal memory by modifying the .Id file 😅
uh-oh! That doesn't sound good! luckily text doesn't take up much space :)
Thank you very much
Thanks for sharing.
I hope it helps :)
Ctrl-/ to comment a line - save's you so much time also works for multi line comments.