1. 13 Nov, 2019 7 commits
    • Rahix's avatar
      chore: Update CHANGELOG · 87bccda8
      Rahix authored
      87bccda8
    • Rahix's avatar
      feat(utime): Implement ticks_ms() and ticks_us() · 8926fd02
      Rahix authored
      Implement the hal functions necessary for utime.ticks_ms() and
      utime.ticks_us().  This enables much more accurate measurements of time
      taken in Pycardium (useful for profiling).
      
      Please note that the tick counter will reset whenever a new app is
      loaded.
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      8926fd02
    • Rahix's avatar
      fix(menu): Fix UX issues in USB-Mode · 020050f4
      Rahix authored
      Add a short delay after opening USB-Mode to prevent immediate exit which
      happened when pressing the select-button for a very short time.
      
      Also exit the menu-app after exiting USB-Mode to force a reload and thus
      immediately display changes in the apps/ folder.
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      020050f4
    • Rahix's avatar
      fix(pmic): Turn on display before printing · 30ae2751
      Rahix authored
      Fix the display backlight staying off while the pmic task prints its
      messages (power-off/sleep & battery critial).
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      30ae2751
    • fgross's avatar
      feat(pycardium): Enable framebuf module · c27f3fcc
      fgross authored
      The framebuf module provides a framebuffer implementation running purely
      in MicroPython which will increase drawing performance by a lot.  A
      follow-up change will be necessary to connect this framebuffer
      implementation to the display API.
      
      This commit is implements a part of MR !211.
      c27f3fcc
    • Rahix's avatar
      Merge 'Implement proper delays for Pycardium' · 3c1645ce
      Rahix authored
      Closes #177
      
      See merge request card10/firmware!324
      3c1645ce
    • Rahix's avatar
      fix(pycardium): Fix delay implementation · dbeec980
      Rahix authored
      Rewrite the delay implementation to be more accurate and properly handle
      incoming MicroPython interrupts (See issue #177).
      
      For this, the delay is split into two functions:
      
      - systick_delay_precise(): Delay with microsecond accuracy for delays
            less than 1 ms.
      - systick_delay_sleep(): Sleep for a potentially very long time, using
            WFI to put the CPU to sleep.  Whenever the CPU wakes up, this
            function will poll the MicroPython scheduler so it can execute
            pending interrupts.
      
      Ontop, this implementation allows for a future, fast, tick-based
      monotonic time implementation (e.g. mp_hal_ticks_ms).
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      dbeec980
  2. 12 Nov, 2019 1 commit
  3. 11 Nov, 2019 1 commit
  4. 10 Nov, 2019 9 commits
  5. 09 Nov, 2019 4 commits
  6. 03 Nov, 2019 6 commits
    • Rahix's avatar
      chore(fatfs): Port to new mutex API · 86c7418a
      Rahix authored
      Using a bare FreeRTOS mutex is deprecated.  Replace it with the new
      `struct mutex`.  This should increase stability of the module.  In the
      process of switching, also remove the `EPIC_FAT_STATIC_SEMAPHORE` define
      as it is no longer needed with the new mutex API.
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      86c7418a
    • Rahix's avatar
      chore(api-lock): Port to new mutex API · 75278836
      Rahix authored
      Using a bare FreeRTOS mutex is deprecated.  Replace it with the new
      `struct mutex`.  This should increase stability.
      
      Additionally, fix a bug in `lifecycle.c:do_load()` where the function
      would return without unlocking the API mutex if `hardware_reset()`
      returns an error.
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      75278836
    • Rahix's avatar
      chore(sensor-streams): Port to new mutex API · 44ea81f2
      Rahix authored
      Using a bare FreeRTOS mutex is deprecated.  Replace it with the new
      `struct mutex`.  This should increase stability of the module.
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      44ea81f2
    • Rahix's avatar
      chore(lifecycle): Port to new mutex API · cc5f0e29
      Rahix authored
      Using a bare FreeRTOS mutex is deprecated.  Replace it with the new
      `struct mutex`.  This should increase stability of the module.
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      cc5f0e29
    • Rahix's avatar
      feat(epicardium): Add a proper mutex implementation · 9a5a46cd
      Rahix authored
      In the current firmware, different locking mechanisms a littered around
      the code-base.  Among them are bare FreeRTOS mutexes and the hw-locks.
      The callers for these often specify timeouts but don't make much effort
      in A) picking robust values for the timeout and B) recovering gracefully
      from a timeout happening.  Most of the time, we return -EBUSY to _Python
      code_.  This is really really bad API design.  The firmware needs to
      have enough integrity to ensure these situations can't ever occur.
      
      To combat this, add a new locking primitive: The `struct mutex`.  The
      intention is to replace all other locking and synchronization APIs with
      this one.  This will provide one central place to debug any sort of
      locking issues.
      
      The `struct mutex` API is based on a few assumptions about locking.
      Those are detailed in `Documentation/epicardium/mutex.rst`, which is
      part of this commit.  The most important one is:
      
          Locking can **never** fail.
      
      By requiring this to be true, we eliminate the need for drivers to
      contain (often incorrect) logic for dealing with locking fails.  This
      should drastically improve the stability of the firmware in regards to
      lock-related bugs.
      
      This commit does not introduce any functional changes yet.
      Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
      9a5a46cd
    • Rahix's avatar
      Merge 'Super basic ECG log plotter' · c7e40e27
      Rahix authored
      See merge request card10/firmware!333
      c7e40e27
  7. 02 Nov, 2019 2 commits
  8. 23 Oct, 2019 3 commits
  9. 22 Oct, 2019 1 commit
  10. 19 Oct, 2019 3 commits
  11. 18 Oct, 2019 3 commits