AnsweredAssumed Answered

Nucleo STM32F334R8 DAC

Question asked by faichtner.a on Oct 23, 2014
Latest reply on Nov 20, 2014 by fm
Hello community,
Actually I evaluating DAC on NucF334R8. DAC1_Channel1 seems to work 
but I am not able getting DAC2_Cannel1 (Pin PA6) to work.
 I created the C Framework with STMCubeMX 4.4.0 - both channels with equal settings.

[snip main.c]
...
  /* USER CODE BEGIN 2 */
     HAL_TIM_Base_Start(&htim6);
     HAL_DAC_Start(&hdac1, DAC1_CHANNEL_1);     


     HAL_TIM_Base_Start(&htim7);
     HAL_DAC_Start(&hdac2DAC1_CHANNEL_1);     
....
/* TIM6 init function */
void MX_TIM6_Init(void)
{
  TIM_MasterConfigTypeDef sMasterConfig;


  htim6.Instance = TIM6;
  htim6.Init.Prescaler = 0;
     htim6.Init.ClockDivision = 0;
  htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
  htim6.Init.Period = 0x1;
  HAL_TIM_Base_Init(&htim6);


  sMasterConfig.MasterOutputTrigger = TIM_TRGO_UPDATE;
  sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
  HAL_TIMEx_MasterConfigSynchronization(&htim6, &sMasterConfig);


}
/* TIM7 init function */
void MX_TIM7_Init(void)
{


  TIM_MasterConfigTypeDef sMasterConfig;


  htim7.Instance = TIM7;
  htim7.Init.Prescore = 0;
  htim7.Init.CounterMode = TIM_COUNTERMODE_UP;
     htim7.Init.ClockDivision = 0;
  htim7.Init.Period = 0x1;
  HAL_TIM_Base_Init(&htim7);


  sMasterConfig.MasterOutputTrigger = TIM_TRGO_UPDATE;
  sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
  HAL_TIMEx_MasterConfigSynchronization(&htim7, &sMasterConfig);

... 
[snap]

DAC1 - yellow; DAC2 - blue
snapshot-NucF334R8-DAC.png

Now I am using Keil Lite IDE but with mbed I got the same results....
Does anybody have an idea what is wrong ?

regards

Outcomes