cancel
Showing results for 
Search instead for 
Did you mean: 

Display is black

gfx_engineer
Associate II

Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code.

Hello,

I am using the STM32H735G-DK board, and I am trying to send data via the USB COM port (USB FS (CN14) to display it in TextFields on the TouchGFX screen.

However, after flashing the program, the display went black.
In the stack trace, I see the following issues, but I cannot figure out what is causing them.

Can anyone please help me?

 

main.c

/* USER CODE BEGIN OCTOSPI1_Init 2 */

HAL_OSPI_DeInit(&hospi1);

ospi_nor_int.InterfaceMode = BSP_OSPI_NOR_OPI_MODE;

ospi_nor_int.TransferRate = BSP_OSPI_NOR_DTR_TRANSFER;

BSP_OSPI_NOR_DeInit(0);

if(BSP_OSPI_NOR_Init(0, &ospi_nor_int) != BSP_ERROR_NONE) // -> green highlighted

{

Error_Handler();

}

if(BSP_OSPI_NOR_EnableMemoryMappedMode(0) != BSP_ERROR_NONE)

{

Error_Handler();

}

/* USER CODE END OCTOSPI1_Init 2 */

 stm32h735g_.c:

/* OSPI memory reset */

else if (OSPI_NOR_ResetMemory(Instance) != BSP_ERROR_NONE) // -> green highlighted

{

ret = BSP_ERROR_COMPONENT_FAILURE;

}

----

stm32h735g.c: 

/* After SWreset CMD, wait in case SWReset occurred during erase operation */

HAL_Delay(MX25LM51245G_RESET_MAX_TIME); //-> green highlighted

}

 

stm32h7xx_hal.c:

__weak void HAL_Delay(uint32_t Delay)

{

uint32_t tickstart = HAL_GetTick();

uint32_t wait = Delay;



/* Add a freq to guarantee minimum wait */

if (wait < HAL_MAX_DELAY)

{

wait += (uint32_t)(uwTickFreq);

}



while ((HAL_GetTick() - tickstart) < wait) // -> green highlighted

{

}

}

 

5 REPLIES 5
gfx_engineer
Associate II

Further I connected the USB cabel to STLK (CN15) for flashing and debugging and connnected a secound cabel to USB Full Speed (CN14), COM Port for communication

gfx_engineer
Associate II

So at the first time of the flash, the Display popped up, showed the Screen. But after configuring the USB as Device in STM32 Cube MX configuring the USB Clock to 48 MHz, and then afterwards flashing it to the board, the display went completely black

mathiasmarkussen
ST Employee

Are you running FreeRTOS?

If you are, and your timebase source under "SYS" in STM32CubeMX is a timer, the interrupt for that timer needs to have a higher priority (lower number) than LIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY, which defaults to 5, and can be configured under FreeRTOS in CubeMX. Otherwise, FreeRTOS blocks the interrupt, and your STM32 HAL timebase will not receive ticks.

I would recommend you just set the timer interrupt priority to 4, I do not know what effects changing the FreeRTOS configuration parameter would have.

mathiasmarkussen_1-1762431261633.png

 

 

gfx_engineer
Associate II

Yes I am using SYS- > TIM6. and FreeRTOS is also running with an interface of CMSIS_V2.

I set LIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY to 4 as you said. But it still shows me the same mistakes in the callstack. 

 

Do you have maybe another solution ?

I wrote that I would not change that setting, but change the interrupt priority instead, as per the screenshot :)