Interfacing TFT to STM32F756 using SRAM

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Interfacing TFT to STM32F756 using SRAM

    Need your urgent help for interfacing TFT to STM32F756 using SRAM.

    We are currently using STM32756 Evaluation board having TFT on it. The example provided for the TFT uses onboard SDRAM. We wanted to use SRAM instead of SDRAM.
    So we modified the example and initialised SRAM using BSP_SRAM_Init() ,
    Also the address for frame buffer was redefined using "#define LCD_LAYER0_FRAME_BUFFER ((uint32_t)0x68000000)"


    We were not able to see the output properly, the images on the screen are printed multiple times and with lot of flickering on screen.


    The SRAM provided on the Eval board is 1M x 16 and the example provided works with SDRAM 8M x 32.
    Then we tested SRAM read write function, it was working fine.


    Is it because of 32bit or 16bit alignment issue.


    What could be the reason.
    pls reply asap.


    Regards,
    Rohit M
  • Hi,

    Are you referring to the onchip SRAM?
    This should work, although it is a bit small.

    Do your return from GUI_Init()?
    Can you manually write into the SRAM?
    Are the values persistent?

    emWin needs to be able to access the RAM 8, 16 and 32 bit wise. If this is not the case it won't work.
    In a debug build (if the libraries you are using are build as a debug version) emWin performs a RAM check. If it fails it will stuck there.

    Regards,
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Schoenen,

    Thanks you for giving your time.

    GUI_Init() is working fine. I am referring to External SRAM, i have performed memtest with SRAM which is also working fine. I think the problem could be with size of frame_buffer allocated into that memory.
    SRAM Memory Size : 1M x 16b -->2MB
    Display resolution is : 648*480.
    Memory Allocated to frame buffer is : 640*480*4*2 >2MB

    Size of Frame buffer is more than the memory that can be allocated on to the SRAM.

    Please correct me if any thing is wrong. Also please confirm my calculation for the size of frame_buffer.

    Best Regards,
    Rohit Mishra


  • Hi,

    Yes of course, the RAM has to be big enough to hold the frame buffer.

    With a resolution 640 x 480 p and 32 bit you need at least 1,228,800 Bytes. Double this if using two buffers for multibuffering.

    You might want to reduce the color depths to 16bpp which would require only the half of memory.

    I suggest to reduce the color depth and keep multibuffering. But if your application has a lot of static elements you can also use only one buffer but use the higher color depths.

    Regards,
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.