2022-09-16 05:06 AM
2022-09-16 06:16 AM
Hello @LDuin.1 and welcome to the Community :)
Please have a look at this AN5020 Application note Digital camera interface (DCMI) for STM32 MCUs
I hope this resource is helpful for you.
Imen
2022-09-16 06:37 AM
Hello and thank you @Imen DAHMEN.
Unfortunately this is not quite what I am looking for.
The STM32H750B-DK has an LCD display connected to the LTDC via the LCD interface according to chapter 6.15 of the user manual. I was wondering how to set up this display in STM32CubeMX (mostly I'm looking for the Synchronization for Width/Height parameters) so I can draw things on it from code.
Hopefully this is a bit clearer than the question I asked before :)
Lennard
2022-09-16 07:10 AM
STM32Cube_FW_H7_V1.9.1\Drivers\BSP\STM32H750B-DK\stm32h750b_discovery_lcd.c
STM32Cube_FW_H7_V1.9.1\Drivers\BSP\Components\rk043fn48h\rk043fn48h.h
RK043FN48H
Should be in the BOM, and the BSP files. I think the screen details/docs have been posted to the forum previously
/**
* @brief RK043FN48H Size
*/
#define RK043FN48H_WIDTH ((uint16_t)480) /* LCD PIXEL WIDTH */
#define RK043FN48H_HEIGHT ((uint16_t)272) /* LCD PIXEL HEIGHT */
/**
* @brief RK043FN48H Timing
*/
#define RK043FN48H_HSYNC ((uint16_t)41) /* Horizontal synchronization */
#define RK043FN48H_HBP ((uint16_t)13) /* Horizontal back porch */
#define RK043FN48H_HFP ((uint16_t)32) /* Horizontal front porch */
#define RK043FN48H_VSYNC ((uint16_t)10) /* Vertical synchronization */
#define RK043FN48H_VBP ((uint16_t)2) /* Vertical back porch */
#define RK043FN48H_VFP ((uint16_t)2) /* Vertical front porch */
/**
* @brief RK043FN48H frequency divider
*/
#define RK043FN48H_FREQUENCY_DIVIDER 5 /* LCD Frequency divider */
...
/**
* @brief Initializes the LTDC.
* @param hltdc LTDC handle
* @param Width LTDC width
* @param Height LTDC height
* @retval HAL status
*/
__weak HAL_StatusTypeDef MX_LTDC_Init(LTDC_HandleTypeDef *hltdc, uint32_t Width, uint32_t Height)
{
hltdc->Instance = LTDC;
hltdc->Init.HSPolarity = LTDC_HSPOLARITY_AL;
hltdc->Init.VSPolarity = LTDC_VSPOLARITY_AL;
hltdc->Init.DEPolarity = LTDC_DEPOLARITY_AL;
hltdc->Init.PCPolarity = LTDC_PCPOLARITY_IPC;
hltdc->Init.HorizontalSync = RK043FN48H_HSYNC - 1U;
hltdc->Init.AccumulatedHBP = (RK043FN48H_HSYNC + (RK043FN48H_HBP - 11U) - 1U);
hltdc->Init.AccumulatedActiveW = RK043FN48H_HSYNC + Width + RK043FN48H_HBP - 1U;
hltdc->Init.TotalWidth = RK043FN48H_HSYNC + Width + (RK043FN48H_HBP - 11U) + RK043FN48H_HFP - 1U;
hltdc->Init.VerticalSync = RK043FN48H_VSYNC - 1U;
hltdc->Init.AccumulatedVBP = RK043FN48H_VSYNC + RK043FN48H_VBP - 1U;
hltdc->Init.AccumulatedActiveH = RK043FN48H_VSYNC + Height + RK043FN48H_VBP - 1U;
hltdc->Init.TotalHeigh = RK043FN48H_VSYNC + Height + RK043FN48H_VBP + RK043FN48H_VFP - 1U;
hltdc->Init.Backcolor.Blue = 0xFF;
hltdc->Init.Backcolor.Green = 0xFF;
hltdc->Init.Backcolor.Red = 0xFF;
return HAL_LTDC_Init(hltdc);
}
2022-09-16 07:13 AM
https://community.st.com/s/question/0D50X00009XkduYSAR/stm32f746gdisco-display-datasheet
https://mikrocontroller.bplaced.net/wordpress/wp-content/uploads/2018/01/RK043FN48H-CT672B-V1.0.pdf