diff --git a/Core/Src/adc.c b/Core/Src/adc.c index 5cfef4c..ba7e1d0 100644 --- a/Core/Src/adc.c +++ b/Core/Src/adc.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file @@ -204,6 +204,16 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef* adcHandle) if(HAL_RCC_ADC12_CLK_ENABLED==1){ __HAL_RCC_ADC12_CLK_ENABLE(); } + + __HAL_RCC_GPIOA_CLK_ENABLE(); + /**ADC2 GPIO Configuration + PA3 ------> ADC2_IN8 + */ + GPIO_InitStruct.Pin = GPIO_PIN_3; + GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + /* USER CODE BEGIN ADC2_MspInit 1 */ /* USER CODE END ADC2_MspInit 1 */ @@ -244,6 +254,12 @@ void HAL_ADC_MspDeInit(ADC_HandleTypeDef* adcHandle) if(HAL_RCC_ADC12_CLK_ENABLED==0){ __HAL_RCC_ADC12_CLK_DISABLE(); } + + /**ADC2 GPIO Configuration + PA3 ------> ADC2_IN8 + */ + HAL_GPIO_DeInit(GPIOA, GPIO_PIN_3); + /* USER CODE BEGIN ADC2_MspDeInit 1 */ /* USER CODE END ADC2_MspDeInit 1 */ diff --git a/Core/Src/app_freertos.c b/Core/Src/app_freertos.c index 518cf11..2019f24 100644 --- a/Core/Src/app_freertos.c +++ b/Core/Src/app_freertos.c @@ -48,7 +48,7 @@ osThreadId_t lvglTimerHandle; const osThreadAttr_t lvglTimer_attributes = { .name = "lvglTimer", .priority = (osPriority_t) osPriorityNormal, - .stack_size = 4* 1024 + .stack_size = 16* 1024 }; /* USER CODE END Variables */ /* Definitions for defaultTask */ @@ -56,7 +56,7 @@ osThreadId_t defaultTaskHandle; const osThreadAttr_t defaultTask_attributes = { .name = "defaultTask", .priority = (osPriority_t) osPriorityNormal, - .stack_size = 128 * 4 + .stack_size = 128 * 4 * 32 }; /* Private function prototypes -----------------------------------------------*/ diff --git a/Core/Src/cordic.c b/Core/Src/cordic.c index d2bb7cc..423b7ad 100644 --- a/Core/Src/cordic.c +++ b/Core/Src/cordic.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/crc.c b/Core/Src/crc.c index 223f6f3..0a89076 100644 --- a/Core/Src/crc.c +++ b/Core/Src/crc.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/dac.c b/Core/Src/dac.c index 3a248dc..8acc1d6 100644 --- a/Core/Src/dac.c +++ b/Core/Src/dac.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/dcache.c b/Core/Src/dcache.c index ab32bde..217b847 100644 --- a/Core/Src/dcache.c +++ b/Core/Src/dcache.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/dma2d.c b/Core/Src/dma2d.c index 1fec9f0..01a15c0 100644 --- a/Core/Src/dma2d.c +++ b/Core/Src/dma2d.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file @@ -19,6 +19,7 @@ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "dma2d.h" +#include "lvgl/lvgl.h" /* USER CODE BEGIN 0 */ @@ -39,12 +40,20 @@ void MX_DMA2D_Init(void) /* USER CODE END DMA2D_Init 1 */ hdma2d.Instance = DMA2D; hdma2d.Init.Mode = DMA2D_M2M; - hdma2d.Init.ColorMode = DMA2D_OUTPUT_RGB565; + hdma2d.Init.ColorMode = DMA2D_OUTPUT_RGB565; /* LCD is RGB565 */ hdma2d.Init.OutputOffset = 0; hdma2d.Init.BytesSwap = DMA2D_BYTES_REGULAR; hdma2d.Init.LineOffsetMode = DMA2D_LOM_PIXELS; hdma2d.LayerCfg[1].InputOffset = 0; +#if LV_COLOR_DEPTH == 32 + hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_ARGB8888; +#elif LV_COLOR_DEPTH == 24 + hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_RGB888; +#elif LV_COLOR_DEPTH == 16 hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_RGB565; +#elif LV_COLOR_DEPTH == 8 + hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_L8; +#endif hdma2d.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA; hdma2d.LayerCfg[1].InputAlpha = 0; hdma2d.LayerCfg[1].AlphaInverted = DMA2D_REGULAR_ALPHA; @@ -57,6 +66,26 @@ void MX_DMA2D_Init(void) { Error_Handler(); } + +#if LV_COLOR_DEPTH == 8 + uint8_t clut[256 * 3]; /* assuming the stack is large enough */ + for(uint32_t i = 0; i < 256; i++) { + clut[i * 3] = i; + clut[i * 3 + 1] = i; + clut[i * 3 + 2] = i; + } + DMA2D_CLUTCfgTypeDef clut_cfg = {.pCLUT=(uint32_t *)clut, + .CLUTColorMode=DMA2D_CCM_RGB888, + .Size=0xff}; + if (HAL_DMA2D_CLUTStartLoad(&hdma2d, &clut_cfg, 1) != HAL_OK) + { + Error_Handler(); + } + if (HAL_DMA2D_PollForTransfer(&hdma2d, HAL_MAX_DELAY) != HAL_OK) + { + Error_Handler(); + } +#endif /* USER CODE BEGIN DMA2D_Init 2 */ /* USER CODE END DMA2D_Init 2 */ @@ -73,8 +102,10 @@ void HAL_DMA2D_MspInit(DMA2D_HandleTypeDef* dma2dHandle) /* USER CODE END DMA2D_MspInit 0 */ /* DMA2D clock enable */ __HAL_RCC_DMA2D_CLK_ENABLE(); + __HAL_RCC_DMA2D_FORCE_RESET(); + __HAL_RCC_DMA2D_RELEASE_RESET(); - /* DMA2D interrupt Init */ + /* Enable DMA2D global Interrupt */ HAL_NVIC_SetPriority(DMA2D_IRQn, 5, 0); HAL_NVIC_EnableIRQ(DMA2D_IRQn); /* USER CODE BEGIN DMA2D_MspInit 1 */ diff --git a/Core/Src/fdcan.c b/Core/Src/fdcan.c index 81edf42..485a16e 100644 --- a/Core/Src/fdcan.c +++ b/Core/Src/fdcan.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/gpio.c b/Core/Src/gpio.c index 6e5b768..3b328f4 100644 --- a/Core/Src/gpio.c +++ b/Core/Src/gpio.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file @@ -42,6 +42,8 @@ PC15-OSC32_OUT (PC15) ------> RCC_OSC32_OUT PA13 (JTMS/SWDIO) ------> DEBUG_JTMS-SWDIO PA10 ------> USB_OTG_HS_ID + PB3 (JTDO/TRACESWO) ------> DEBUG_JTDO-SWO + PA9 ------> USB_OTG_HS_VBUS PH0-OSC_IN (PH0) ------> RCC_OSC_IN */ void MX_GPIO_Init(void) @@ -67,12 +69,21 @@ void MX_GPIO_Init(void) /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(CTP_RST_GPIO_Port, CTP_RST_Pin, GPIO_PIN_RESET); + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(GPIOI, GPIO_PIN_6, GPIO_PIN_RESET); + /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(GPIOG, USB_PWR_EN_Pin|R_CS_Pin, GPIO_PIN_RESET); /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(R_RST_GPIO_Port, R_RST_Pin, GPIO_PIN_RESET); + /*Configure GPIO pin : PA15 */ + GPIO_InitStruct.Pin = GPIO_PIN_15; + GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + /*Configure GPIO pin : PA8 */ GPIO_InitStruct.Pin = GPIO_PIN_8; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; @@ -81,6 +92,12 @@ void MX_GPIO_Init(void) GPIO_InitStruct.Alternate = GPIO_AF0_MCO; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + /*Configure GPIO pin : PH3 */ + GPIO_InitStruct.Pin = GPIO_PIN_3; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOH, &GPIO_InitStruct); + /*Configure GPIO pin : PtPin */ GPIO_InitStruct.Pin = LCD_DISP_RESET_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; @@ -102,6 +119,19 @@ void MX_GPIO_Init(void) GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(CTP_RST_GPIO_Port, &GPIO_InitStruct); + /*Configure GPIO pins : PJPin PJPin */ +// GPIO_InitStruct.Pin = USR_BTN_1_Pin|USB_OVERCURRENT_Pin; +// GPIO_InitStruct.Mode = GPIO_MODE_INPUT; +// GPIO_InitStruct.Pull = GPIO_NOPULL; +// HAL_GPIO_Init(GPIOJ, &GPIO_InitStruct); + + /*Configure GPIO pin : PI6 */ + GPIO_InitStruct.Pin = GPIO_PIN_6; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(GPIOI, &GPIO_InitStruct); + /*Configure GPIO pin : PA10 */ GPIO_InitStruct.Pin = GPIO_PIN_10; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; @@ -116,6 +146,12 @@ void MX_GPIO_Init(void) GPIO_InitStruct.Pull = GPIO_PULLUP; HAL_GPIO_Init(CTP_INT_GPIO_Port, &GPIO_InitStruct); + /*Configure GPIO pin : PA9 */ + GPIO_InitStruct.Pin = GPIO_PIN_9; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + /*Configure GPIO pins : PGPin PGPin */ GPIO_InitStruct.Pin = USB_PWR_EN_Pin|R_CS_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; @@ -123,12 +159,6 @@ void MX_GPIO_Init(void) GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(GPIOG, &GPIO_InitStruct); - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = USB_OVERCURRENT_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(USB_OVERCURRENT_GPIO_Port, &GPIO_InitStruct); - /*Configure GPIO pin : PtPin */ GPIO_InitStruct.Pin = R_RST_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; @@ -136,16 +166,18 @@ void MX_GPIO_Init(void) GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(R_RST_GPIO_Port, &GPIO_InitStruct); + /*Configure GPIO pin : PH11 */ + GPIO_InitStruct.Pin = GPIO_PIN_11; + GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOH, &GPIO_InitStruct); + /*Configure GPIO pin : PtPin */ GPIO_InitStruct.Pin = R_INT_Pin; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(R_INT_GPIO_Port, &GPIO_InitStruct); - /* EXTI interrupt init*/ - HAL_NVIC_SetPriority(EXTI6_IRQn, 5, 0); - HAL_NVIC_EnableIRQ(EXTI6_IRQn); - } /* USER CODE BEGIN 2 */ diff --git a/Core/Src/gpu2d.c b/Core/Src/gpu2d.c index 6ff30c4..f6ea519 100644 --- a/Core/Src/gpu2d.c +++ b/Core/Src/gpu2d.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/hash.c b/Core/Src/hash.c index 3bf4f47..6c03e0a 100644 --- a/Core/Src/hash.c +++ b/Core/Src/hash.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/i2c.c b/Core/Src/i2c.c index ce0a5d2..e7a440d 100644 --- a/Core/Src/i2c.c +++ b/Core/Src/i2c.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file @@ -246,23 +246,16 @@ void HAL_I2C_MspInit(I2C_HandleTypeDef* i2cHandle) __HAL_RCC_GPIOB_CLK_ENABLE(); /**I2C4 GPIO Configuration + PB7 ------> I2C4_SDA PB6 ------> I2C4_SCL - PB11 ------> I2C4_SDA */ - GPIO_InitStruct.Pin = GPIO_PIN_6; + GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_6; GPIO_InitStruct.Mode = GPIO_MODE_AF_OD; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF5_I2C4; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); - GPIO_InitStruct.Pin = GPIO_PIN_11; - GPIO_InitStruct.Mode = GPIO_MODE_AF_OD; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF3_I2C4; - HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); - /* I2C4 clock enable */ __HAL_RCC_I2C4_CLK_ENABLE(); /* USER CODE BEGIN I2C4_MspInit 1 */ @@ -323,12 +316,12 @@ void HAL_I2C_MspDeInit(I2C_HandleTypeDef* i2cHandle) __HAL_RCC_I2C4_CLK_DISABLE(); /**I2C4 GPIO Configuration + PB7 ------> I2C4_SDA PB6 ------> I2C4_SCL - PB11 ------> I2C4_SDA */ - HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6); + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_7); - HAL_GPIO_DeInit(GPIOB, GPIO_PIN_11); + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6); /* USER CODE BEGIN I2C4_MspDeInit 1 */ diff --git a/Core/Src/icache.c b/Core/Src/icache.c index 48a43bf..6df32e2 100644 --- a/Core/Src/icache.c +++ b/Core/Src/icache.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/lptim.c b/Core/Src/lptim.c index f0bb969..19575c7 100644 --- a/Core/Src/lptim.c +++ b/Core/Src/lptim.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/ltdc.c b/Core/Src/ltdc.c index d82b790..5cdbaf6 100644 --- a/Core/Src/ltdc.c +++ b/Core/Src/ltdc.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file @@ -19,6 +19,7 @@ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "ltdc.h" +#include "lvgl_port_display.h" /* USER CODE BEGIN 0 */ @@ -118,15 +119,16 @@ void HAL_LTDC_MspInit(LTDC_HandleTypeDef* ltdcHandle) __HAL_RCC_GPIOE_CLK_ENABLE(); __HAL_RCC_GPIOD_CLK_ENABLE(); + __HAL_RCC_GPIOC_CLK_ENABLE(); __HAL_RCC_GPIOG_CLK_ENABLE(); __HAL_RCC_GPIOF_CLK_ENABLE(); /**LTDC GPIO Configuration PE0 ------> LTDC_HSYNC PD3 ------> LTDC_CLK PD1 ------> LTDC_B5 + PC6 ------> LTDC_R0 PD0 ------> LTDC_B4 PG6 ------> LTDC_R1 - PE2 ------> LTDC_R0 PD15 ------> LTDC_B3 PD11 ------> LTDC_R6 PF13 ------> LTDC_B1 @@ -150,9 +152,9 @@ void HAL_LTDC_MspInit(LTDC_HandleTypeDef* ltdcHandle) PF14 ------> LTDC_G0 PE14 ------> LTDC_G7 */ - GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_8|GPIO_PIN_13 - |GPIO_PIN_7|GPIO_PIN_15|GPIO_PIN_12|GPIO_PIN_9 - |GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_14; + GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_8|GPIO_PIN_13|GPIO_PIN_7 + |GPIO_PIN_15|GPIO_PIN_12|GPIO_PIN_9|GPIO_PIN_10 + |GPIO_PIN_11|GPIO_PIN_14; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; @@ -168,6 +170,13 @@ void HAL_LTDC_MspInit(LTDC_HandleTypeDef* ltdcHandle) GPIO_InitStruct.Alternate = GPIO_AF8_LTDC; HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); + GPIO_InitStruct.Pin = GPIO_PIN_6; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF7_LTDC; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + GPIO_InitStruct.Pin = GPIO_PIN_6; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; @@ -207,9 +216,9 @@ void HAL_LTDC_MspDeInit(LTDC_HandleTypeDef* ltdcHandle) PE0 ------> LTDC_HSYNC PD3 ------> LTDC_CLK PD1 ------> LTDC_B5 + PC6 ------> LTDC_R0 PD0 ------> LTDC_B4 PG6 ------> LTDC_R1 - PE2 ------> LTDC_R0 PD15 ------> LTDC_B3 PD11 ------> LTDC_R6 PF13 ------> LTDC_B1 @@ -233,14 +242,16 @@ void HAL_LTDC_MspDeInit(LTDC_HandleTypeDef* ltdcHandle) PF14 ------> LTDC_G0 PE14 ------> LTDC_G7 */ - HAL_GPIO_DeInit(GPIOE, GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_8|GPIO_PIN_13 - |GPIO_PIN_7|GPIO_PIN_15|GPIO_PIN_12|GPIO_PIN_9 - |GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_14); + HAL_GPIO_DeInit(GPIOE, GPIO_PIN_0|GPIO_PIN_8|GPIO_PIN_13|GPIO_PIN_7 + |GPIO_PIN_15|GPIO_PIN_12|GPIO_PIN_9|GPIO_PIN_10 + |GPIO_PIN_11|GPIO_PIN_14); HAL_GPIO_DeInit(GPIOD, GPIO_PIN_3|GPIO_PIN_1|GPIO_PIN_0|GPIO_PIN_15 |GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_8|GPIO_PIN_13 |GPIO_PIN_14|GPIO_PIN_10|GPIO_PIN_9); + HAL_GPIO_DeInit(GPIOC, GPIO_PIN_6); + HAL_GPIO_DeInit(GPIOG, GPIO_PIN_6); HAL_GPIO_DeInit(GPIOF, GPIO_PIN_13|GPIO_PIN_12|GPIO_PIN_11|GPIO_PIN_15 diff --git a/Core/Src/lvgl_port_display.c b/Core/Src/lvgl_port_display.c index 4fbb282..0f2e4cc 100644 --- a/Core/Src/lvgl_port_display.c +++ b/Core/Src/lvgl_port_display.c @@ -13,12 +13,17 @@ static void disp_flush (lv_display_t *, const lv_area_t *, uint8_t *); static void disp_flush_complete (DMA2D_HandleTypeDef*); +static void disp_flush_error (DMA2D_HandleTypeDef *hdma2d); /********************** * STATIC VARIABLES **********************/ static lv_display_t * disp; +#if LV_COLOR_DEPTH == 8 +static __attribute__((aligned(32))) uint8_t buf_1[MY_DISP_HOR_RES * MY_DISP_VER_RES]; +#else static __attribute__((aligned(32))) uint8_t buf_1[MY_DISP_HOR_RES * MY_DISP_VER_RES * 2]; +#endif /********************** * GLOBAL FUNCTIONS @@ -34,7 +39,7 @@ void lvgl_display_init (void) /* interrupt callback for DMA2D transfer */ hdma2d.XferCpltCallback = disp_flush_complete; - + hdma2d.XferErrorCallback = disp_flush_error; } /********************** @@ -46,11 +51,24 @@ disp_flush (lv_display_t * display, const lv_area_t * area, uint8_t * px_map) { + lv_coord_t width = lv_area_get_width(area); lv_coord_t height = lv_area_get_height(area); - DMA2D->CR = 0x0U << DMA2D_CR_MODE_Pos; + DMA2D->CR = 0x1U << DMA2D_CR_MODE_Pos; /* memory-to-memory with PFC */ +#if LV_COLOR_DEPTH == 8 + DMA2D->FGPFCCR = DMA2D_INPUT_L8 + | (0xff << DMA2D_FGPFCCR_CS_Pos) /* CLUT size 256 (0xff + 1) */ + | (1 << DMA2D_FGPFCCR_CCM_Pos); /* CLUT color mode RGB (not ARGB) */ +#elif LV_COLOR_DEPTH == 16 DMA2D->FGPFCCR = DMA2D_INPUT_RGB565; +#elif LV_COLOR_DEPTH == 24 + DMA2D->FGPFCCR = DMA2D_INPUT_RGB888; +#elif LV_COLOR_DEPTH == 32 + DMA2D->FGPFCCR = DMA2D_INPUT_ARGB8888; +#else +#warning dma2d flushing with LV_COLOR_DEPTH other than 16, 24, or 32 is not supported +#endif DMA2D->FGMAR = (uint32_t)px_map; DMA2D->FGOR = 0; DMA2D->OPFCCR = DMA2D_OUTPUT_RGB565; @@ -68,3 +86,11 @@ disp_flush_complete (DMA2D_HandleTypeDef *hdma2d) { lv_display_flush_ready(disp); } + + +static void +disp_flush_error (DMA2D_HandleTypeDef *hdma2d) +{ + while(1); +} + diff --git a/Core/Src/lvgl_port_touch.c b/Core/Src/lvgl_port_touch.c index 4c04522..de41970 100644 --- a/Core/Src/lvgl_port_touch.c +++ b/Core/Src/lvgl_port_touch.c @@ -5,6 +5,17 @@ #include "lvgl_port_touch.h" #include "main.h" #include "i2c.h" +#include "cmsis_os2.h" + +/********************* + * DEFINES + *********************/ + +#if LV_USE_OS == LV_OS_NONE + #define DELAY_API(ms) HAL_Delay(ms) +#else + #define DELAY_API(ms) osDelay(ms) +#endif /********************** * STATIC VARIABLES @@ -32,11 +43,11 @@ lvgl_touchscreen_init (void) /* 'i2c1' bus and touchscreen reset pin are already configure by CubeMX, * here we just need to reset touchscreen controller */ HAL_GPIO_WritePin(CTP_RST_GPIO_Port, CTP_RST_Pin, GPIO_PIN_SET); - HAL_Delay(10); + DELAY_API(10); HAL_GPIO_WritePin(CTP_RST_GPIO_Port, CTP_RST_Pin, GPIO_PIN_RESET); - HAL_Delay(10); + DELAY_API(10); HAL_GPIO_WritePin(CTP_RST_GPIO_Port, CTP_RST_Pin, GPIO_PIN_SET); - HAL_Delay(10); + DELAY_API(10); /* basic LVGL driver initialization */ lv_indev_t * indev = lv_indev_create(); diff --git a/Core/Src/main.c b/Core/Src/main.c index 9de2cab..8b3ddf6 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -1,20 +1,20 @@ /* USER CODE BEGIN Header */ /** - ****************************************************************************** - * @file : main.c - * @brief : Main program body - ****************************************************************************** - * @attention - * - * Copyright (c) 2023 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ + ****************************************************************************** + * @file : main.c + * @brief : Main program body + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" @@ -79,243 +79,254 @@ void SystemClock_Config(void); void PeriphCommonClock_Config(void); static void SystemPower_Config(void); void MX_FREERTOS_Init(void); +static void MX_NVIC_Init(void); /* USER CODE BEGIN PFP */ /* USER CODE END PFP */ - +#include "lvgl/src/draw/nema_gfx/lv_draw_nema_gfx.h" /* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */ /* USER CODE END 0 */ /** - * @brief The application entry point. - * @retval int - */ + * @brief The application entry point. + * @retval int + */ int main(void) { - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - -/* Configure the peripherals common clocks */ - PeriphCommonClock_Config(); - - /* Configure the System Power */ - SystemPower_Config(); - /* GTZC initialisation */ - MX_GTZC_Init(); - - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - MX_ADC1_Init(); - MX_ADF1_Init(); - MX_CRC_Init(); - MX_DCACHE1_Init(); - MX_DCACHE2_Init(); - MX_DMA2D_Init(); - MX_FDCAN1_Init(); - MX_GPU2D_Init(); - MX_HASH_Init(); - MX_I2C1_Init(); - MX_I2C2_Init(); - MX_ICACHE_Init(); - MX_LTDC_Init(); - MX_OCTOSPI1_Init(); - MX_RNG_Init(); - MX_RTC_Init(); - MX_USB_OTG_HS_USB_Init(); - MX_ADC2_Init(); - MX_CORDIC_Init(); - MX_DAC1_Init(); - MX_I2C4_Init(); - MX_LPTIM2_Init(); - MX_SPI1_Init(); - MX_SPI2_Init(); - MX_TIM1_Init(); - MX_TIM3_Init(); - MX_TIM5_Init(); - MX_TIM6_Init(); - MX_TIM8_Init(); - MX_TIM15_Init(); - MX_USART1_UART_Init(); - MX_USART2_UART_Init(); - MX_USART3_UART_Init(); - MX_USART6_UART_Init(); - MX_MEMORYMAP_Init(); - MX_FLASH_Init(); - /* USER CODE BEGIN 2 */ - - /* reset display */ - HAL_GPIO_WritePin(LCD_DISP_RESET_GPIO_Port, LCD_DISP_RESET_Pin, GPIO_PIN_SET); - - /* initialize LVGL framework */ - lv_init(); - lv_tick_set_cb(HAL_GetTick); - - /* initialize display and touchscreen */ - lvgl_display_init(); - lvgl_touchscreen_init(); - - /* lvgl demo */ - lv_demo_widgets(); - //lv_demo_music(); - //lv_demo_benchmark(); - - /* USER CODE END 2 */ - - /* Init scheduler */ - osKernelInitialize(); /* Call init function for freertos objects (in freertos.c) */ - MX_FREERTOS_Init(); - - /* Start scheduler */ - osKernelStart(); - - /* We should never get here as control is now taken by the scheduler */ - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - } - /* USER CODE END 3 */ + /* USER CODE BEGIN 1 */ + + /* USER CODE END 1 */ + + /* MCU Configuration--------------------------------------------------------*/ + + /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ + HAL_Init(); + + /* USER CODE BEGIN Init */ + + /* USER CODE END Init */ + + /* Configure the system clock */ + SystemClock_Config(); + + /* Configure the peripherals common clocks */ + PeriphCommonClock_Config(); + + /* Configure the System Power */ + SystemPower_Config(); + + /* USER CODE BEGIN SysInit */ + + /* USER CODE END SysInit */ + + /* Initialize all configured peripherals */ + MX_GPIO_Init(); + MX_ADC1_Init(); + MX_ADC2_Init(); + MX_CORDIC_Init(); + MX_CRC_Init(); + MX_DAC1_Init(); + MX_DCACHE1_Init(); + // MX_DCACHE2_Init(); + MX_DMA2D_Init(); + MX_FDCAN1_Init(); + MX_GPU2D_Init(); + MX_HASH_Init(); + MX_I2C1_Init(); + MX_I2C2_Init(); + MX_I2C4_Init(); + MX_ICACHE_Init(); + MX_LPTIM2_Init(); + MX_LTDC_Init(); + MX_OCTOSPI1_Init(); + MX_RNG_Init(); + MX_RTC_Init(); + MX_SPI1_Init(); + MX_SPI2_Init(); + MX_TIM3_Init(); + MX_TIM5_Init(); + MX_TIM6_Init(); + MX_TIM8_Init(); + MX_TIM15_Init(); + MX_USART1_UART_Init(); + MX_USART3_UART_Init(); + MX_USART6_UART_Init(); + MX_USB_OTG_HS_USB_Init(); +// MX_FLASH_Init(); /*If enabled Nema (NeoChrome) can't read the images and fonts from flash*/ + + /* Initialize interrupts */ + MX_NVIC_Init(); + /* USER CODE BEGIN 2 */ + if (HAL_TIM_PWM_Start(&htim15, TIM_CHANNEL_1) != HAL_OK) + { + /* PWM Generation Error */ + Error_Handler(); + } + + /* reset display */ + HAL_GPIO_WritePin(LCD_DISP_RESET_GPIO_Port, LCD_DISP_RESET_Pin, GPIO_PIN_SET); + + /* initialize LVGL framework */ + lv_init(); +// while(1); + lv_tick_set_cb(HAL_GetTick); + + /* initialize display and touchscreen */ + lvgl_display_init(); + lvgl_touchscreen_init(); + + /* lvgl demo */ + // lv_demo_widgets(); + //lv_demo_music(); + lv_demo_benchmark(); + + /* USER CODE END 2 */ + + /* Init scheduler */ + osKernelInitialize(); /* Call init function for freertos objects (in freertos.c) */ + MX_FREERTOS_Init(); + + /* Start scheduler */ + osKernelStart(); + + /* We should never get here as control is now taken by the scheduler */ + /* Infinite loop */ + /* USER CODE BEGIN WHILE */ + while (1) + { + /* USER CODE END WHILE */ + + /* USER CODE BEGIN 3 */ + } + /* USER CODE END 3 */ } /** - * @brief System Clock Configuration - * @retval None - */ + * @brief System Clock Configuration + * @retval None + */ void SystemClock_Config(void) { - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - - /** Configure the main internal regulator output voltage - */ - if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK) - { - Error_Handler(); - } - - /** Configure LSE Drive Capability - */ - HAL_PWR_EnableBkUpAccess(); - __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW); - - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_HSI - |RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_HSE - |RCC_OSCILLATORTYPE_LSE; - RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; - RCC_OscInitStruct.LSEState = RCC_LSE_ON; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - RCC_OscInitStruct.LSIState = RCC_LSI_ON; - RCC_OscInitStruct.LSIDiv = RCC_LSI_DIV1; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; - RCC_OscInitStruct.PLL.PLLMBOOST = RCC_PLLMBOOST_DIV1; - RCC_OscInitStruct.PLL.PLLM = 4; - RCC_OscInitStruct.PLL.PLLN = 80; - RCC_OscInitStruct.PLL.PLLP = 8; - RCC_OscInitStruct.PLL.PLLQ = 2; - RCC_OscInitStruct.PLL.PLLR = 2; - RCC_OscInitStruct.PLL.PLLRGE = RCC_PLLVCIRANGE_0; - RCC_OscInitStruct.PLL.PLLFRACN = 0; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - Error_Handler(); - } - - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK - |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2 - |RCC_CLOCKTYPE_PCLK3; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; - RCC_ClkInitStruct.APB3CLKDivider = RCC_HCLK_DIV1; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK) - { - Error_Handler(); - } - - /** MCO configuration - */ - HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_SYSCLK, RCC_MCODIV_1); - - /** Enables the Clock Security System - */ - HAL_RCCEx_EnableLSECSS(); + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + + /** Configure the main internal regulator output voltage + */ + if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK) + { + Error_Handler(); + } + + /** Configure LSE Drive Capability + */ + HAL_PWR_EnableBkUpAccess(); + __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW); + + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_HSI + |RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_HSE + |RCC_OSCILLATORTYPE_LSE; + RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; + RCC_OscInitStruct.LSEState = RCC_LSE_ON; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; + RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; + RCC_OscInitStruct.LSIState = RCC_LSI_ON; + RCC_OscInitStruct.LSIDiv = RCC_LSI_DIV1; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLMBOOST = RCC_PLLMBOOST_DIV1; + RCC_OscInitStruct.PLL.PLLM = 4; + RCC_OscInitStruct.PLL.PLLN = 80; + RCC_OscInitStruct.PLL.PLLP = 8; + RCC_OscInitStruct.PLL.PLLQ = 2; + RCC_OscInitStruct.PLL.PLLR = 2; + RCC_OscInitStruct.PLL.PLLRGE = RCC_PLLVCIRANGE_0; + RCC_OscInitStruct.PLL.PLLFRACN = 0; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + Error_Handler(); + } + + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2 + |RCC_CLOCKTYPE_PCLK3; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + RCC_ClkInitStruct.APB3CLKDivider = RCC_HCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK) + { + Error_Handler(); + } + + /** MCO configuration + */ + HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_SYSCLK, RCC_MCODIV_1); } /** - * @brief Peripherals Common Clock Configuration - * @retval None - */ + * @brief Peripherals Common Clock Configuration + * @retval None + */ void PeriphCommonClock_Config(void) { } /** - * @brief Power Configuration - * @retval None - */ + * @brief Power Configuration + * @retval None + */ static void SystemPower_Config(void) { - HAL_PWREx_EnableVddIO2(); - - PWR_PVDTypeDef sConfigPVD = {0}; - - /* - * PVD Configuration - */ - sConfigPVD.PVDLevel = PWR_PVDLEVEL_0; - sConfigPVD.Mode = PWR_PVD_MODE_NORMAL; - HAL_PWR_ConfigPVD(&sConfigPVD); - - /* - * Enable the PVD Output - */ - HAL_PWR_EnablePVD(); - - /* - * Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral - */ - HAL_PWREx_DisableUCPDDeadBattery(); - - /* - * Switch to SMPS regulator instead of LDO - */ - if (HAL_PWREx_ConfigSupply(PWR_SMPS_SUPPLY) != HAL_OK) - { - Error_Handler(); - } -/* USER CODE BEGIN PWR */ -/* USER CODE END PWR */ + HAL_PWREx_EnableVddIO2(); + + PWR_PVDTypeDef sConfigPVD = {0}; + + /* + * PVD Configuration + */ + sConfigPVD.PVDLevel = PWR_PVDLEVEL_0; + sConfigPVD.Mode = PWR_PVD_MODE_NORMAL; + HAL_PWR_ConfigPVD(&sConfigPVD); + + /* + * Enable the PVD Output + */ + HAL_PWR_EnablePVD(); + + /* + * Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral + */ + HAL_PWREx_DisableUCPDDeadBattery(); + + /* + * Switch to SMPS regulator instead of LDO + */ + if (HAL_PWREx_ConfigSupply(PWR_SMPS_SUPPLY) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN PWR */ + /* USER CODE END PWR */ +} + +/** + * @brief NVIC Configuration. + * @retval None + */ +static void MX_NVIC_Init(void) +{ + /* EXTI6_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(EXTI6_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(EXTI6_IRQn); } /* USER CODE BEGIN 4 */ @@ -323,54 +334,54 @@ static void SystemPower_Config(void) /* USER CODE END 4 */ /** - * @brief Period elapsed callback in non blocking mode - * @note This function is called when TIM2 interrupt took place, inside - * HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment - * a global variable "uwTick" used as application time base. - * @param htim : TIM handle - * @retval None - */ + * @brief Period elapsed callback in non blocking mode + * @note This function is called when TIM2 interrupt took place, inside + * HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment + * a global variable "uwTick" used as application time base. + * @param htim : TIM handle + * @retval None + */ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { - /* USER CODE BEGIN Callback 0 */ + /* USER CODE BEGIN Callback 0 */ - /* USER CODE END Callback 0 */ - if (htim->Instance == TIM2) { - HAL_IncTick(); - } - /* USER CODE BEGIN Callback 1 */ + /* USER CODE END Callback 0 */ + if (htim->Instance == TIM2) { + HAL_IncTick(); + } + /* USER CODE BEGIN Callback 1 */ - /* USER CODE END Callback 1 */ + /* USER CODE END Callback 1 */ } /** - * @brief This function is executed in case of error occurrence. - * @retval None - */ + * @brief This function is executed in case of error occurrence. + * @retval None + */ void Error_Handler(void) { - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - __disable_irq(); - while (1) - { - } - /* USER CODE END Error_Handler_Debug */ + /* USER CODE BEGIN Error_Handler_Debug */ + /* User can add his own implementation to report the HAL error return state */ + __disable_irq(); + while (1) + { + } + /* USER CODE END Error_Handler_Debug */ } #ifdef USE_FULL_ASSERT /** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ + * @brief Reports the name of the source file and the source line number + * where the assert_param error has occurred. + * @param file: pointer to the source file name + * @param line: assert_param error line source number + * @retval None + */ void assert_failed(uint8_t *file, uint32_t line) { - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, + /* USER CODE BEGIN 6 */ + /* User can add his own implementation to report the file name and line number, ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ + /* USER CODE END 6 */ } #endif /* USE_FULL_ASSERT */ diff --git a/Core/Src/memorymap.c b/Core/Src/memorymap.c index 62a8434..df8aaf9 100644 --- a/Core/Src/memorymap.c +++ b/Core/Src/memorymap.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file @@ -24,23 +24,6 @@ /* USER CODE END 0 */ -/* MEMORYMAP init function */ -void MX_MEMORYMAP_Init(void) -{ - - /* USER CODE BEGIN MEMORYMAP_Init 0 */ - - /* USER CODE END MEMORYMAP_Init 0 */ - - /* USER CODE BEGIN MEMORYMAP_Init 1 */ - - /* USER CODE END MEMORYMAP_Init 1 */ - /* USER CODE BEGIN MEMORYMAP_Init 2 */ - - /* USER CODE END MEMORYMAP_Init 2 */ - -} - /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ diff --git a/Core/Src/octospi.c b/Core/Src/octospi.c index e1fcaaa..26cd5ef 100644 --- a/Core/Src/octospi.c +++ b/Core/Src/octospi.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file @@ -23,10 +23,12 @@ /* USER CODE BEGIN 0 */ #include "mx25lm51245g.h" -static uint8_t ospi_memory_reset (OSPI_HandleTypeDef *hospi); -static int32_t OSPI_NOR_EnterSOPIMode (OSPI_HandleTypeDef *hospi); -int32_t OSPI_DLYB_Enable (OSPI_HandleTypeDef *hospi); -int32_t OSPI_NOR_EnableMemoryMappedMode (OSPI_HandleTypeDef *hospi); + +static uint8_t ospi_memory_reset (OSPI_HandleTypeDef *hospi); +static int32_t OSPI_NOR_EnterSOPIMode (OSPI_HandleTypeDef *hospi); +int32_t OSPI_DLYB_Enable (OSPI_HandleTypeDef *hospi); +int32_t OSPI_NOR_EnableMemoryMappedMode(OSPI_HandleTypeDef *hospi); + /* USER CODE END 0 */ OSPI_HandleTypeDef hospi1; @@ -36,13 +38,14 @@ void MX_OCTOSPI1_Init(void) { /* USER CODE BEGIN OCTOSPI1_Init 0 */ - MX25LM51245G_Info_t pInfo; + MX25LM51245G_Info_t pInfo; /* USER CODE END OCTOSPI1_Init 0 */ OSPIM_CfgTypeDef sOspiManagerCfg = {0}; HAL_OSPI_DLYB_CfgTypeDef HAL_OSPI_DLYB_Cfg_Struct = {0}; /* USER CODE BEGIN OCTOSPI1_Init 1 */ + /* Get Flash informations of one memory */ (void)MX25LM51245G_GetFlashInfo(&pInfo); /* USER CODE END OCTOSPI1_Init 1 */ hospi1.Instance = OCTOSPI1; @@ -81,20 +84,28 @@ void MX_OCTOSPI1_Init(void) Error_Handler(); } /* USER CODE BEGIN OCTOSPI1_Init 2 */ - /* OSPI memory reset */ if (ospi_memory_reset(&hospi1) != 0) - Error_Handler(); + { + Error_Handler(); + } if (MX25LM51245G_AutoPollingMemReady(&hospi1,MX25LM51245G_SPI_MODE, MX25LM51245G_STR_TRANSFER) != MX25LM51245G_OK) - Error_Handler(); + { + Error_Handler(); + } /* Enable octal mode */ if (OSPI_NOR_EnterSOPIMode(&hospi1) != 0) - Error_Handler(); + { + Error_Handler(); + } + if (OSPI_NOR_EnableMemoryMappedMode(&hospi1) != 0) - Error_Handler(); + { + Error_Handler(); + } /* USER CODE END OCTOSPI1_Init 2 */ } @@ -226,37 +237,36 @@ int32_t OSPI_DLYB_Enable(OSPI_HandleTypeDef *hospi) int32_t ret = 0; uint32_t div_value = 4; - /* delay block configuration */ + /* Delay block configuration ------------------------------------------------ */ if (HAL_OSPI_DLYB_GetClockPeriod(hospi, &dlyb_cfg) != HAL_OK) { ret = 1; } - /* PhaseSel is divided by 4 (emperic value) */ + /* PhaseSel is divided by 4 (emperic value)*/ dlyb_cfg.PhaseSel /= div_value; - /* save the present configuration for check */ + /* save the present configuration for check*/ dlyb_cfg_test = dlyb_cfg; - /* set delay block configuration */ + /*set delay block configuration*/ if (HAL_OSPI_DLYB_SetConfig(hospi, &dlyb_cfg) != HAL_OK) { ret = 1; } - /* check the set value */ + /*check the set value*/ if (HAL_OSPI_DLYB_GetConfig(hospi, &dlyb_cfg) != HAL_OK) { ret = 1; } - if ((dlyb_cfg.PhaseSel != dlyb_cfg_test.PhaseSel) || \ - (dlyb_cfg.Units != dlyb_cfg_test.Units)) + if ((dlyb_cfg.PhaseSel != dlyb_cfg_test.PhaseSel) || (dlyb_cfg.Units != dlyb_cfg_test.Units)) { ret = 1; } - /* return BSP status */ + /* Return BSP status */ return ret; } @@ -267,27 +277,48 @@ int32_t OSPI_DLYB_Enable(OSPI_HandleTypeDef *hospi) */ static uint8_t ospi_memory_reset(OSPI_HandleTypeDef *hospi) { - int32_t ret = 0; + int32_t ret = 0; + + /* Enable write operations */ + if(MX25LM51245G_ResetEnable(hospi, MX25LM51245G_SPI_MODE, MX25LM51245G_STR_TRANSFER) != MX25LM51245G_OK) + { + ret = 1; + } + else if(MX25LM51245G_ResetMemory(hospi, MX25LM51245G_SPI_MODE, MX25LM51245G_STR_TRANSFER) != MX25LM51245G_OK) + { + ret = 1; + } + else if(MX25LM51245G_ResetEnable(hospi, MX25LM51245G_OPI_MODE, MX25LM51245G_STR_TRANSFER) != MX25LM51245G_OK) + { + ret = 1; + } + else if(MX25LM51245G_ResetMemory(hospi, MX25LM51245G_OPI_MODE, MX25LM51245G_STR_TRANSFER) != MX25LM51245G_OK) + { + ret = 1; + } + else if(MX25LM51245G_ResetEnable(hospi, MX25LM51245G_OPI_MODE, MX25LM51245G_DTR_TRANSFER) != MX25LM51245G_OK) + { + ret = 1; + } + else if(MX25LM51245G_ResetMemory(hospi, MX25LM51245G_OPI_MODE, MX25LM51245G_DTR_TRANSFER) != MX25LM51245G_OK) + { + ret = 1; + } + else + { + + + /* After SWreset CMD, wait in case SWReset occurred during erase operation */ + HAL_Delay(MX25LM51245G_RESET_MAX_TIME); + } + + /* Return BSP status */ + return ret; +} + + - /* enable write operations */ - if(MX25LM51245G_ResetEnable(hospi, MX25LM51245G_SPI_MODE, MX25LM51245G_STR_TRANSFER) != MX25LM51245G_OK) - ret = 1; - else if(MX25LM51245G_ResetMemory(hospi, MX25LM51245G_SPI_MODE, MX25LM51245G_STR_TRANSFER) != MX25LM51245G_OK) - ret = 1; - else if(MX25LM51245G_ResetEnable(hospi, MX25LM51245G_OPI_MODE, MX25LM51245G_STR_TRANSFER) != MX25LM51245G_OK) - ret = 1; - else if(MX25LM51245G_ResetMemory(hospi, MX25LM51245G_OPI_MODE, MX25LM51245G_STR_TRANSFER) != MX25LM51245G_OK) - ret = 1; - else if(MX25LM51245G_ResetEnable(hospi, MX25LM51245G_OPI_MODE, MX25LM51245G_DTR_TRANSFER) != MX25LM51245G_OK) - ret = 1; - else if(MX25LM51245G_ResetMemory(hospi, MX25LM51245G_OPI_MODE, MX25LM51245G_DTR_TRANSFER) != MX25LM51245G_OK) - ret = 1; - else - HAL_Delay(MX25LM51245G_RESET_MAX_TIME); - /* return BSP status */ - return ret; -} static int32_t OSPI_NOR_EnterSOPIMode(OSPI_HandleTypeDef *hospi) { @@ -319,6 +350,13 @@ static int32_t OSPI_NOR_EnterSOPIMode(OSPI_HandleTypeDef *hospi) /* Wait that the configuration is effective and check that memory is ready */ HAL_Delay(MX25LM51245G_WRITE_REG_MAX_TIME); + /* Reconfigure the memory type of the peripheral */ + // hospi->Init.MemoryType = HAL_OSPI_MEMTYPE_MACRONIX; + // hospi->Init.DelayHoldQuarterCycle = HAL_OSPI_DHQC_ENABLE; + // if (HAL_OSPI_Init(hospi) != HAL_OK) + // { + // ret = 1; + // } /* Check Flash busy ? */ if (MX25LM51245G_AutoPollingMemReady(hospi, MX25LM51245G_OPI_MODE, MX25LM51245G_STR_TRANSFER) != MX25LM51245G_OK) { @@ -342,6 +380,7 @@ static int32_t OSPI_NOR_EnterSOPIMode(OSPI_HandleTypeDef *hospi) return ret; } + /** * @brief Configure the OSPI in memory-mapped mode * @param Instance OSPI instance @@ -351,11 +390,15 @@ int32_t OSPI_NOR_EnableMemoryMappedMode(OSPI_HandleTypeDef *hospi) { int32_t ret = 0; - if(MX25LM51245G_EnableMemoryMappedModeSTR(hospi, MX25LM51245G_OPI_MODE, MX25LM51245G_4BYTES_SIZE) != MX25LM51245G_OK) + + if(MX25LM51245G_EnableMemoryMappedModeSTR(hospi, MX25LM51245G_OPI_MODE, MX25LM51245G_4BYTES_SIZE) != MX25LM51245G_OK) { ret = 1; } + + + /* Return BSP status */ return ret; } diff --git a/Core/Src/rng.c b/Core/Src/rng.c index a65f115..622790a 100644 --- a/Core/Src/rng.c +++ b/Core/Src/rng.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/rtc.c b/Core/Src/rtc.c index c7040b6..53afeff 100644 --- a/Core/Src/rtc.c +++ b/Core/Src/rtc.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file @@ -49,8 +49,8 @@ void MX_RTC_Init(void) hrtc.Init.HourFormat = RTC_HOURFORMAT_24; hrtc.Init.AsynchPrediv = 127; hrtc.Init.SynchPrediv = 255; - hrtc.Init.OutPut = RTC_OUTPUT_ALARMA; - hrtc.Init.OutPutRemap = RTC_OUTPUT_REMAP_NONE; + hrtc.Init.OutPut = RTC_OUTPUT_ALARMB; + hrtc.Init.OutPutRemap = RTC_OUTPUT_REMAP_POS1; hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH; hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN; hrtc.Init.OutPutPullUp = RTC_OUTPUT_PULLUP_NONE; @@ -87,13 +87,12 @@ void MX_RTC_Init(void) sDate.Month = RTC_MONTH_JANUARY; sDate.Date = 0x1; sDate.Year = 0x0; - if (HAL_RTC_SetDate(&hrtc, &sDate, RTC_FORMAT_BCD) != HAL_OK) { Error_Handler(); } - /** Enable the Alarm A + /** Enable the Alarm B */ sAlarm.AlarmTime.Hours = 0x0; sAlarm.AlarmTime.Minutes = 0x0; @@ -103,7 +102,7 @@ void MX_RTC_Init(void) sAlarm.AlarmSubSecondMask = RTC_ALARMSUBSECONDMASK_ALL; sAlarm.AlarmDateWeekDaySel = RTC_ALARMDATEWEEKDAYSEL_DATE; sAlarm.AlarmDateWeekDay = 0x1; - sAlarm.Alarm = RTC_ALARM_A; + sAlarm.Alarm = RTC_ALARM_B; if (HAL_RTC_SetAlarm(&hrtc, &sAlarm, RTC_FORMAT_BCD) != HAL_OK) { Error_Handler(); @@ -139,15 +138,15 @@ void HAL_RTC_MspInit(RTC_HandleTypeDef* rtcHandle) __HAL_RCC_RTCAPB_CLK_ENABLE(); __HAL_RCC_RTCAPB_CLKAM_ENABLE(); - __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); /**RTC GPIO Configuration - PC13 ------> RTC_OUT1 + PB2 ------> RTC_OUT2 */ - GPIO_InitStruct.Pin = GPIO_PIN_13; + GPIO_InitStruct.Pin = GPIO_PIN_2; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); /* USER CODE BEGIN RTC_MspInit 1 */ @@ -169,9 +168,9 @@ void HAL_RTC_MspDeInit(RTC_HandleTypeDef* rtcHandle) __HAL_RCC_RTCAPB_CLKAM_DISABLE(); /**RTC GPIO Configuration - PC13 ------> RTC_OUT1 + PB2 ------> RTC_OUT2 */ - HAL_GPIO_DeInit(GPIOC, GPIO_PIN_13); + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_2); /* USER CODE BEGIN RTC_MspDeInit 1 */ diff --git a/Core/Src/sdmmc.c b/Core/Src/sdmmc.c index ed032cc..05e7637 100644 --- a/Core/Src/sdmmc.c +++ b/Core/Src/sdmmc.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/spi.c b/Core/Src/spi.c index 58f199f..afde217 100644 --- a/Core/Src/spi.c +++ b/Core/Src/spi.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/stm32u5xx_hal_msp.c b/Core/Src/stm32u5xx_hal_msp.c index 99b01ae..d11c16c 100644 --- a/Core/Src/stm32u5xx_hal_msp.c +++ b/Core/Src/stm32u5xx_hal_msp.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/stm32u5xx_hal_timebase_tim.c b/Core/Src/stm32u5xx_hal_timebase_tim.c index 25de353..b6b728b 100644 --- a/Core/Src/stm32u5xx_hal_timebase_tim.c +++ b/Core/Src/stm32u5xx_hal_timebase_tim.c @@ -1,12 +1,12 @@ /* USER CODE BEGIN Header */ /** ****************************************************************************** - * @file stm32u5xx_hal_timebase_tim.c + * @file stm32u5xx_hal_timebase_TIM.c * @brief HAL time base based on the hardware TIM. ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Core/Src/stm32u5xx_it.c b/Core/Src/stm32u5xx_it.c index 3232fb0..70497c1 100644 --- a/Core/Src/stm32u5xx_it.c +++ b/Core/Src/stm32u5xx_it.c @@ -6,7 +6,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file @@ -76,7 +76,7 @@ void NMI_Handler(void) /* USER CODE END NonMaskableInt_IRQn 0 */ /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - while (1) + while (1) { } /* USER CODE END NonMaskableInt_IRQn 1 */ diff --git a/Core/Src/tim.c b/Core/Src/tim.c index 46afefd..68f9d82 100644 --- a/Core/Src/tim.c +++ b/Core/Src/tim.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file @@ -24,80 +24,12 @@ /* USER CODE END 0 */ -TIM_HandleTypeDef htim1; TIM_HandleTypeDef htim3; TIM_HandleTypeDef htim5; TIM_HandleTypeDef htim6; TIM_HandleTypeDef htim8; TIM_HandleTypeDef htim15; -/* TIM1 init function */ -void MX_TIM1_Init(void) -{ - - /* USER CODE BEGIN TIM1_Init 0 */ - - /* USER CODE END TIM1_Init 0 */ - - TIM_MasterConfigTypeDef sMasterConfig = {0}; - TIM_OC_InitTypeDef sConfigOC = {0}; - TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; - - /* USER CODE BEGIN TIM1_Init 1 */ - - /* USER CODE END TIM1_Init 1 */ - htim1.Instance = TIM1; - htim1.Init.Prescaler = 0; - htim1.Init.CounterMode = TIM_COUNTERMODE_UP; - htim1.Init.Period = 65535; - htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; - htim1.Init.RepetitionCounter = 0; - htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; - if (HAL_TIM_OC_Init(&htim1) != HAL_OK) - { - Error_Handler(); - } - sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; - sMasterConfig.MasterOutputTrigger2 = TIM_TRGO2_RESET; - sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; - if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK) - { - Error_Handler(); - } - sConfigOC.OCMode = TIM_OCMODE_TIMING; - sConfigOC.Pulse = 0; - sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; - sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH; - sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; - sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET; - sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET; - if (HAL_TIM_OC_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_2) != HAL_OK) - { - Error_Handler(); - } - sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE; - sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE; - sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF; - sBreakDeadTimeConfig.DeadTime = 0; - sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE; - sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH; - sBreakDeadTimeConfig.BreakFilter = 0; - sBreakDeadTimeConfig.BreakAFMode = TIM_BREAK_AFMODE_INPUT; - sBreakDeadTimeConfig.Break2State = TIM_BREAK2_DISABLE; - sBreakDeadTimeConfig.Break2Polarity = TIM_BREAK2POLARITY_HIGH; - sBreakDeadTimeConfig.Break2Filter = 0; - sBreakDeadTimeConfig.Break2AFMode = TIM_BREAK_AFMODE_INPUT; - sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE; - if (HAL_TIMEx_ConfigBreakDeadTime(&htim1, &sBreakDeadTimeConfig) != HAL_OK) - { - Error_Handler(); - } - /* USER CODE BEGIN TIM1_Init 2 */ - - /* USER CODE END TIM1_Init 2 */ - HAL_TIM_MspPostInit(&htim1); - -} /* TIM3 init function */ void MX_TIM3_Init(void) { @@ -109,6 +41,7 @@ void MX_TIM3_Init(void) TIM_SlaveConfigTypeDef sSlaveConfig = {0}; TIM_IC_InitTypeDef sConfigIC = {0}; TIM_MasterConfigTypeDef sMasterConfig = {0}; + TIM_OC_InitTypeDef sConfigOC = {0}; /* USER CODE BEGIN TIM3_Init 1 */ @@ -119,6 +52,10 @@ void MX_TIM3_Init(void) htim3.Init.Period = 4.294967295E9; htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; + if (HAL_TIM_PWM_Init(&htim3) != HAL_OK) + { + Error_Handler(); + } if (HAL_TIM_IC_Init(&htim3) != HAL_OK) { Error_Handler(); @@ -152,9 +89,18 @@ void MX_TIM3_Init(void) { Error_Handler(); } + sConfigOC.OCMode = TIM_OCMODE_PWM1; + sConfigOC.Pulse = 0; + sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; + sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; + if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_3) != HAL_OK) + { + Error_Handler(); + } /* USER CODE BEGIN TIM3_Init 2 */ /* USER CODE END TIM3_Init 2 */ + HAL_TIM_MspPostInit(&htim3); } /* TIM5 init function */ @@ -243,6 +189,7 @@ void MX_TIM8_Init(void) /* USER CODE END TIM8_Init 0 */ TIM_MasterConfigTypeDef sMasterConfig = {0}; + TIMEx_BreakInputConfigTypeDef sBreakInputConfig = {0}; TIM_OC_InitTypeDef sConfigOC = {0}; TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; @@ -267,6 +214,13 @@ void MX_TIM8_Init(void) { Error_Handler(); } + sBreakInputConfig.Source = TIM_BREAKINPUTSOURCE_BKIN; + sBreakInputConfig.Enable = TIM_BREAKINPUTSOURCE_ENABLE; + sBreakInputConfig.Polarity = TIM_BREAKINPUTSOURCE_POLARITY_HIGH; + if (HAL_TIMEx_ConfigBreakInput(&htim8, TIM_BREAKINPUT_BRK, &sBreakInputConfig) != HAL_OK) + { + Error_Handler(); + } sConfigOC.OCMode = TIM_OCMODE_TIMING; sConfigOC.Pulse = 0; sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; @@ -274,6 +228,10 @@ void MX_TIM8_Init(void) sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET; sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET; + if (HAL_TIM_OC_ConfigChannel(&htim8, &sConfigOC, TIM_CHANNEL_1) != HAL_OK) + { + Error_Handler(); + } if (HAL_TIM_OC_ConfigChannel(&htim8, &sConfigOC, TIM_CHANNEL_2) != HAL_OK) { Error_Handler(); @@ -282,7 +240,7 @@ void MX_TIM8_Init(void) sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE; sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF; sBreakDeadTimeConfig.DeadTime = 0; - sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE; + sBreakDeadTimeConfig.BreakState = TIM_BREAK_ENABLE; sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH; sBreakDeadTimeConfig.BreakFilter = 0; sBreakDeadTimeConfig.BreakAFMode = TIM_BREAK_AFMODE_INPUT; @@ -373,38 +331,11 @@ void MX_TIM15_Init(void) } -void HAL_TIM_OC_MspInit(TIM_HandleTypeDef* tim_ocHandle) -{ - - if(tim_ocHandle->Instance==TIM1) - { - /* USER CODE BEGIN TIM1_MspInit 0 */ - - /* USER CODE END TIM1_MspInit 0 */ - /* TIM1 clock enable */ - __HAL_RCC_TIM1_CLK_ENABLE(); - /* USER CODE BEGIN TIM1_MspInit 1 */ - - /* USER CODE END TIM1_MspInit 1 */ - } - else if(tim_ocHandle->Instance==TIM8) - { - /* USER CODE BEGIN TIM8_MspInit 0 */ - - /* USER CODE END TIM8_MspInit 0 */ - /* TIM8 clock enable */ - __HAL_RCC_TIM8_CLK_ENABLE(); - /* USER CODE BEGIN TIM8_MspInit 1 */ - - /* USER CODE END TIM8_MspInit 1 */ - } -} - -void HAL_TIM_IC_MspInit(TIM_HandleTypeDef* tim_icHandle) +void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* tim_pwmHandle) { GPIO_InitTypeDef GPIO_InitStruct = {0}; - if(tim_icHandle->Instance==TIM3) + if(tim_pwmHandle->Instance==TIM3) { /* USER CODE BEGIN TIM3_MspInit 0 */ @@ -427,12 +358,7 @@ void HAL_TIM_IC_MspInit(TIM_HandleTypeDef* tim_icHandle) /* USER CODE END TIM3_MspInit 1 */ } -} - -void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* tim_pwmHandle) -{ - - if(tim_pwmHandle->Instance==TIM5) + else if(tim_pwmHandle->Instance==TIM5) { /* USER CODE BEGIN TIM5_MspInit 0 */ @@ -471,29 +397,58 @@ void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle) /* USER CODE END TIM15_MspInit 1 */ } } -void HAL_TIM_MspPostInit(TIM_HandleTypeDef* timHandle) + +void HAL_TIM_OC_MspInit(TIM_HandleTypeDef* tim_ocHandle) { GPIO_InitTypeDef GPIO_InitStruct = {0}; - if(timHandle->Instance==TIM1) + if(tim_ocHandle->Instance==TIM8) { - /* USER CODE BEGIN TIM1_MspPostInit 0 */ + /* USER CODE BEGIN TIM8_MspInit 0 */ - /* USER CODE END TIM1_MspPostInit 0 */ - __HAL_RCC_GPIOB_CLK_ENABLE(); - /**TIM1 GPIO Configuration - PB0 ------> TIM1_CH2N + /* USER CODE END TIM8_MspInit 0 */ + /* TIM8 clock enable */ + __HAL_RCC_TIM8_CLK_ENABLE(); + + __HAL_RCC_GPIOI_CLK_ENABLE(); + /**TIM8 GPIO Configuration + PI4 ------> TIM8_BKIN */ - GPIO_InitStruct.Pin = GPIO_PIN_0; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pin = GPIO_PIN_4; + GPIO_InitStruct.Mode = GPIO_MODE_AF_OD; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - GPIO_InitStruct.Alternate = GPIO_AF1_TIM1; - HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + GPIO_InitStruct.Alternate = GPIO_AF3_TIM8; + HAL_GPIO_Init(GPIOI, &GPIO_InitStruct); + + /* USER CODE BEGIN TIM8_MspInit 1 */ + + /* USER CODE END TIM8_MspInit 1 */ + } +} +void HAL_TIM_MspPostInit(TIM_HandleTypeDef* timHandle) +{ - /* USER CODE BEGIN TIM1_MspPostInit 1 */ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if(timHandle->Instance==TIM3) + { + /* USER CODE BEGIN TIM3_MspPostInit 0 */ - /* USER CODE END TIM1_MspPostInit 1 */ + /* USER CODE END TIM3_MspPostInit 0 */ + __HAL_RCC_GPIOE_CLK_ENABLE(); + /**TIM3 GPIO Configuration + PE5 ------> TIM3_CH3 + */ +// GPIO_InitStruct.Pin = USR_LED_1_Pin; +// GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; +// GPIO_InitStruct.Pull = GPIO_NOPULL; +// GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; +// GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; +// HAL_GPIO_Init(USR_LED_1_GPIO_Port, &GPIO_InitStruct); + + /* USER CODE BEGIN TIM3_MspPostInit 1 */ + + /* USER CODE END TIM3_MspPostInit 1 */ } else if(timHandle->Instance==TIM5) { @@ -523,16 +478,25 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* timHandle) /* USER CODE END TIM8_MspPostInit 0 */ __HAL_RCC_GPIOI_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); /**TIM8 GPIO Configuration - PI6 ------> TIM8_CH2 + PI5 ------> TIM8_CH1 + PB0 ------> TIM8_CH2N */ - GPIO_InitStruct.Pin = GPIO_PIN_6; + GPIO_InitStruct.Pin = GPIO_PIN_5; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF3_TIM8; HAL_GPIO_Init(GPIOI, &GPIO_InitStruct); + GPIO_InitStruct.Pin = GPIO_PIN_0; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF3_TIM8; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + /* USER CODE BEGIN TIM8_MspPostInit 1 */ /* USER CODE END TIM8_MspPostInit 1 */ @@ -561,37 +525,10 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* timHandle) } -void HAL_TIM_OC_MspDeInit(TIM_HandleTypeDef* tim_ocHandle) -{ - - if(tim_ocHandle->Instance==TIM1) - { - /* USER CODE BEGIN TIM1_MspDeInit 0 */ - - /* USER CODE END TIM1_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_TIM1_CLK_DISABLE(); - /* USER CODE BEGIN TIM1_MspDeInit 1 */ - - /* USER CODE END TIM1_MspDeInit 1 */ - } - else if(tim_ocHandle->Instance==TIM8) - { - /* USER CODE BEGIN TIM8_MspDeInit 0 */ - - /* USER CODE END TIM8_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_TIM8_CLK_DISABLE(); - /* USER CODE BEGIN TIM8_MspDeInit 1 */ - - /* USER CODE END TIM8_MspDeInit 1 */ - } -} - -void HAL_TIM_IC_MspDeInit(TIM_HandleTypeDef* tim_icHandle) +void HAL_TIM_PWM_MspDeInit(TIM_HandleTypeDef* tim_pwmHandle) { - if(tim_icHandle->Instance==TIM3) + if(tim_pwmHandle->Instance==TIM3) { /* USER CODE BEGIN TIM3_MspDeInit 0 */ @@ -601,19 +538,17 @@ void HAL_TIM_IC_MspDeInit(TIM_HandleTypeDef* tim_icHandle) /**TIM3 GPIO Configuration PC7 ------> TIM3_CH2 + PE5 ------> TIM3_CH3 */ HAL_GPIO_DeInit(GPIOC, GPIO_PIN_7); +// HAL_GPIO_DeInit(USR_LED_1_GPIO_Port, USR_LED_1_Pin); + /* USER CODE BEGIN TIM3_MspDeInit 1 */ /* USER CODE END TIM3_MspDeInit 1 */ } -} - -void HAL_TIM_PWM_MspDeInit(TIM_HandleTypeDef* tim_pwmHandle) -{ - - if(tim_pwmHandle->Instance==TIM5) + else if(tim_pwmHandle->Instance==TIM5) { /* USER CODE BEGIN TIM5_MspDeInit 0 */ @@ -653,6 +588,32 @@ void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle) } } +void HAL_TIM_OC_MspDeInit(TIM_HandleTypeDef* tim_ocHandle) +{ + + if(tim_ocHandle->Instance==TIM8) + { + /* USER CODE BEGIN TIM8_MspDeInit 0 */ + + /* USER CODE END TIM8_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_TIM8_CLK_DISABLE(); + + /**TIM8 GPIO Configuration + PI5 ------> TIM8_CH1 + PI4 ------> TIM8_BKIN + PB0 ------> TIM8_CH2N + */ + HAL_GPIO_DeInit(GPIOI, GPIO_PIN_5|GPIO_PIN_4); + + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_0); + + /* USER CODE BEGIN TIM8_MspDeInit 1 */ + + /* USER CODE END TIM8_MspDeInit 1 */ + } +} + /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ diff --git a/Core/Src/usart.c b/Core/Src/usart.c index 5e33845..55c105d 100644 --- a/Core/Src/usart.c +++ b/Core/Src/usart.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file @@ -25,7 +25,6 @@ /* USER CODE END 0 */ UART_HandleTypeDef huart1; -UART_HandleTypeDef huart2; UART_HandleTypeDef huart3; UART_HandleTypeDef huart6; @@ -72,50 +71,6 @@ void MX_USART1_UART_Init(void) /* USER CODE END USART1_Init 2 */ -} -/* USART2 init function */ - -void MX_USART2_UART_Init(void) -{ - - /* USER CODE BEGIN USART2_Init 0 */ - - /* USER CODE END USART2_Init 0 */ - - /* USER CODE BEGIN USART2_Init 1 */ - - /* USER CODE END USART2_Init 1 */ - huart2.Instance = USART2; - huart2.Init.BaudRate = 115200; - huart2.Init.WordLength = UART_WORDLENGTH_8B; - huart2.Init.StopBits = UART_STOPBITS_1; - huart2.Init.Parity = UART_PARITY_NONE; - huart2.Init.Mode = UART_MODE_TX_RX; - huart2.Init.HwFlowCtl = UART_HWCONTROL_RTS_CTS; - huart2.Init.OverSampling = UART_OVERSAMPLING_16; - huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; - huart2.Init.ClockPrescaler = UART_PRESCALER_DIV1; - huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; - if (HAL_UART_Init(&huart2) != HAL_OK) - { - Error_Handler(); - } - if (HAL_UARTEx_SetTxFifoThreshold(&huart2, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) - { - Error_Handler(); - } - if (HAL_UARTEx_SetRxFifoThreshold(&huart2, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) - { - Error_Handler(); - } - if (HAL_UARTEx_DisableFifoMode(&huart2) != HAL_OK) - { - Error_Handler(); - } - /* USER CODE BEGIN USART2_Init 2 */ - - /* USER CODE END USART2_Init 2 */ - } /* USART3 init function */ @@ -184,7 +139,7 @@ void MX_USART6_UART_Init(void) huart6.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; huart6.Init.ClockPrescaler = UART_PRESCALER_DIV1; huart6.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; - if (HAL_UART_Init(&huart6) != HAL_OK) + if (HAL_RS485Ex_Init(&huart6, UART_DE_POLARITY_HIGH, 0, 0) != HAL_OK) { Error_Handler(); } @@ -229,20 +184,12 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) /* USART1 clock enable */ __HAL_RCC_USART1_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); __HAL_RCC_GPIOG_CLK_ENABLE(); /**USART1 GPIO Configuration - PB7 ------> USART1_RX PG9 ------> USART1_TX + PG10 ------> USART1_RX */ - GPIO_InitStruct.Pin = GPIO_PIN_7; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - GPIO_InitStruct.Alternate = GPIO_AF7_USART1; - HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); - - GPIO_InitStruct.Pin = GPIO_PIN_9; + GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; @@ -253,50 +200,6 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) /* USER CODE END USART1_MspInit 1 */ } - else if(uartHandle->Instance==USART2) - { - /* USER CODE BEGIN USART2_MspInit 0 */ - - /* USER CODE END USART2_MspInit 0 */ - - /** Initializes the peripherals clock - */ - PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART2; - PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1; - if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) - { - Error_Handler(); - } - - /* USART2 clock enable */ - __HAL_RCC_USART2_CLK_ENABLE(); - - __HAL_RCC_GPIOD_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - /**USART2 GPIO Configuration - PD4 ------> USART2_RTS - PD5 ------> USART2_TX - PA0 ------> USART2_CTS - PA3 ------> USART2_RX - */ - GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - GPIO_InitStruct.Alternate = GPIO_AF7_USART2; - HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); - - GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_3; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - GPIO_InitStruct.Alternate = GPIO_AF7_USART2; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - /* USER CODE BEGIN USART2_MspInit 1 */ - - /* USER CODE END USART2_MspInit 1 */ - } else if(uartHandle->Instance==USART3) { /* USER CODE BEGIN USART3_MspInit 0 */ @@ -360,10 +263,11 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) __HAL_RCC_GPIOE_CLK_ENABLE(); __HAL_RCC_GPIOJ_CLK_ENABLE(); /**USART6 GPIO Configuration + PE4 ------> USART6_DE PE1 ------> USART6_TX PJ4 ------> USART6_RX */ - GPIO_InitStruct.Pin = GPIO_PIN_1; + GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_1; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; @@ -395,39 +299,15 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle) __HAL_RCC_USART1_CLK_DISABLE(); /**USART1 GPIO Configuration - PB7 ------> USART1_RX PG9 ------> USART1_TX + PG10 ------> USART1_RX */ - HAL_GPIO_DeInit(GPIOB, GPIO_PIN_7); - - HAL_GPIO_DeInit(GPIOG, GPIO_PIN_9); + HAL_GPIO_DeInit(GPIOG, GPIO_PIN_9|GPIO_PIN_10); /* USER CODE BEGIN USART1_MspDeInit 1 */ /* USER CODE END USART1_MspDeInit 1 */ } - else if(uartHandle->Instance==USART2) - { - /* USER CODE BEGIN USART2_MspDeInit 0 */ - - /* USER CODE END USART2_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_USART2_CLK_DISABLE(); - - /**USART2 GPIO Configuration - PD4 ------> USART2_RTS - PD5 ------> USART2_TX - PA0 ------> USART2_CTS - PA3 ------> USART2_RX - */ - HAL_GPIO_DeInit(GPIOD, GPIO_PIN_4|GPIO_PIN_5); - - HAL_GPIO_DeInit(GPIOA, GPIO_PIN_0|GPIO_PIN_3); - - /* USER CODE BEGIN USART2_MspDeInit 1 */ - - /* USER CODE END USART2_MspDeInit 1 */ - } else if(uartHandle->Instance==USART3) { /* USER CODE BEGIN USART3_MspDeInit 0 */ @@ -457,10 +337,11 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle) __HAL_RCC_USART6_CLK_DISABLE(); /**USART6 GPIO Configuration + PE4 ------> USART6_DE PE1 ------> USART6_TX PJ4 ------> USART6_RX */ - HAL_GPIO_DeInit(GPIOE, GPIO_PIN_1); + HAL_GPIO_DeInit(GPIOE, GPIO_PIN_4|GPIO_PIN_1); HAL_GPIO_DeInit(GPIOJ, GPIO_PIN_4); diff --git a/Core/Src/usb_otg.c b/Core/Src/usb_otg.c index cd65835..a54189c 100644 --- a/Core/Src/usb_otg.c +++ b/Core/Src/usb_otg.c @@ -7,7 +7,7 @@ ****************************************************************************** * @attention * - * Copyright (c) 2023 STMicroelectronics. + * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file diff --git a/Middlewares/Third_Party/LVGL/lv_conf.h b/Middlewares/Third_Party/LVGL/lv_conf.h index 07b2d3a..4f9f7ca 100644 --- a/Middlewares/Third_Party/LVGL/lv_conf.h +++ b/Middlewares/Third_Party/LVGL/lv_conf.h @@ -181,6 +181,27 @@ #endif +/*Use TSi's aka (Think Silicon) NemaGFX */ +#define LV_USE_NEMA_GFX 1 + +#if LV_USE_NEMA_GFX + /** Select which NemaGFX HAL to use. Possible options: + * - LV_NEMA_HAL_CUSTOM + * - LV_NEMA_HAL_STM32 */ + #define LV_USE_NEMA_HAL LV_NEMA_HAL_STM32 + #if LV_USE_NEMA_HAL == LV_NEMA_HAL_STM32 + #define LV_NEMA_STM32_HAL_INCLUDE + #endif + + /*Enable Vector Graphics Operations. Available only if NemaVG library is present*/ + #define LV_USE_NEMA_VG 1 + #if LV_USE_NEMA_VG + /*Define application's resolution used for VG related buffer allocation */ + #define LV_NEMA_GFX_MAX_RESX 800 + #define LV_NEMA_GFX_MAX_RESY 480 + #endif +#endif + /*======================= * FEATURE CONFIGURATION *=======================*/ @@ -372,10 +393,10 @@ #define LV_FONT_MONTSERRAT_14 1 #define LV_FONT_MONTSERRAT_16 0 #define LV_FONT_MONTSERRAT_18 0 -#define LV_FONT_MONTSERRAT_20 0 +#define LV_FONT_MONTSERRAT_20 1 #define LV_FONT_MONTSERRAT_22 0 #define LV_FONT_MONTSERRAT_24 1 -#define LV_FONT_MONTSERRAT_26 0 +#define LV_FONT_MONTSERRAT_26 1 #define LV_FONT_MONTSERRAT_28 0 #define LV_FONT_MONTSERRAT_30 0 #define LV_FONT_MONTSERRAT_32 0 diff --git a/Middlewares/Third_Party/LVGL/lvgl b/Middlewares/Third_Party/LVGL/lvgl index 62796a6..b7d1248 160000 --- a/Middlewares/Third_Party/LVGL/lvgl +++ b/Middlewares/Third_Party/LVGL/lvgl @@ -1 +1 @@ -Subproject commit 62796a64bac11da00bb1ab6370670c434aad460f +Subproject commit b7d1248c3baf082c06da827858fc9b8cfec53813 diff --git a/STM32CubeIDE/.cproject b/STM32CubeIDE/.cproject index 52d7f08..d9f458c 100644 --- a/STM32CubeIDE/.cproject +++ b/STM32CubeIDE/.cproject @@ -44,6 +44,8 @@