cancel
Showing results for 
Search instead for 
Did you mean: 

touchgfx with spi lcd

KERDO.1
Associate II

I arange the all settings acroding to information on

https://touchgfx.zendesk.com/hc/en-us/articles/203642951-MCUs-without-TFT-controller

and when I try to debug my software on my custom board it says "can not execute Mi commands load ..."

when I comment the line "Bitmap::registerBitmapDatabase(BitmapDatabase::getInstance(), BitmapDatabase::getInstanceSize());" in TouchgfxConfiguration.cpp I can debug the system but touchgfx doesnt work. could you please help me about this issue?

thanks

5 REPLIES 5
scottSD
Senior III

You're not providing which processor, Discovery Kit, etc, so I pretty much have to guess what's going on.....

When I have run into the "can not execute MI commands load", I did not have the QUADSPI flash setup. And if it's not setup, then ALL of the images are stored in the internal FLASH, which, by the sounds of it, is the case because you don't get the message when you aren't registering the bitmap data base---doing that means you're not placing them in flash at all. When you placing them into internal FLASH, it's not fitting in there, and you get the debug issue.

That being said, ST should REALLY work on improving the messages to let people know that's what's going on.....

KERDO.1
Associate II

sorry for the lack of information. MCU is stm32h743iit6, board designed buy us.

below is qspi linker settings

/* Memories definition */

MEMORY

{

 DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K

 ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K

 RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K

 RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K

 RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K

 FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K

 QSPI (rx)    : ORIGIN = 0x90000000, LENGTH = 16384K

}

.

.

.

.

 .ARM.attributes 0 : { *(.ARM.attributes) }

 ExtFlashSection : { *(ExtFlashSection ) } >QSPI 

and in the main.c

/* MPU Configuration--------------------------------------------------------*/

 MPU_Config();

 /* Enable I-Cache---------------------------------------------------------*/

 SCB_EnableICache();

 /* Enable D-Cache---------------------------------------------------------*/

 SCB_EnableDCache();

 /* MCU Configuration--------------------------------------------------------*/

 /* Reset of all peripherals, Initializes the Flash interface and the Systick. */

 HAL_Init();

 /* USER CODE BEGIN Init */

 /* USER CODE END Init */

 /* Configure the system clock */

 SystemClock_Config();

 /* USER CODE BEGIN SysInit */

 /* USER CODE END SysInit */

 /* Initialize all configured peripherals */

 MX_GPIO_Init();

 MX_DMA_Init();

 MX_DCMI_Init();

 MX_DMA2D_Init();

 MX_FMC_Init();

 MX_I2C1_Init();

 MX_I2C2_Init();

 MX_I2C3_Init();

 MX_I2C4_Init();

 MX_LTDC_Init();

 MX_QUADSPI_Init();

 MX_SPI4_Init();

 MX_SPI5_Init();

 MX_TIM16_Init();

 MX_USART1_UART_Init();

 MX_DAC1_Init();

 MX_TIM5_Init();

 MX_TIM8_Init();

 MX_USART2_UART_Init();

 MX_CRC_Init();

 /* USER CODE BEGIN 2 */

BSP_QSPI_Init();

BSP_QSPI_EnableMemoryMappedMode();

//TestQspi();

 MX_TouchGFX_Init();

 MX_TIM13_Init();

 HAL_TIM_Base_Start_IT(&htim13);

 /* USER CODE END 2 */

.

.

.

.

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)

{

 /* USER CODE BEGIN Callback 0 */

 /* USER CODE END Callback 0 */

 if (htim->Instance == TIM7) {

  HAL_IncTick();

 }

 /* USER CODE BEGIN Callback 1 */

else if (htim->Instance == TIM13)

{

KsmVsync();

}

 /* USER CODE END Callback 1 */

}

in TouchgfxHAL.cpp

extern "C" void LCD_SetWindows(uint16_t Xstart, uint16_t Ystart,uint16_t Xend,uint16_t Yend);

.

.

.

.

.

extern "C"

{

void KsmVsync(void)

{

OSWrappers::signalVSync();

}

}

.

.

.

.

void TouchGFXHAL::flushFrameBuffer(const touchgfx::Rect& rect)

{

  // Calling parent implementation of flushFrameBuffer(const touchgfx::Rect& rect).

  //

  // To overwrite the generated implementation, omit call to parent function

  // and implemented needed functionality here.

  // Please note, HAL::flushFrameBuffer(const touchgfx::Rect& rect) must

  // be called to notify the touchgfx framework that flush has been performed.

  TouchGFXGeneratedHAL::flushFrameBuffer(rect);

  // If the framebuffer is placed in Write Through cached memory (e.g. SRAM) then we need

  // to flush the Dcache to make sure framebuffer is correct in RAM. That's done

  // using SCB_CleanInvalidateDCache().

  // SCB_CleanInvalidateDCache();

  /** ksm codes **/

  LCD_TransferFrameBuffer(rect);

}

and in freertos.c

/* USER CODE END Header_StartDefaultTask */

void StartDefaultTask(void const * argument)

{

 /* init code for USB_DEVICE */

 MX_USB_DEVICE_Init();

 /* USER CODE BEGIN StartDefaultTask */

 /* Infinite loop */

 MX_TouchGFX_Process();

 for(;;)

 {

  osDelay(1);

 }

 /* USER CODE END StartDefaultTask */

}

I also tested qspi, write data and read, also enabled memorymapped mode.

thanks

regards

scottSD
Senior III

Does the QUADSPI show up on your Build Analzyer?

Also, another time I saw the debug "MI" issue, I was actually out of hard drive space on my computer. I cleared up some space and it worked.

this is the build details0690X00000DBl7XQAT.png

KERDO.1
Associate II

I used internal memory for pictures and code works, but now gui task doesnt call flushFrameBuffer();