Hi everyone.
I'm trying to test DAC in stm32f103rbt6. I've written a simple program that writes a 12-bit value in DAC_DHR12R1 register. I set the "DACEN" bit in the "RCC_APB1ENR" register to enable DAC interface clock, but when i debugged the program and saw the RCC registers, i found that DAC interface clock was not enabled.
I've tried to set other bits in "RCC_APB1ENR" register, like "TIM2EN" or "PWREN" bits, and all of them were set after debugging. I don't know what the problem is.
Do i need to set another bit before setting "DACEN" to enable DAC interface clock?
I've attached my code.
Thanks for your help.View attachment DAC.txt