STMicroelectronics / STM32CubeG4

STM32Cube MCU Full Package for the STM32G4 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
182 stars 98 forks source link

module DAC does not work on STMG473 #21

Closed ngoquytuan closed 3 years ago

ngoquytuan commented 3 years ago

I use MX cube to generate code with STM32Cube_FW_G4_V1.3.0 package but after this / USER CODE BEGIN 2 / HAL_DAC_Start(&hdac1,DAC1_CHANNEL_1);
HAL_DAC_SetValue(&hdac1,DAC1_CHANNEL_1,DAC_ALIGN_12B_R,2000); / USER CODE END 2 / I measured on PA4 is 0V. This code work normally with other STM32 which I tested ( STM32F4, STM32F1) I do not know how to fix this. Help me out. Thanks.