Unable to write to register (example ADC1->SMPR = 7)
I am trying to use the AD converter on my Nucleo-F030R8 board. (Actually it works with the "HAL" functions, but I am trying to program on a lower level).
While debugging I am watching my struct ADC1 (Wich points at the ADC registers). I am trying to write:
ADC1->SMPR = 7; //(ADC_SMPR_SMP_0 | ADC_SMPR_SMP_1 | ADC_SMPR_SMP_2); but when I read the value of this register in debugging mode, it still says that the value is zero.
I have included: #include "stm32f030x8.h" in the header, but it still won't let me write to this register...
It seams to be working when I first run: MX_ADC_Init();, but if I comment it away it won't work.