2020-11-12 11:17 AM
Hi,
I have a STM32F779BI on a custom board that communicates with a LCD display using the LTDC interface in 16bits (480x272). I am using a single buffer inside the RAM of the MCU. So far TouchGFX works pretty well but once i activated the Software package for touchgfx inside Cubemx, i see that a "MX_TouchGFX_Init();" is added in the Main init section and i have to manually call the "MX_TouchGFX_Process();" in a task when all my board is up and running and can finally start the drawing process on the LCD.
My problem is that i have a task for logging data on a SD card using FatFS. Since i am using FreeRTOS, i had to implement the writes and Reads using the DMA on the SDMMC. This works pretty well too when touchgfx is not initialized ("MX_TouchGFX_Init();") and started ("MX_TouchGFX_Process();").
At first i thought it was a problem of NVIC priority for the SDMMC DMA versus the DMA2D interrupt priority. However, i made sure to give the DMA2D a priority less than for the DMA SDMMC and it still don't work.
The reason i know it's not behaving correctly is that FatFs return "FR_NO_FILESYSTEM" when doing a "f_open()". Normally, the FatFs generated by CubeMx does not need any modifications and if it breaks, is usually due to a lower layer (DMA transfer in this case).
Has anyone experienced problem with the Sdcard when using touchgfx in this communiation: SDMMC+DMA+FATFS+FReeRTOS+TouchGFX?
I have provided the project as is where you can look into my cubemx file for settings.
Thanks in advance for the help.
2020-11-12 12:50 PM
Additionnaly, i have found that the SDMMC breaks when i am using the buffer allocation in the TouchGFX configuration in CubeMx.
When i chose the option "by address" and specify an address at the end of the ram (the same adress where touchgfx allocates the single frame buffer), i can call "MX_TouchGFX_Init();" with no impact on the SDMMC. It is when i call the "MX_TouchGFX_Process();" that the SDMMC stops working correctly.
2020-11-18 04:19 AM
_Process(); enters the TouchGFX main event loop. Could be a timing/priority issue.
/Martin
2020-11-18 07:37 AM
I have suspected the same, it's easy to replicate, juste use a devboard with a LCD and have a TOuchGFX project active, then try to activate the SDMMC interface. I have tried it on the STM32F7508-DK and had the same issue.
2020-11-18 10:48 PM
Have you tried to do any debugging on this project?
/Martin
2020-11-19 12:17 PM
Yes i have debugged the project enough to blame touchgfx for breaking the SDMMC. More than that, i have tried to set different NVIC priority for the DMA2D and LTDC needed by the TouchGFX without any impact.
2020-12-17 07:44 AM
Hi,
do you have any update on this issue? I'm facing exactly the same problem on a STM32F746G-Disco devboard!
Thanks.
2020-12-18 01:18 AM
No, i'll try to get around to trying this out on an F746G-DISCO board. Can you share the project you have for this board?
2020-12-18 06:59 AM
2020-12-18 07:41 PM
I will be needing the SDMMC very soon in my project as well. I will be using the F746 or the H735, but the solution will likely be the same in either case.
Thanks!!
Bob