STM32F3 ADC - synchronous clock mode Topic is solved

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
neums
Posts: 137
Joined: Fri May 08, 2015 1:09 pm
Has thanked: 10 times
Been thanked: 5 times

STM32F3 ADC - synchronous clock mode

Post by neums »

Hi,
i use the STM32F303. How can i active the synchronous clock mode without DUAL MODE? In dual mode it is possible by writing ADC_CCR_CKMODE_AHB_DIV1, ADC_CCR_CKMODE_AHB_DIV2 or ADC_CCR_CKMODE_AHB_DIV4 to CCR of the ADCConversionGroup.

The CCR is not available in the driver without dual mode in the adc_lld_start_conversion function:

Code: Select all

void adc_lld_start_conversion(ADCDriver *adcp) {
  uint32_t dmamode, cfgr;
  const ADCConversionGroup *grpp = adcp->grpp;
#if STM32_ADC_DUAL_MODE
  uint32_t ccr = grpp->ccr & ~(ADC_CCR_CKMODE_MASK | ADC_CCR_MDMA_MASK);
#endif

and in the ADCConversionGroup:

Code: Select all

#if STM32_ADC_DUAL_MODE || defined(__DOXYGEN__)
  /**
   * @brief   ADC CCR register initialization data.
   * @note    The bits CKMODE, MDMA, DMACFG are enforced internally to the
   *          driver, keep them to zero.
   * @note    This field is only present in dual mode.
   */
  uint32_t                  ccr;
#endif


I think this has to be available.

Thank you.
neums
Posts: 137
Joined: Fri May 08, 2015 1:09 pm
Has thanked: 10 times
Been thanked: 5 times

Re: STM32F3 ADC - synchronous clock mode

Post by neums »

Solved it,
sorry :-)
Post Reply