mina_a
Newbie level 4
- Joined
- Aug 14, 2013
- Messages
- 6
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 39
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
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