2016-11-11 12:25 PM
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 #dsi2016-11-14 05:51 AM
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_DSIHope this helps you.Regards2016-11-14 11:02 AM
Hi
I did do this but no example code appears to demonstrates a read.Best,Louis2016-11-14 11:13 AM
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
2019-01-25 06:21 AM
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...
2020-05-01 02:40 AM
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.