cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F302: Unable to set Register CR: ADSTART

ebommer
Associate II
Posted on September 30, 2014 at 23:20

I am trying to get the ADC working on a STM32F302 processor and I am noticing while single stepping the code is when I call�? HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc)�? and exercise the code the “CR''Register never changes:

if (__HAL_ADC_NONMULTIMODE_OR_MULTIMODEMASTER(hadc) )
{
hadc->Instance->CR |= ADC_CR_ADSTART;
}

I have read the manual and it states if the ADEN = 1 and the ADDIS = 0 and there are no pending ADC disable the bit should set.

Currently ADEN = 1 and ADDIS = 0, but I don’t see the value updated.

#stm32-adc #stm32-adc
10 REPLIES 10
ebommer
Associate II
Posted on October 02, 2014 at 20:25

Figures, I have this working on a STM32F0, STM32F1.  

Thought for this project I could save time and use the STM32CubeMx and the new libraries.  What could be easier.

I'll start over and copy my code from my other projects that work.

Thanks