Reputation: 13
I have a question about STM32 & Kiel.
in my project i can change the ADC analog watchdog HTR & LTR registers with direct number same as below:
ADC1->HTR =(500);
but when i try to assign a variable to this register same as below:
ADC1->HTR = (ADC_HVAL);
i have error:
../Src/main.c(120): error: #513: a value of type "uint32_t *" cannot be assigned to an entity of type "uint32_t"
I change the variable type but the error remain.
please help me thanks
Upvotes: 1
Views: 225
Reputation: 442
You need type-casting to set the variable. Just assign the value of the pointer.
ADC1->HTR = (*ADC_HVAL);
Upvotes: 1