cancel
Showing results for 
Search instead for 
Did you mean: 

No DAC output

jtozz.1
Associate II

It seems so easy, but I get no signal to the pin PA4. I use STM32f103VCT, any Idea ?

int main(void)

{

 /* USER CODE BEGIN 1 */

 /* 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_DAC_Init();

 /* USER CODE BEGIN 2 */

    HAL_DAC_Start(&hdac, DAC_CHANNEL_1);

    HAL_DAC_SetValue(&hdac, DAC_CHANNEL_1,DAC_ALIGN_12B_R, 3000);

 /* USER CODE END 2 */

 /* Infinite loop */

 /* USER CODE BEGIN WHILE */

 while (1)

 {

   /* USER CODE END WHILE */

   /* USER CODE BEGIN 3 */

 /* USER CODE END 3 */

 }

}

10 REPLIES 10

Nice catch, Piranha!

@jtozz.1​ , please select Piranha's answer as Best so that thread is marked as solved.

JW