2025-03-08 9:02 PM
Hi,
the application gets stuck on the Error_Handler() in the piece of code below in main.c
hdsi.Instance = DSI;
hdsi.Init.AutomaticClockLaneControl = DSI_AUTO_CLK_LANE_CTRL_DISABLE;
hdsi.Init.TXEscapeCkdiv = 4;
hdsi.Init.NumberOfLanes = DSI_TWO_DATA_LANES;
hdsi.Init.PHYFrequencyRange = DSI_DPHY_FRANGE_80MHZ_100MHZ;
hdsi.Init.PHYLowPowerOffset = PHY_LP_OFFSSET_0_CLKP;
PLLInit.PLLNDIV = 32;
PLLInit.PLLIDF = DSI_PLL_IN_DIV1;
PLLInit.PLLODF = DSI_PLL_OUT_DIV2;
PLLInit.PLLVCORange = DSI_DPHY_VCO_FRANGE_500MHZ_800MHZ;
PLLInit.PLLChargePump = DSI_PLL_CHARGE_PUMP_2000HZ_4400HZ;
PLLInit.PLLTuning = DSI_PLL_LOOP_FILTER_2000HZ_4400HZ;
if (HAL_DSI_Init(&hdsi, &PLLInit) != HAL_OK)
{
Error_Handler();
}
I just noticed that DSI lane clock is set to 32MHz - screenshot below - from the HSE (8MHz crystal). Obviously that is too low.
1. is that the reason for the error?
2. to what frequency (in the clock diagram page) do I set the two DSI clocks (DSI TXCLKESC and DSI lane byte clock)? Where in CubeMX do I get that value from?
2. there is no return value for the function xx so in debug mode there I cannot check the return value by hovering the mouse pointer over it. How can I see the return value of that function so I can see what the error code is?
Attached is the .IOC file with the current DSI settings if it helps.
Thank you :)
Rick