1. 04 8月, 2018 1 次提交
    • D
      stm32/adc: Disable VBAT in read channel helper function. · c62b2309
      Damien George 提交于
      Prior to this patch, if VBAT was read via ADC.read() or
      ADCAll.read_channel(), then it would remain enabled and subsequent reads
      of TEMPSENSOR or VREFINT would not work.  This patch makes sure that VBAT
      is disabled for all cases that it could be read.
      c62b2309
  2. 03 8月, 2018 3 次提交
  3. 02 8月, 2018 2 次提交
    • D
      py: Fix compiling with debug enabled and make more use of DEBUG_printf. · b630dfcc
      Damien George 提交于
      DEBUG_printf and MICROPY_DEBUG_PRINTER is now used instead of normal
      printf, and a fault is fixed in mp_obj_class_lookup with debugging enabled;
      see issue #3999.  Debugging can now be enabled on all ports including when
      nan-boxing is used.
      b630dfcc
    • D
      py/mpconfig.h: Introduce MICROPY_DEBUG_PRINTER for debugging output. · da2d2b6d
      Damien George 提交于
      This patch in effect renames MICROPY_DEBUG_PRINTER_DEST to
      MICROPY_DEBUG_PRINTER, moving its default definition from
      lib/utils/printf.c to py/mpconfig.h to make it official and documented, and
      makes this macro a pointer rather than the actual mp_print_t struct.  This
      is done to get consistency with MICROPY_ERROR_PRINTER, and provide this
      macro for use outside just lib/utils/printf.c.
      
      Ports are updated to use the new macro name.
      da2d2b6d
  4. 01 8月, 2018 6 次提交
    • S
      nrf: Correct index checking of ADC/PWM/RTCounter instances. · 0c161691
      Stig Bjørlykke 提交于
      Avoid trying to use ADC, PWM and RTCounter instances which is
      one past last available, because this will give a HardFault.
      0c161691
    • S
      nrf: Enable all PWM, RTC and Timer instances for nrf52840. · 7f0c5f2e
      Stig Bjørlykke 提交于
      The NRF52 define only covers nrf52832, so update the define checks
      to use NRF52_SERIES to cover both nrf52832 and nrf52840.
      
      Fixed machine_hard_pwm_instances table in modules/machine/pwm.c
      
      This enables PWM(0) to PWM(3), RTCounter(2), Timer(3) and Timer(4),
      in addition to NFC reset cause, on nrf52840.
      7f0c5f2e
    • S
      nrf/uos: Add mbfs __enter__ and __exit__ handlers. · b6e49da4
      Stig Bjørlykke 提交于
      This will make 'with open('file', 'r') as f:' work by properly close
      the file after the suite is finished.
      b6e49da4
    • R
      tools/mpy-tool: Set sane initial dynamic qstr pool size with frozen mods · 6e5a40cf
      Rich Barlow 提交于
      The first dynamic qstr pool is double the size of the 'alloc' field of
      the last const qstr pool. The built in const qstr pool
      (mp_qstr_const_pool) has a hardcoded alloc size of 10, meaning that the
      first dynamic pool is allocated space for 20 entries. The alloc size
      must be less than or equal to the actual number of qstrs in the pool
      (the 'len' field) to ensure that the first dynamically created qstr
      triggers the creation of a new pool.
      
      When modules are frozen a second const pool is created (generally
      mp_qstr_frozen_const_pool) and linked to the built in pool. However,
      this second const pool had its 'alloc' field set to the number of qstrs
      in the pool. When freezing a large quantity of modules this can result
      in thousands of qstrs being in the pool. This means that the first
      dynamically created qstr results in a massive allocation. This commit
      sets the alloc size of the frozen qstr pool to 10 or less (if the number
      of qstrs in the pool is less than 10). The result of this is that the
      allocation behaviour when a dynamic qstr is created is identical with an
      without frozen code.
      
      Note that there is the potential for a slight memory inefficiency if the
      frozen modules have less than 10 qstrs, as the first few dynamic
      allocations will have quite a large overhead, but the geometric growth
      soon deals with this.
      6e5a40cf
    • D
      stm32/modmachine: Get machine.sleep working on L4 MCUs. · 5482d846
      Damien George 提交于
      When waking from stop mode most of the system is still in the same state as
      before entering stop, so only minimal configuration is needed to bring the
      system clock back online.
      5482d846
    • D
      c1234870
  5. 31 7月, 2018 4 次提交
    • D
      docs: Move WiPy specific Timer class to separate doc file. · d8e03204
      Damien George 提交于
      The WiPy machine.Timer class is very different to the esp8266 and esp32
      implementations which are better candidates for a general Timer class.  By
      moving the WiPy Timer docs to a completely separate file, under a new name
      machine.TimerWiPy, it gives a clean slate to define and write the docs for
      a better, general machine.Timer class.  This is with the aim of eventually
      providing documentation that does not have conditional parts to it,
      conditional on the port.
      
      While the new docs are being defined it makes sense to keep the WiPy docs,
      since they describe its behaviour.  Once the new Timer behaviour is defined
      the WiPy code can be changed to match it, and then the TimerWiPy docs would
      be removed.
      d8e03204
    • D
      21dae877
    • D
      stm32/rtc: Get rtc.wakeup working on F0 MCUs. · 9dfbb6cc
      Damien George 提交于
      The problem was that the EXTI line for the RTC wakeup event is line 20 on
      the F0, so the interrupt was not firing.
      9dfbb6cc
    • D
      py/asmthumb: Optimise native code calling runtime glue functions. · 1e3a7f56
      Damien George 提交于
      This patch makes the Thumb-2 native emitter use wide ldr instructions to
      call into the runtime, when the index into the native glue function table
      is 32 or greater.  This reduces the generated assembler code from 10 bytes
      to 6 bytes, saving RAM and making native code run about 0.8% faster.
      1e3a7f56
  6. 30 7月, 2018 4 次提交
  7. 27 7月, 2018 1 次提交
  8. 23 7月, 2018 6 次提交
  9. 20 7月, 2018 13 次提交