2022-09-29 04:37 AM
I started the project configuration from scratch, using
Timer 7 is used for Systick.
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();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_TIM1_Init();
MX_FMC_Init();
MX_LTDC_Init();
MX_TIM4_Init();
MX_QUADSPI_Init();
MX_DMA2D_Init();
MX_CRC_Init();
MX_TouchGFX_Init();
/* Call PreOsInit function */
MX_TouchGFX_PreOSInit();
/* USER CODE BEGIN 2 */
HAL_LTDC_SetAddress(&hltdc, (uint32_t)framebuffer, LTDC_LAYER_1);
HAL_GPIO_WritePin(LCD_EN_GPIO_Port, LCD_EN_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(LCD_RST_GPIO_Port, LCD_RST_Pin, GPIO_PIN_SET);
HAL_Delay(200);
Solved! Go to Solution.
2022-09-29 06:02 AM
That particular mix of software tools is incompatible. I had the same thing happen to me, and I have a separate discussion on it here. When you compile the code in CubeMX, it generates incorrect code for Hal_InitTick(). What I ended up having to do is to paste the function from CubeMX 6.5.0 into the auto-generated file every time I compile the .ioc file. I am attaching the file so you can see what I do. the commented out function is the one auto-generated by 6.6.1, and the uncommented function is from 6.5.0.
Try using the function from my file and see if it solves your problem (you will have to modify to use Timer7 instead of Timer6).
2022-09-29 06:02 AM
That particular mix of software tools is incompatible. I had the same thing happen to me, and I have a separate discussion on it here. When you compile the code in CubeMX, it generates incorrect code for Hal_InitTick(). What I ended up having to do is to paste the function from CubeMX 6.5.0 into the auto-generated file every time I compile the .ioc file. I am attaching the file so you can see what I do. the commented out function is the one auto-generated by 6.6.1, and the uncommented function is from 6.5.0.
Try using the function from my file and see if it solves your problem (you will have to modify to use Timer7 instead of Timer6).