Skip to content
Snippets Groups Projects
  1. Oct 18, 2021
    • Federico's avatar
      Reverted main.cpp as in testing branch · 764ebef0
      Federico authored
      764ebef0
    • Federico's avatar
      Cleaned up main.cpp · e06c1dce
      Federico authored
      e06c1dce
    • Sasan Golchin's avatar
      Aperiodic Timer - Tickless Kernel · c01b066d
      Sasan Golchin authored and Federico's avatar Federico committed
      
      The kernel's API has been amended such that the periodic context
      switch works along with exact awakening of the sleeping threads:
      
      1) SleepData is not in terms of kernel's tick anymore but directly
      in terms of context switch timer tick.
      2) Sleeping threads are being awakened in the time they have requested
      rather than just waiting for the context switch to happen.
      3) Three functions are added to the kernel's API:
      -tickSleepUntil(tick) which is private to the kernel and is the main
      reference of other sleep functions of a thread and it's implemented as
      an inline function to keep both maintainability and efficiency
      -Thread::nanoSleep
      -Thread::nanoSleepUntil
      
      4) Besides sleep functions, the following functions has been updated
      in order to keep the timer interrupt sync with the head of the sleeping
      list.
      I'm not sure about this being correct and it may have some conflicts
      with the scheduler's policy:
      -IRQwakeThreads: After removing the head of the sleeping list, the next
      interrupt should be set to the head again! Another change in this
      is that it does not expect the exact equivalence between timer's tick
      and wakeup_time as when the kernel reaches that particular point the
      timer's tick has already passed the wakeup_time.
      -IRQaddToSleepingList: Due to the change in order of items in the
      sleeping list, the interrupt should be set again.
      
      5) Constructor and Interrupt handler of the context switch timer has
      been amended in order to put the next context switch time as a record
      in the sleeping list.
      
      As the meaning of tick in sleep functions has been changed, the
      test suit does not work properly with option t anymore but some critical
      tests has been done on the current state of the project and everything
      seems to work fine but some optimizations are needed specially in the
      case that the time window between items in the list is very short.
      
      Signed-off-by: default avatarSasan Golchin <ahmad.golchin@mail.polimi.it>
      Signed-off-by: default avatarTerraneo Federico <fede.tft@miosix.org>
      c01b066d
    • Sasan Golchin's avatar
      Context Switch Timer Interface · f5fcbad3
      Sasan Golchin authored and Federico's avatar Federico committed
      
      A generic interface miosix::ContextSwitchTimer has been added to the
      kernel that can play the role of either periodic/aperiodic system timer.
      Like other kernel interfaces, there should be provided a proper
      implementation for cstimer.
      
      Currently the only available implementation is done for cortexM4_stm32f
      which is based on TIM2 timer. Although the implementation is an
      aperiodic timer, it is set to act like a periodic timer with T=1ms.
      
      Signed-off-by: default avatarSasan Golchin <ahmad.golchin@mail.polimi.it>
      Signed-off-by: default avatarTerraneo Federico <fede.tft@miosix.org>
      f5fcbad3
    • Sasan Golchin's avatar
      TIM2 is a 32-bit Timer/Counter with 4 Compare/Capture channels. · d567da4c
      Sasan Golchin authored and Federico's avatar Federico committed
      In this subproject, an 64 bit apriodic timer is created based on
      TIM2 in which the overflow is managed automatically and the user
      is able to set checkpoints (in terms of timer ticks) to fire IRQ.
      
      An expected usecase is the use this driver as the context switch
      tool for the kernel.
      There might be some errors in which overflows/checkpoints are not
      managed correctly that will be OK asap.
      
      Signed-off-by: default avatarsasan_golchin <ahmad.golchin@mail.polimi.it>
      
      Signed-off-by: default avatarsasan_golchin <ahmad.golchin@mail.polimi.it>
      Signed-off-by: default avatarTerraneo Federico <fede.tft@miosix.org>
      d567da4c
  2. Jul 14, 2013
  3. Jul 07, 2013
  4. Jun 09, 2013
  5. Jan 08, 2013
  6. Dec 17, 2012
  7. May 05, 2012
  8. May 03, 2012
  9. May 02, 2012
  10. Apr 22, 2012
  11. Apr 18, 2012
  12. Apr 06, 2012
  13. Mar 26, 2012
  14. Mar 22, 2012
  15. Mar 21, 2012
  16. Mar 20, 2012
  17. Mar 16, 2012
  18. Mar 14, 2012
  19. Dec 09, 2011
  20. Dec 30, 2010
  21. Dec 28, 2010
  22. Dec 27, 2010
  23. Dec 16, 2010
Loading