AnsweredAssumed Answered

10FPS using the FSMC

Question asked by tolba.ahmed on Jun 18, 2014
Latest reply on Jun 24, 2014 by Edje

I have a C Function which tries to copy a framebuffer to FSMC RAM, which is connected to LCD.  The functions eats the frame rate of the game loop to 10FPS.  It seems copying from the SDRAM to FSMC is terribly slow, but why ?

void LCD_Flip()
{
    u16 i,limit = fbHeight+fbWidth;
    // We will use a precalculated limit and one single loop
 
    LCD_SetCursor(0x00, 0x0000);
    LCD_WriteRegister(0x0050,0x00);//GRAM horizontal start position
    LCD_WriteRegister(0x0051,239);//GRAM horizontal end position
    LCD_WriteRegister(0x0052,0);//Vertical GRAM Start position
    LCD_WriteRegister(0x0053,319);//Vertical GRAM end position
    LCD_WriteIndex(0x0022);
 
    // Single loop from 0:limit-1 takes care of having to do an
    // x,y conversion each iteration.
    for(i=0;i<limit;j++)
    {
        u16 color = frameBuffer[i];
        LCD_WriteData(color);
    }
}

Outcomes