S5D9 GUIX 800 x 480 LCD using bss 1 frame buffer with CLUT8 not working SSP 2.4.0

Hi all,

I have a project built with GUIX on synergy S5D9, TFT LCD 800 x 480, I have set the project to use 2D/AVE and jpeg hardware, in the guix I have set the same requirements and choose the 8bpp color.

if I configure everything with 16bpp one 1 frame and resolution of 480 x 272 for testing the PCB ect, all works perfect, accept that the display is oly using 480 272 pixels of the display which I expected and confirms the display is working and the pcb, I then try and configure everything GUIX project and e2studio project to use the 800 x 480 and 8bpp by setting CLUT8, when the code runs the following line in my thread entry file

gx_studio_display_configure ( MAIN_DISPLAY, g_sf_el_gx.p_api->setup, LANGUAGE_ENGLISH, MAIN_DISPLAY_THEME_1, &p_window_root );

I then get the - BSP_CFG_HANDLE_UNRECOVERABLE_ERROR(0);

if I then debug the steps when the code reaches - 

in the sf_el_gx.c file then the it goes the BSP_CFG_HANDLE_UNRECOVERABLE_ERROR(0);

in stepping over or into this function, is there anyone that can tell me what I am missing on SSP 2.4.0 as I have made my settings identical to project examples found on this forum for SSP 1.3.3 but with no avail, I really need to get this working.

Regards,

Ronald Hare

Parents
  • Hi dear user, 
    I'm suspicious about the RAM corruption, as you pointed you have no problem with 480*272 16bpp. that canvas will occupy about 261Kbytes of RAM, as the 800*480 8bpp will occupy 336Kbytes of RAM. 

    I recommend you check the canvas memory allocation scheme of your project follow its behavior and make sure you're not facing any issues during memory allocation. 

    e.g. if the system is dynamically allocating the canvas, it might overload the memory pool and get back errors during memory allocation.

    even you can test the 800*480 1bpp configuration to make sure that's about the memory or not. 

    I hope you find this information useful. don't hesitate to ask for clarification if needed 

    If this or any other user's response answers your concern, kindly verify the answer. Thank you!

    Renesas Engineering Community Moderator
    https://community.renesas.com/
    https://academy.renesas.com/
    en-support.renesas.com/.../

      

  • Hi Hossein,

    I have tried to change the resolution from 800 * 480 to 480 * 272, as that would also prove its a canvas memory allocation issue, unless I am miss understanding you, and I get the exact same response and error at the exact place in the code.

    Have you maybe got another idea, I will try and follow the memory allocation and revert later.

    Regards,

    Ronald Hare

  • Dear Ronald Hare, 
    Yes, my hypothesis is a memory issue, check out the RAM sections and see if canvas memory is statically allocated or dynamically. Keep me posted. 

    Kind regards. 

    If this or any other user's response answers your concern, kindly verify the answer. Thank you!

    Renesas Engineering Community Moderator
    https://community.renesas.com/
    https://academy.renesas.com/
    en-support.renesas.com/.../

  • Hi Hossein, it seems when its trying to assign the clut in the sf_el_gx_display_8bit_palette_assign function in the sf_el_gx.c file it fails as the handler it is assigning is 0 

    void   sf_el_gx_display_8bit_palette_assign(ULONG display_handle)
    {
        sf_el_gx_instance_ctrl_t *p_ctrl = (sf_el_gx_instance_ctrl_t *)(display_handle);
        display_clut_cfg_t       clut_cfg;
    
        clut_cfg.p_base = (uint32_t *)p_ctrl->p_display->gx_display_palette;
        clut_cfg.start  = (uint16_t)0;
        clut_cfg.size   = (uint16_t)p_ctrl->p_display->gx_display_palette_size;
    
        p_ctrl->p_display_instance->p_api->clut(p_ctrl->p_display_instance->p_ctrl, &clut_cfg,
        		                                            p_ctrl->inherit_frame_layer);
    
    }  /* End of function sf_el_gx_display_8bit_palette_assign() */

    since the handler at this point is 0 when it gets here the pointer is not valid and therefore the clut config is incorrect.

    now in the project config and documents where you select clut8 it says  - If selecting CLUT formats, you must write CLUT data using clut before performing start.

    I cannot figure out or find any documentation on how or what function to call to achieve this, in the api files I have found this function

        /** Set CLUT for display device.
         * @par Implemented as
         * - R_GLCD_ClutUpdate()
         * @param[in]   p_ctrl     Pointer to display interface control block.
         * @param[in]   p_clut_cfg Pointer to CLUT configuration structure.
         * @param[in]   frame      Number of frame buffer corresponding to the CLUT.
         */
        ssp_err_t (* clut)(display_ctrl_t const * const     p_ctrl,
                           display_clut_cfg_t const * const p_clut_cfg,
                           display_frame_layer_t            frame);

    this in the r_display_api.h file, now since I am using the xfile guix and not the glcd hal driver I don't know how to access this function to be able to set the clut as per the guides and I cannot find it in any example, the examples I can find all don't have anything like that and they also are for SSP1.3.3 which is extremly old and I cannot open or import those projects, I no longer have the e2studio that can open those and cannot find it to download to install to open them, I have opened the config files in xml vs studio and have check the settings and thge entry files and they dont have anything like that, so I am assuming there is a error in what is being passed to the function mentioned above and as a result this failure is happening

    hope this explains what I have found so far.

    PS the canvas memory is configured and seems fine, since this error is happening long before it is even starting guix, its in the following function that I call in the gui_thread_entry file that the error is happening

    gx_studio_display_configure ( MAIN_DISPLAY, g_sf_el_gx.p_api->setup, LANGUAGE_ENGLISH, MAIN_DISPLAY_THEME_1, &p_window_root );

    Regards,

    Ronald Hare

  • Hi Hossein,

    So what I have managed to trace and figure out is that the horizontal stride setting is causing it to crash, now that I have changed everything back to 800 x 480 CLUT8, I can get it to work as long as I set the Horizontal stride to a multiple of 64, even though the SSP config says set it in pixels, I am using a DT050TFT-PTS TFT panel, I cannot find what the horizontal stride is in there documention, what I can say is the system does not crash if I set stride to 832 instead of 800 then it works but the picture is scew or reppeating, now all this said, if I set it to 768 then it starts crashing again, I susupect 1024 would work well but the SSP config wont let me enter a number larger than 1016 which is not a multiple of 64

    Regards,

    Ronald Hare

  • Hi Ronald, sorry for the late, I am happy to hear you've found a workaround. 
    I think you were following this post, as a user got the same error as you get. 

    If you've used those examples as your reference that would be problematic. 

    Follow this sample code and user guide, as it uses SSP 2.4 and supports S5D9, you might not have a problem loading it. 

    Also, you can find all other documents here if you didn't yet. As GUIX and SSP use many abstract topics, spending time reading those manuals can keep you away from those bugs.

    Best regards, Hossein. 

    If this or any other user's response answers your concern, kindly verify the answer. Thank you!

    Renesas Engineering Community Moderator
    https://community.renesas.com/
    https://academy.renesas.com/
    en-support.renesas.com/.../


  • Hi Hossein,

    Thanks for the reply, yes I have read all the documents and I have followed the different examples, I want to state that this was not my first GUIX project, it is however my first time trying CLUT 8, I want to note that in the thread Karol explains the stride, however at the very bottom of the thread phil72 mentioned in the GUIX project the x resolution must match the stride and this is what I was missing.

    Regards,

    Ronald Hare

Reply
  • Hi Hossein,

    Thanks for the reply, yes I have read all the documents and I have followed the different examples, I want to state that this was not my first GUIX project, it is however my first time trying CLUT 8, I want to note that in the thread Karol explains the stride, however at the very bottom of the thread phil72 mentioned in the GUIX project the x resolution must match the stride and this is what I was missing.

    Regards,

    Ronald Hare

Children
No Data