651 views
in GUI Development by

Hello,

As you see below, there are some blue pixel occuring on display. Our application use double buffer. When display frame buffer change because of update these pixels are vanished, after another update they occur again.

In prototyper, I didn't see these pixel. What is the reason of this situation. Do you have any suggestion.

Thanks.

1 Answer

0 votes
by

Hello,

in order to support you, let me ask you first a couple of questions:

  • Which target are you using (is it a discovery/evaluation board or your custom specific hardware)?
  • What CPU and what memory layout (address ranges of SDRAM and FLASH) are you using?
  • Are the bitmap resources are configured as DirectAccess or Compressed?
  • If you are using STM32F7 - please let me know your MPU settings.
  • Which version of Embedded Wizard / Build Environment are you using?
Thanks and best regards,
Manfred.

 

by
  • STM32f769 based custom board
  • Program execute on SDRAM 0xC0000000
    • Target system                                STM32F769-Evalboard
    • Color format                                 RGBA8888
    • MemoryPool address                           0xC1800000
    • MemoryPool size                              5316608 bytes
    • Framebuffer address                          0xC1E89000
    • Doublebuffer address                         0xC1D12000
    • Framebuffer size                             800 x 480
    • EwScreeenSize                                480 x 800
    • Graphics accelerator                         DMA2D
    • Vector graphics support                      enabled
    • Bidirectional text support                   enabled
    • Operating system                             none
    • External flash device                        none
    • Toolchain                                    GCC
    • C-Compiler version                           6.3.1
    • Build date and time                          Dec 18 2018, 14:16:53
    • Runtime Environment (RTE) version            9.10
    • Graphics Engine (GFX) version                9.10
    • Max surface cache size                       4194304 bytes
    • Glyph cache size                             256 x 256
    • Max issue tasks                              100
    • Surface rotation                             90
  • bitmap resources are configured as Compressed
  • MPU settings:
    • MPU_InitStruct.Enable           = MPU_REGION_ENABLE;
    • MPU_InitStruct.Number           = MPU_REGION_NUMBER0;
    • MPU_InitStruct.BaseAddress      = SRDAM_START_ADDRESS;//0xC0000000
    • MPU_InitStruct.Size             = MPU_REGION_SIZE_32MB;
    • MPU_InitStruct.SubRegionDisable = 0x0;
    • MPU_InitStruct.TypeExtField     = MPU_TEX_LEVEL0;
    • MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
    • MPU_InitStruct.DisableExec      = MPU_INSTRUCTION_ACCESS_ENABLE;
    • MPU_InitStruct.IsShareable      = MPU_ACCESS_NOT_SHAREABLE;
    • MPU_InitStruct.IsCacheable      = MPU_ACCESS_CACHEABLE;
    • MPU_InitStruct.IsBufferable     = MPU_ACCESS_BUFFERABLE;
    • HAL_MPU_ConfigRegion(&MPU_InitStruct);
  • Embedded wizard 9.10
by

Hello,

in case you are using 32MByte of SDRAM, please try the following settings:

  /* Configure the MPU attributes for SDRAM 32MB to normal memory Cacheable */
  MPU_InitStruct.Enable           = MPU_REGION_ENABLE;
  MPU_InitStruct.Number           = MPU_REGION_NUMBER5;
  MPU_InitStruct.BaseAddress      = 0xC0000000;
  MPU_InitStruct.Size             = MPU_REGION_SIZE_32MB;
  MPU_InitStruct.SubRegionDisable = 0x0;
  MPU_InitStruct.TypeExtField     = MPU_TEX_LEVEL0;
  MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
  MPU_InitStruct.DisableExec      = MPU_INSTRUCTION_ACCESS_ENABLE;
  MPU_InitStruct.IsShareable      = MPU_ACCESS_SHAREABLE;
  MPU_InitStruct.IsCacheable      = MPU_ACCESS_CACHEABLE;
  MPU_InitStruct.IsBufferable     = MPU_ACCESS_NOT_BUFFERABLE;
  HAL_MPU_ConfigRegion(&MPU_InitStruct);

Does it work?

Best regards,

Manfred.

by
It works. Thanks for your help.
by

Hello Manfred,

In my application, I have camera, I2S radio and digital audio output, mp3 player on usb full speed, touch screen, some IO etc. We use processor performace almost %90 percent. I mention about before My program execute on first 8MB of SDRAM. If I applied your MPU solution, my program works slowly and mp3 decoding process can not be real-time. Processor performance not enough with your MPU configuration. I try to optimize my application but still not enough. Is there any other way to solve my unidentified pixel problem. Below my SDRAM organization;

+---------------------------+ - 0xC0000000
|                           |
|          Program          | - 8MB
|                           |
+---------------------------+ - 0xC0800000
|                           |
|         Empty area        |‬
|                           |
+---------------------------+ - 0xC0DD72E2
|                           |
|    Mp3 stream buffer      |‬
|                           |
+---------------------------+ - 0xC0DF6840
|                           |
|       Audio buffer        |‬
|                           |
+---------------------------+ - 0xC0E89000
|                           |
|     Camera FB buffer      |
|                           |
+---------------------------+ - 0xC1000000
|                           |
| EMBEDDED_WIZARD_POOL_SIZE | - 16MB - (Double buffer, 800x480x4)
|                           |
+---------------------------+ - 0xC2000000

by

Hello!

In this case, you can define different MPU settings for separate memory areas within the SDRAM - e.g. you can split the MPU settings into two 16 MByte areas:

One 16 MByte range for graphics:

  MPU_InitStruct.IsShareable      = MPU_ACCESS_SHAREABLE;
  MPU_InitStruct.IsCacheable      = MPU_ACCESS_CACHEABLE;
  MPU_InitStruct.IsBufferable     = MPU_ACCESS_NOT_BUFFERABLE;

And the other 16MByte range for your application including MP3:

  MPU_InitStruct.IsShareable      = MPU_ACCESS_NOT_SHAREABLE;
  MPU_InitStruct.IsCacheable      = MPU_ACCESS_CACHEABLE;
  MPU_InitStruct.IsBufferable     = MPU_ACCESS_BUFFERABLE;

Does this improve the MP3 decoding performance and solve the pixel issue?

Maybe you need to define more than two MPU ranges - let me recommend AN8438 from ST concerning MPU settings.

Best regards,

Manfred.

by

It works Manfred. Thanks. I seperate only EMBEDDED_WIZARD_POOL region and it works. I understand MPU function now :)

//Configure the MPU attributes for SDRAM program area
MPU_InitStruct.Enable           = MPU_REGION_ENABLE;
MPU_InitStruct.Number           = MPU_REGION_NUMBER1;
MPU_InitStruct.BaseAddress      = SRDAM_START_ADDRESS;
MPU_InitStruct.Size             = MPU_REGION_SIZE_16MB;
MPU_InitStruct.SubRegionDisable = 0x0;
MPU_InitStruct.TypeExtField     = MPU_TEX_LEVEL0;
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
MPU_InitStruct.DisableExec      = MPU_INSTRUCTION_ACCESS_ENABLE;
MPU_InitStruct.IsShareable      = MPU_ACCESS_NOT_SHAREABLE;
MPU_InitStruct.IsCacheable      = MPU_ACCESS_CACHEABLE;
MPU_InitStruct.IsBufferable     = MPU_ACCESS_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);

//Configure the MPU attributes for SDRAM embedded wizard pool
MPU_InitStruct.Enable           = MPU_REGION_ENABLE;
MPU_InitStruct.Number           = MPU_REGION_NUMBER2;
MPU_InitStruct.BaseAddress      = SRDAM_START_ADDRESS + 0x1000000;
MPU_InitStruct.Size             = MPU_REGION_SIZE_16MB;
MPU_InitStruct.SubRegionDisable = 0x0;
MPU_InitStruct.TypeExtField     = MPU_TEX_LEVEL0;
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
MPU_InitStruct.DisableExec      = MPU_INSTRUCTION_ACCESS_ENABLE;
MPU_InitStruct.IsShareable      = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.IsCacheable      = MPU_ACCESS_CACHEABLE;
MPU_InitStruct.IsBufferable     = MPU_ACCESS_NOT_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);

Embedded Wizard Website | Privacy Policy | Imprint

...