AnsweredAssumed Answered


Question asked by britwa.boris on Jul 6, 2015
Thanks for the answer. But there is a lot of excess and used DMA. (STM32Cube_FW_F4_V1.6.0\Projects\STM32F4-Discovery\Examples\DAC )
I need a simple example generated in STM32Cube triangle generation.
void MX_DAC_Init(void)
  DAC_ChannelConfTypeDef sConfig;
    /**DAC Initialization
  hdac.Instance = DAC;
    /**DAC channel OUT1 config
  sConfig.DAC_Trigger = DAC_TRIGGER_T6_TRGO;
  HAL_DAC_ConfigChannel(&hdac, &sConfig, DAC_CHANNEL_1);
    /**Configure Triangle wave generation on DAC OUT1
  HAL_DACEx_TriangleWaveGenerate(&hdac, DAC_CHANNEL_1, DAC_TRIANGLEAMPLITUDE_4095);
/* TIM6 init function */
void MX_TIM6_Init(void)
  TIM_MasterConfigTypeDef sMasterConfig;
  htim6.Instance = TIM6;
  htim6.Init.Prescaler = 0;
  htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
  htim6.Init.Period = 500;
  sMasterConfig.MasterOutputTrigger = TIM_TRGO_UPDATE;
  sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
  HAL_TIMEx_MasterConfigSynchronization(&htim6, &sMasterConfig);

why does not work my code?

Generation there but it's not a triangle!!!