Menu

#822 Injected ADC with regular conversion

trunk
closed
HAL
Medium
16.1.9
True
2018-02-23
2017-03-28
No

Using injected ADC channels in parallel with regular conversions fails in ChibiOS on STM32. This is because
adc_lld_stop_conversion (os/hal/ports/STM32/LLD/ADCv2/hal_adc_lld.c) sets CR2 to 0 and then to ADC_CR2_ADON, resetting the injected channels bits. Proposed resolution: disable SWSTART bit, preserving other bits:
adcp->adc->CR2 &= ~(ADC_CR2_SWSTART);

Discussion

  • jonathan lung

    jonathan lung - 2017-03-28

    adcp->adc->CR2 &= ~(ADC_CR2_SWSTART | ADC_CR2_DDS | ADC_CR2_DMA);

     
  • Giovanni Di Sirio

    • assigned_to: Giovanni Di Sirio
    • Affected Version: Trunk --> 16.1.9
    • Milestone: 16.1.8 --> trunk
    • Fixed in Repository: False --> True
     
  • Giovanni Di Sirio

    Fixed in trunk, will go in the 18.x release. Sorry for delay...

    Giovanni

     
  • Giovanni Di Sirio

    • status: open --> closed
     

Log in to post a comment.