cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_DSI_Read in High Speed mode

mak1308
Associate III
Posted on November 21, 2017 at 13:12

I try to read data, using the HAL_DSI_Read function - in the Low Power mode I read data successfully, but when switching in the High Speed mode it is impossible to read data. Result of reading - an error on a timeout.

Tell me please in what there can be a problem.

3 REPLIES 3
Amel NASRI
ST Employee
Posted on November 21, 2017 at 14:54

Hi

G.Marat

‌,

Is this a continuity of

https://community.st.com/0D50X00009XkebtSAB

?

Could you please provide more details regarding your case: used product (

STM32F469?), when exactly it is working as expected? when it doesn't work exactly? are there any error flags set in the various status registers? may you share minimum code that helps to reproduce the issue?

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on November 21, 2017 at 15:41

Yes, it is STM32F469 chip. I read 4 bytes from the register as follows:

int read_sreg(uint16_t reg, uint8_t* data)

{

uint8_t sbuf[10];

memset(sbuf,0,10);

sbuf[0] = (reg >> 😎 & 0xFF;

sbuf[1] = reg & 0xFF;

return HAL_DSI_Read(&hdsi_eval, LCD_CHANEL_ID, data, 4, DSI_GEN_SHORT_PKT_READ_P2 , 0, sbuf);

}

The LCD_Init function is similar to function from examples in CubeMX.

In the LP mode data from the register are read, after switching in the HS mode I receive a timeout error.

I do switching in the HS mode as follows:

LPCmd.LPGenShortWriteNoP = DSI_LP_GSW0P_DISABLE;

LPCmd.LPGenShortWriteOneP = DSI_LP_GSW1P_DISABLE;

LPCmd.LPGenShortWriteTwoP = DSI_LP_GSW2P_DISABLE;

LPCmd.LPGenShortReadNoP = DSI_LP_GSR0P_DISABLE;

LPCmd.LPGenShortReadOneP = DSI_LP_GSR1P_DISABLE;

LPCmd.LPGenShortReadTwoP = DSI_LP_GSR2P_DISABLE;

LPCmd.LPGenLongWrite = DSI_LP_GLW_DISABLE;

LPCmd.LPDcsShortWriteNoP = DSI_LP_DSW0P_DISABLE;

LPCmd.LPDcsShortWriteOneP = DSI_LP_DSW1P_DISABLE;

LPCmd.LPDcsShortReadNoP = DSI_LP_DSR0P_DISABLE;

LPCmd.LPDcsLongWrite = DSI_LP_DLW_DISABLE;

HAL_DSI_ConfigCommand(&hdsi_eval, &LPCmd);

HAL_DSI_ConfigFlowControl(&hdsi_eval, DSI_FLOW_CONTROL_BTA);
Posted on November 21, 2017 at 17:57

Try to add a call for 'HAL_DSI_Stop' before switching to HS mode.  This is what we do in the example provided in

http://www.st.com/content/ccc/resource/technical/document/application_note/group0/1d/b8/33/4f/dc/0a/45/52/DM00287601/files/DM00287601.pdf/jcr:content/translations/en.DM00287601.pdf

 (see the section about 'STM32CubeMX configuration example, paragraph 6.3.4).

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.