cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_DSI_Init() stuck on error

Ricko
Senior III

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) which seems too low. To what frequency (in the clock diagram page) do I set the two DSI clocks (DSI TXCLKESC and DSI lane byte clock)? How is that calculated?

 

Attached is the .IOC file with the current DSI settings if it helps.

 

Thank you :)

Rick

Ricko_1-1741496086965.png

Ricko_2-1741496396470.png

 

Ricko_0-1741496058160.png

 

 

 

0 REPLIES 0