2025-11-05 5:58 AM - last edited on 2025-11-05 6:24 AM by mƎALLEm
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
{
}
}