cancel
Showing results for 
Search instead for 
Did you mean: 

STM32469I-EVAL DSI read

lthiery
Associate II
Posted on November 11, 2016 at 21:25

Hello,

I am trying to test the DSI HAL but am having trouble making the read function work on the LCD screen included in the kit.

Here is my attempt to execute a get_address_mode request.

HAL_StatusTypeDef status = HAL_DSI_Read(&hdsi_eval, (uint32_t) 0, read, 1, DSI_DCS_SHORT_PKT_READ, 0x0BU, 0x0U);

  if(status==HAL_OK){

 printf(''Read 0x0B: 0x%x\r\n'', read[0]);

  }

  else if(status == HAL_TIMEOUT){

 printf(''HAL Timeout\r\n'');

  }

  else{

 printf(''HAL Error\r\n'');

  }

According to the DSI spec, I can do this command at any point, whether the device is sleeping or not. I've made sure to do it before the default code puts the LCD in write to GRAM mode and always get a timeout.

Has anyone gotten the DSI read code to work?

#stm32469i-eval #dsi
5 REPLIES 5
slimen
Senior
Posted on November 14, 2016 at 14:51

Hello,

You can refer to the working LCD_DSI example within STM32CubeF4 firmware package and get inspired from the application and needed functions : STM32Cube_FW_F4_V1.13.0\Projects\STM32469I_EVAL\Examples\LCD_DSI

Hope this helps you.

Regards

lthiery
Associate II
Posted on November 14, 2016 at 20:02

Hi

I did do this but no example code appears to demonstrates a read.

Best,

Louis

lthiery
Associate II
Posted on November 14, 2016 at 20:13

Just to be clear, I searched the entire STM32Cube_FW_F4_V1.13.0 directory and the only occurrence of HAL_DSI_Read is in stm32f4xx_hal_dsi.c and stm32f4xx_hal_dsi.h

S.K.Matters
Associate II

I know the question is already 6 months old.

But in case still someone looks for a hint: The bit BTAE in DSI_PCR has to be set before using HAL_DSI_Read.

This can be achieved for example by calling the following function:

HAL_DSI_ConfigFlowControl(&hdsi, DSI_FLOW_CONTROL_BTA);

At least for me it was all that was needed to read back 2 bytes via DSI_DCS_SHORT_PKT_READ commands...

Thank you so much for sharing. Two evenings I have been trying to solve it with no luck. It does not seem to be well documented.