2024-12-10 1:55 AM
I tried the bsp example among the examples of the stm32 h7s78-dk board. I integrated it into my own code. My aim is to use the LCD screen and broadcast the camera output on it. In the first stage, I try to print any text on the screen. The BSP example code works but cannot be debugged. I also get an error about pll3 when trying to initialize lc in my own code. I have shared the reasons for the error step by step in the pictures while debugging.
Solved! Go to Solution.
2024-12-10 11:39 PM
here is to solution, if you want to run examples first you have to configure debug and startup settings. if you use stm32h7s78-dk or similar card you should keep in mind that it is a card with an external loader. First, add external loader in debug settings, after that, If you do not have a boot project, add the BOOT_XIP.hex file to the startup under the binary folder in the Templates folder and move the following line, i.e. move down also uncheck load symbols
2024-12-10 2:19 AM - edited 2024-12-10 2:22 AM
Please see the Posting Tips for how to properly post source code - not as images:
@hamzatamer wrote:The BSP example code works but cannot be debugged.
What do you mean by that?
2024-12-10 4:54 AM
some stm32h7s78-dk's examples are not working, for example BSP,LTDC_Display_2Layers,LTDC_ColorKeying. Error is in common.
if ((RCC->PLLCKSELR & RCC_PLLCKSELR_PLLSRC) != pllsrc)
{
/* There is another PLL activated with another source */
return HAL_ERROR;
}
this area returns HAL_ERROR i dont know why it is example code. I don't change anything. I open the code from the examples section and debug it. and it gets stuck at the HSI section. I get this error on samples that include LCD screens
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.PLL1.PLLState = RCC_PLL_NONE;
RCC_OscInitStruct.PLL2.PLLState = RCC_PLL_NONE;
RCC_OscInitStruct.PLL3.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL3.PLLSource = RCC_PLLSOURCE_HSI;
RCC_OscInitStruct.PLL3.PLLM = 4;
RCC_OscInitStruct.PLL3.PLLN = 25;
RCC_OscInitStruct.PLL3.PLLP = 2;
RCC_OscInitStruct.PLL3.PLLQ = 20;
RCC_OscInitStruct.PLL3.PLLR = 16;
RCC_OscInitStruct.PLL3.PLLS = 2;
RCC_OscInitStruct.PLL3.PLLT = 2;
RCC_OscInitStruct.PLL3.PLLFractional = 0;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
/* Initialization error */
while(1);
}
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_LTDC;
PeriphClkInit.LtdcClockSelection = RCC_LTDCCLKSOURCE_PLL3R;
2024-12-10 11:39 PM
here is to solution, if you want to run examples first you have to configure debug and startup settings. if you use stm32h7s78-dk or similar card you should keep in mind that it is a card with an external loader. First, add external loader in debug settings, after that, If you do not have a boot project, add the BOOT_XIP.hex file to the startup under the binary folder in the Templates folder and move the following line, i.e. move down also uncheck load symbols
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.