Страницы

Страницы

понедельник, 24 апреля 2017 г.

STM32F746NG Discovery RAM STemWin problem (add external SDRAM)

// Define the available number of bytes available for the GUI
//
#define GUI_NUMBYTES  (1024) *  150

U32 aMemory[GUI_NUMBYTES / 4];

/*********************************************************************
*
*       Public code
*
**********************************************************************
*/
/*********************************************************************
*
*       GUI_X_Config
*
* Purpose:
*   Called during the initialization process in order to set up the
*   available memory for the GUI.
*/
void GUI_X_Config(void) 
{
  //
  // Assign memory to STemWin
  //
  GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);
}



// Define the available number of bytes available for the GUI
//
#define GUI_NUMBYTES  (1024) *  2048
#define GUI_BLOCKSIZE 0x80
//U32 aMemory[GUI_NUMBYTES / 4] __attribute__ ((section(".GUI_RAM")));

/*********************************************************************
*
*       Public code
*
**********************************************************************
*/
/*********************************************************************
*
*       GUI_X_Config
*
* Purpose:
*   Called during the initialization process in order to set up the
*   available memory for the GUI.
*/
void GUI_X_Config(void)
{
  //
  // Assign memory to STemWin
  //
static U32 *aMemory;
aMemory=(U32*)0xc0000000;//as GUI's RAM buffer
GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);
GUI_ALLOC_SetAvBlockSize(GUI_BLOCKSIZE);

}





































or add comment to main module
//  CPU_CACHE_Enable();




1 комментарий:

  1. The solution is to disable the data cache in the STM32F7 (thint from the Segger Forum). So adding SCB_DisableDCache(); directly after CPU_CACHE_Enable(); in main() will help!

    ОтветитьУдалить