1. 29 Sep, 2023 29 commits
  2. 28 Sep, 2023 4 commits
  3. 27 Sep, 2023 4 commits
    • Rene Straub's avatar
      stm32/machine_adc: Fix and improve STM32H5 support. · 72ef2e62
      Rene Straub authored
      Changes are:
      - Run ADC on PCLK/16.
      - Verify and optimize timings (ADC_STAB_DELAY_US, ADC_SAMPLETIME_DEFAULT).
      - Add support for STM32H5 VBAT and COREVDD channels on ADC2.
      - Replace ADC constants in machine_adc_locals_dict_table.
      - Convert STM32 literal to channel numbers in adc_config_channel with
        corresponding STM32 LL library functions (__LL_ADC_IS_CHANNEL_INTERNAL(),
        __LL_ADC_CHANNEL_TO_DECIMAL_NB()).
      
      Reasoning for the second last point: the STM32 driver literals are uint32_t
      that don't work with MP_ROM_INT() which handles signed 31 bit integers
      only.  Introduce enumerator machine_adc_internal_ch_t to define external
      channels (0..19), internal channels (256..) and the special channel VREF
      (0xffff).  Values are converted to STM32 literals with adc_ll_channel()
      when required in adc_config_and_read_u16().
      Signed-off-by: default avatarRene Straub <rene@see5.ch>
      72ef2e62
    • Rene Straub's avatar
      64d24fcc
    • Rene Straub's avatar
      stm32/adc: Add support for STM32H5 ADC2 inputs. · 8f9bba0a
      Rene Straub authored
      Select ADC instance based on pin information to support ADC2 inputs.
      Display ADC instance number similar to machine_adc (STM32H5 only):
      <ADC2 on Pin(Pin.cpu.F14, mode=Pin.ANALOG) channel=6>
      Signed-off-by: default avatarRene Straub <rene@see5.ch>
      8f9bba0a
    • Rene Straub's avatar
      stm32/adc: Fix STM32H5 support. · 13cc280e
      Rene Straub authored
      Fixed the preliminary STM32H5 ADC support for pyb.ADC:
      - Run ADC on PCLK/16.
      - Use STM32 ADC library channel literals (__HAL_ADC_DECIMAL_NB_TO_CHANNEL).
      - Use correct temperature conversion for H5 (30C, 130C calibration points).
      Signed-off-by: default avatarRene Straub <rene@see5.ch>
      13cc280e
  4. 21 Sep, 2023 1 commit
  5. 20 Sep, 2023 2 commits