1. 22 Aug, 2016 1 commit
    • Dave Hylands's avatar
      stmhal: Fix timer capture/compare interrupt handling for TIM1 and TIM8. · c6983e3c
      Dave Hylands authored
      It turns out that TIM1 and TIM8 have their own Capture/Compare
      interrupt vector. For all of the other timers, the capture/compare
      interrupt vector is the same as the update vector.
      
      So we need to add handlers for these vectors and enable them
      when using capture/compare callbacks.
      
      During testing of this, I also found that passing a channel callback
      into the channel constructor would not enable interrupts properly.
      
      I tested using:
      ```
      >>> pyb.Timer(1, freq=4).channel(1, pyb.Timer.OC_TOGGLE, callback=lambda t: print('.', end=''))
      ```
      I tested the above with channels 1, 4, and 8
      c6983e3c
  2. 20 Aug, 2016 1 commit
  3. 19 Aug, 2016 2 commits
  4. 17 Aug, 2016 10 commits
  5. 16 Aug, 2016 1 commit
  6. 15 Aug, 2016 7 commits
  7. 14 Aug, 2016 3 commits
  8. 13 Aug, 2016 1 commit
  9. 12 Aug, 2016 5 commits
  10. 11 Aug, 2016 2 commits
    • Tobias Badertscher's avatar
      stmhal/adc.c: Get ADC working on STM32L4 MCUs. · af9889f9
      Tobias Badertscher authored
      Fixing Issue #2243. Main problems were:
      
      - HAL_ADC_GetState(adcHandle) may return other bits set (not only
        HAL_ADC_STATE_EOC_REG) when called - so I AND-ed it out as proposed by
        mattbrejza in Issue #2243.
      - ADC Pin has to be configured as GPIO_MODE_ANALOG_ADC_CONTROL not only
        GPIO_MODE_ANALOG.
      - Resolved ADC resolution L4 specific (Use L4 define ADC_RESOLUTION_12B).
      - Changed setting of Init.EOCSelection toADC_EOC_SINGLE_CONV for L4.
      - Added call to ADC_MultiModeTypeDef as this is done on a STM32Cube
        generated project too.
      - Clean up: Configuration of ADC is done only in ONE function not the same
        is done in two functions.
      
      Test is done on PA5 pin of STM32L4Discovery-Kit which is connected to the
      DOWN button.
      
      Thanks to mattbrejza for discovering the bug.
      af9889f9
    • Damien George's avatar
      stmhal/boards: Update STM32L476 pin defs to include ADC channels. · dfb81440
      Damien George authored
      This patch introduces proper ADC Pin definitions in stm32l476_af.csv.
      Originally provided by @tobbad.
      dfb81440
  11. 10 Aug, 2016 5 commits
  12. 09 Aug, 2016 2 commits