intmain(void){/* USER CODE BEGIN 1 */uint32_t aCCValue_Buffer[3]={0,0,0};/* Compute CCR1 value to generate a duty cycle at 80% */
aCCValue_Buffer[2]=(uint32_t)(((uint32_t)80*(10000-1))/100);//84000 000/* Compute CCR1 value to generate a duty cycle at 50% */
aCCValue_Buffer[1]=(uint32_t)(((uint32_t)50*(10000-1))/100);/* Compute CCR1 value to generate a duty cycle at 25% */
aCCValue_Buffer[0]=(uint32_t)(((uint32_t)25*(10000-1))/100);/* 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_DMA_Init();MX_TIM1_Init();/* USER CODE BEGIN 2 *//*## Start PWM signal generation in DMA mode ############################*/if(HAL_TIM_PWM_Start_DMA(&htim1, TIM_CHANNEL_1, aCCValue_Buffer,3)!= HAL_OK){/* Starting Error */Error_Handler();}/* USER CODE END 2 *//* Infinite loop *//* USER CODE BEGIN WHILE */while(1){/* USER CODE END WHILE *//* USER CODE BEGIN 3 */}/* USER CODE END 3 */}