2017-11-21 04:12 AM
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.
2017-11-21 05:54 AM
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.
2017-11-21 07:41 AM
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 >> 8) & 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);2017-11-21 09:57 AM
Try to add a call for 'HAL_DSI_Stop' before switching to HS mode. This is what we do in the example provided in
(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.