Only getting background color on the screen. No other graphic images appear.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-09 3:34 PM
I'm trying to get a new display board working. It has an STM32F469, and external SDRAM. Using STM32CubeIDE and TouchGFX to generate code. So far, all I get on the screen is a filled background color, as set it in LTDC settings. No other graphics . Does this mean that at least the external SDRAM and frame buffer are working correctly? I'm trying to narrow down where to look for the problem since every part of this task is new.
- Labels:
-
STM32CubeIDE
-
STM32F4 Series
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-21 6:42 AM
Hi @TSton​,
What were you expecting? I guess this means that the SDRAM/fb are working. Do you have an application running that draws something on screen? Did you try to debug if you can step through the code in your TouchGFX screens?
/Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-21 7:27 AM
Hi Martin,
I've made some progress on this. Here is what TouchGFX simulator shows, followed by what my display is now showing. I've experimented with various clock speeds and other settings to get it to this point. I'm getting FIFO under-run errors if I run the LCD clock faster than about 8MHz. I never get a clean image on the screen though. It seems like the image I want is painted, and then a bunch of noise sweeps over it at regular intervals.
Terry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-22 12:12 AM
Hi, okay, so you've got some memory contention issues. You can try locking dma to front porch so that DMA and LTDC never access SDRAM at the same time (if you're running double buffering).
hal.lockDMAToFrontPorch(true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-22 8:42 AM
Hi Martin,
I was actually set to single buffering. I tried setting double buffering and setting the lock as you suggested, but this had no effect. Any other ideas?
Terry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-22 12:30 PM
What is the black part of your application? Is that an actual box or an image? If you have nothing as background in your application you'd be staring into uninitialized framebuffer memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-22 12:34 PM
I haven't specified a background box in TouchGFX. In STM32CubeIDE, I've set the background colour to white in the LTDC settings by setting the red, blue and green colours to 255.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-22 12:37 PM
Okay, try creating a background box. TouchGFX uses double buffering by default, so you could be seeing something related to LTDC defaults and garbage memory in a different buffer since there's no TouchGFX widgets covering that area / getting drawn into the framebuffer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-22 12:40 PM
Thanks. I will try that and get back to you shortly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-22 1:24 PM
Thanks Martin! I still get an interrupt saying the FIFO underrun error has occured, but then after the underrun interrupt is disabled, it runs as expected.
I set a breakpoint in STM32f4xx_hal_ltdc.c to show you where that occurs:
/* FIFO underrun Interrupt management ***************************************/
if (((isrflags & LTDC_ISR_FUIF) != 0U) && ((itsources & LTDC_IER_FUIE) != 0U))
{
/* Disable the FIFO underrun interrupt */
__HAL_LTDC_DISABLE_IT(hltdc, LTDC_IT_FU);
/* Clear the FIFO underrun flag */
__HAL_LTDC_CLEAR_FLAG(hltdc, LTDC_FLAG_FU);
/* Update error code */
hltdc->ErrorCode |= HAL_LTDC_ERROR_FU;
/* Change LTDC state */
hltdc->State = HAL_LTDC_STATE_ERROR;
Here's the screen now:
