1. 05 Oct, 2014 3 commits
  2. 04 Oct, 2014 1 commit
    • Damien George's avatar
      stmhal: Allow pyb.freq() function to change SYSCLK frequency. · 24119176
      Damien George authored
      Eg pyb.freq(120000000) sets the CPU to 120MHz.  The frequency can be set
      at any point in the code, and can be changed as many times as you like.
      Note that any active timers will need to be reconfigured after a freq
      change.
      
      Valid range is 24MHz to 168MHz (but not all freqs are supported).  The
      code maintains a 48MHz clock for the USB at all times and it's possible
      to change the frequency at a USB REPL and keep the REPL alive (well,
      most of the time it stays, sometimes it resets the USB for some reason).
      Note that USB does not work with pyb.freq of 24MHz.
      24119176
  3. 29 Sep, 2014 1 commit
  4. 28 Sep, 2014 1 commit
    • Dave Hylands's avatar
      Fix timer overflow code. · 39296b40
      Dave Hylands authored
      Teensy doesn't need to worry about overflows since all of
      its timers are only 16-bit.
      
      For PWM, the pulse width needs to be able to vary from 0..period+1
      (pulse-width == period+1 corresponds to 100% PWM)
      
      I couldn't test the 0xffffffff cases since we can't currently get a
      period that big in python. With a prescaler of 0, that corresponds
      to a freq of 0.039 (i.e. cycle every 25.56 seconds), and we can't
      set that using freq or period.
      
      I also tested both stmhal and teensy with floats disabled, which
      required a few other code changes to compile.
      39296b40
  5. 25 Sep, 2014 1 commit
  6. 24 Sep, 2014 1 commit
    • Dave Hylands's avatar
      Add pulse_width_percent to teensy. · 53d5fa64
      Dave Hylands authored
      Fix stmhal and teensy print routines to report actual prescaler an period.
      Fix teensy build to use soft-float
      Add USE_ARDUINO_TOOLCHAIN option to teensy build
      53d5fa64
  7. 21 Sep, 2014 1 commit
    • Damien George's avatar
      stmhal: Add pulse_width_ratio to timer channel object. · 0e58c581
      Damien George authored
      This allows to set the pulse width (for PWM mode) as a ratio relative to
      the period of the timer.  Eg, 0.5 is a 50% duty cycle.  You can set the
      ratio in the channel init, or using channel.pulse_width_ratio; the
      latter can also read the pulse width as a ratio.
      0e58c581
  8. 19 Sep, 2014 1 commit
  9. 29 Aug, 2014 1 commit
  10. 13 Aug, 2014 1 commit
  11. 03 Jul, 2014 1 commit
  12. 02 Jul, 2014 1 commit
  13. 30 Jun, 2014 1 commit
  14. 19 Jun, 2014 1 commit
  15. 03 May, 2014 2 commits
  16. 02 May, 2014 1 commit
  17. 26 Apr, 2014 2 commits
  18. 21 Apr, 2014 2 commits
  19. 16 Apr, 2014 1 commit
    • Damien George's avatar
      stmhal: Improve flash storage cache management. · 6d983539
      Damien George authored
      Internal flash used for the filesystem is now written (from the cache)
      only after a 5s delay, or when a file is closed, or when the drive is
      unmounted from the host.  This delay means that multiple writes can
      accumulate in the cache, and leads to less writes to the flash, making
      it last longer.
      
      It's implemented by a high-priority interrupt that takes care of flash
      erase and write, and flushing the cache.
      
      This is still only an interim solution for the flash filesystem.  It
      eventually needs to be replaced with something that uses less RAM for
      the cache, something that can use more of the flash, and something that
      does proper wear levelling.
      6d983539
  20. 15 Apr, 2014 1 commit
  21. 05 Apr, 2014 1 commit
  22. 02 Apr, 2014 1 commit