AnsweredAssumed Answered

Report a Bug

Question asked by chen.lion on Apr 3, 2014
Latest reply on May 8, 2014 by Montassar BEN ROMDHANE
Hardwa: STM32F429Discovery
Software: STemWin, STemWin_Library_V1.0.0 and STemWin_Library_V1.0.1

When using the functiong of Multiple Buffering of STemWin, I found that words was drawn in back buffer, but the filled rectangle was drawn in front buffer.

Because there is a bug in the file of 'GUIDRV_stm32f429i_discovery.c'. _aBufferIndex[i] shouldn't be assigned in LTDC_ISR_Handler but int the custom defined routine for copying buffers. Like this...

static void _LCD_CopyBuffer(int LayerIndex, int IndexSrc, int IndexDst) {
    U32 BufferSize, AddrSrc, AddrDst;

    BufferSize = _GetBufferSize(LayerIndex);
    AddrSrc    = _aAddr[LayerIndex] + BufferSize * IndexSrc;
    AddrDst    = _aAddr[LayerIndex] + BufferSize * IndexDst;
#if (NUM_BUFFERS==2)
    _aBufferIndex[LayerIndex] = IndexDst;
#endif
    _DMA_Copy(LayerIndex, (void *)AddrSrc, (void *)AddrDst, _axSize[LayerIndex], _aySize[LayerIndex], 0);
}

Or it will give a wrong address when drawing rectangles.

Outcomes