stm32: adc-v2: don't attempt to wait for start.

The ADC v2 peripheral doesn't have the same behaviour of starting, where
the hardware clears the bit immediately, on v2, it is not cleared until
the ADC is stopped, or the end of sequence flag is set.

Fixes https://github.com/libopencm3/libopencm3/issues/557
This commit is contained in:
Karl Palsson
2018-01-25 12:34:03 +00:00
parent 3922cc7d3e
commit 01320881e7
2 changed files with 8 additions and 10 deletions

View File

@@ -375,8 +375,10 @@ void adc_disable_vrefint(void)
/** @brief ADC Software Triggered Conversion on Regular Channels
*
* This starts conversion on a set of defined regular channels. It is cleared
* by hardware once conversion starts.
* This starts conversion on a set of defined regular channels.
* Depending on the configuration bits EXTEN, a conversion will start
* immediately (software trigger configuration) or once a regular hardware
* trigger event occurs (hardware trigger configuration)
*
* @param[in] adc ADC block register address base @ref adc_reg_base
*/
@@ -384,9 +386,6 @@ void adc_start_conversion_regular(uint32_t adc)
{
/* Start conversion on regular channels. */
ADC_CR(adc) |= ADC_CR_ADSTART;
/* Wait until the ADC starts the conversion. */
while (ADC_CR(adc) & ADC_CR_ADSTART);
}
/**@}*/