![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Lab4 DMA2D Embedded Systems
Dependencies: BSP_DISCO_F746NG mbed
Diff: main.cpp
- Revision:
- 1:751d3c9544ea
- Parent:
- 0:919da762f527
- Child:
- 2:b4b0e5e08b0a
--- a/main.cpp Sat Oct 21 11:21:14 2017 +0000 +++ b/main.cpp Sat Oct 21 15:49:21 2017 +0000 @@ -1,16 +1,5 @@ //#include "mbed.h" -/** - ****************************************************************************** - * @file main.c - * @author Ac6 - * @version V1.0 - * @date 01-December-2013 - * @brief Default main function. - ****************************************************************************** -*/ - - #include "stm32f7xx.h" #include "stm32746g_discovery.h" #include "stm32746g_discovery_lcd.h" @@ -19,49 +8,6 @@ #define LCD_MEM_ADDR (LCD_FB_START_ADDRESS + (480 * 272) * 4) -void SystemClock_Config(void) -{ - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_OscInitTypeDef RCC_OscInitStruct; - HAL_StatusTypeDef ret = HAL_OK; - - /* Enable HSE Oscillator and activate PLL with HSE as source */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; - RCC_OscInitStruct.HSEState = RCC_HSE_ON; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; - RCC_OscInitStruct.PLL.PLLM = 25; - RCC_OscInitStruct.PLL.PLLN = 400; - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; - RCC_OscInitStruct.PLL.PLLQ = 8; - - ret = HAL_RCC_OscConfig(&RCC_OscInitStruct); - if(ret != HAL_OK) - { - while(1) { ; } - } - - /* Activate the OverDrive to reach the 200 MHz Frequency */ - ret = HAL_PWREx_EnableOverDrive(); - if(ret != HAL_OK) - { - while(1) { ; } - } - - /* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers */ - RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; - - ret = HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_6); - if(ret != HAL_OK) - { - while(1) { ; } - } -} - DMA2D_HandleTypeDef hdma2d; void DMA2D_Config(void); @@ -72,7 +18,6 @@ { int xpos_offset = 0; HAL_Init(); - //SystemClock_Config(); BSP_LCD_Init(); BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS);