1. 30 Jan, 2017 2 commits
  2. 27 Jan, 2017 1 commit
    • Damien George's avatar
      stmhal: Convert to use VFS sub-system and new ooFatFs component. · 84c614e7
      Damien George authored
      This patch makes the following configuration changes:
      - MICROPY_FSUSERMOUNT is disabled, removing old mounting infrastructure
      - MICROPY_VFS is enabled, giving new VFS sub-system
      - MICROPY_VFS_FAT is enabled, giving uos.VfsFat type
      - MICROPY_FATFS_OO is enabled, to use new ooFatFs lib, R0.12b
      
      User facing API should be almost unchanged.  Most notable changes are
      removal of os.mkfs (use os.VfsFat.mkfs instead) and pyb.mount doesn't
      allow unmounting by passing None as the device.
      84c614e7
  3. 22 Dec, 2016 1 commit
  4. 02 Dec, 2016 1 commit
    • Jean-François Milants's avatar
      stmhal/sdcard: Clean/invalidate cache before DMA transfers with SD card. · 08bd7d1d
      Jean-François Milants authored
      Add 2 macros in mphalport.h that clean and invalidate data caches only on
      STM32F7 MCUs.  They are needed to ensure the cache coherency before/after
      DMA transferts.
      
      * MP_HAL_CLEANINVALIDATE_DCACHE cleans and invalidate the data cache. It
        must be called before starting a DMA transfer from the peripheral to the
        RAM memory.
      
      * MP_HAL_CLEAN_DCACHE cleans the data cache.  It must be called before
        starting a DMA transfert from the RAM memory to the peripheral.
      
      These macros are called in sdcard.c, before reading from and writing to
      the SDCard, when DMA is used.
      08bd7d1d
  5. 07 Nov, 2016 1 commit
  6. 29 Jun, 2016 1 commit
  7. 13 May, 2016 1 commit
  8. 06 May, 2016 1 commit
  9. 05 May, 2016 1 commit
    • Tobias Badertscher's avatar
      stmhal: L4: Adapt DMA to be able to support STM32L4 MCU series. · e64032d6
      Tobias Badertscher authored
      The main thing is to change the DMA code in a way that the structure
      DMA_Stream_TypeDef (which is similar to DMA_Channel_TypeDef on stm32l4)
      is no longer used outside of dma.c, as this structure only exists for the
      F4 series.  Therefore I introduced a new structure (dma_descr_t) which
      handles all DMA specific stuff for configuration.  Further the periphery
      (spi, i2c, sdcard, dac) does not need to know the internals of the dma.
      e64032d6
  10. 10 Feb, 2016 3 commits
  11. 22 Dec, 2015 1 commit
    • Damien George's avatar
      stmhal: Add pyb.irq_stats() to get statistics about IRQ calls. · 401af50d
      Damien George authored
      Adds a lot of code, makes IRQs a bit less efficient, but is very useful
      for debugging.  Usage: pyb.irq_stats() returns a memory view that can be
      read and written, eg:
      
          list(pyb.irq_stats())
          pyb.irq_stats()[0]
          pyb.irq_stats()[0] = 0
      
      The patch provides general IRQ_ENTER() and IRQ_EXIT() macros that can be
      modified to provide further IRQ statistics if desired.
      401af50d
  12. 04 Dec, 2015 1 commit
    • Damien George's avatar
      stmhal: Protect SD card DMA transactions against USB MSC contention. · f4c17378
      Damien George authored
      Consider the following scenario: SD card is being read by pyboard; USB
      irq comes in for MSC read request; SD card needs to be read from within
      USB irq while SD read is already ongoing.  Such contention needs to be
      avoided.
      
      This patch provides a simple solution, to raise the irq priority above
      that of the USB irq during SD DMA transfers.  Pyboard and PC can now
      read from the SD card at the same time (well, reads are interleaved).
      f4c17378
  13. 24 Nov, 2015 2 commits
  14. 30 Oct, 2015 1 commit
  15. 11 Oct, 2015 1 commit
  16. 29 Jul, 2015 1 commit
  17. 20 Mar, 2015 1 commit
  18. 27 Feb, 2015 1 commit
  19. 01 Jan, 2015 1 commit
  20. 19 Oct, 2014 1 commit
    • Damien George's avatar
      stmhal: Add retry to SD card init. · 072bd07f
      Damien George authored
      This fixed an issue with a certain SD card sometimes not initialising
      first time round.  See issue #822 for related, and thanks to
      @iabdalkader for the idea.
      072bd07f
  21. 15 Sep, 2014 2 commits
  22. 25 Aug, 2014 1 commit
  23. 07 Jul, 2014 1 commit
  24. 06 Jul, 2014 1 commit
  25. 28 Jun, 2014 1 commit
  26. 03 May, 2014 1 commit
    • Damien George's avatar
      Add license header to (almost) all files. · 04b9147e
      Damien George authored
      Blanket wide to all .c and .h files.  Some files originating from ST are
      difficult to deal with (license wise) so it was left out of those.
      
      Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
      04b9147e
  27. 17 Apr, 2014 1 commit
  28. 30 Mar, 2014 3 commits
    • Damien George's avatar
      Merge map.h into obj.h. · df6567e6
      Damien George authored
      Pretty much everyone needs to include map.h, since it's such an integral
      part of the Micro Python object implementation.  Thus, the definitions
      are now in obj.h instead.  map.h is removed.
      df6567e6
    • Damien George's avatar
      Rename rt_* to mp_*. · d17926db
      Damien George authored
      Mostly just a global search and replace.  Except rt_is_true which
      becomes mp_obj_is_true.
      
      Still would like to tidy up some of the names, but this will do for now.
      d17926db
    • Damien George's avatar
      stmhal: Unify naming of HW config; make SD detect configurable. · 09d20778
      Damien George authored
      All board config macros now begin with MICROPY_HW_.
      
      Renamed PYBv10 to PYBV10, since macros should be all uppercase.
      
      Made SDCARD_DETECT configurable in mpconfigport.h, so that the SD
      detect pin can be easily configured.
      09d20778
  29. 26 Mar, 2014 2 commits
    • Damien George's avatar
      Remove mp_obj_type_t.methods entry and use .locals_dict instead. · 9b196cdd
      Damien George authored
      Originally, .methods was used for methods in a ROM class, and
      locals_dict for methods in a user-created class.  That distinction is
      unnecessary, and we can use locals_dict for ROM classes now that we have
      ROMable maps.
      
      This removes an entry in the bloated mp_obj_type_t struct, saving a word
      for each ROM object and each RAM object.  ROM objects that have a
      methods table (now a locals_dict) need an extra word in total (removed
      the methods pointer (1 word), no longer need the sentinel (2 words), but
      now need an mp_obj_dict_t wrapper (4 words)).  But RAM objects save a
      word because they never used the methods entry.
      
      Overall the ROM usage is down by a few hundred bytes, and RAM usage is
      down 1 word per user-defined type/class.
      
      There is less code (no need to check 2 tables), and now consistent with
      the way ROM modules have their tables initialised.
      
      Efficiency is very close to equivaluent.
      9b196cdd
    • Damien George's avatar
      Change mp_method_t.name from const char * to qstr. · c12b2213
      Damien George authored
      Addresses issue #377.
      c12b2213
  30. 17 Mar, 2014 1 commit