Search code examples
timerarmcortex-m

Different between Systick and Timer in ARM M4


I completed a basic microprocessor with 8051. In this course I learned using a timer to trigger an event. After a semester, I learned programming Embedded System with ARM Cortex M4 (Tiva C launchpad) and started to use Systick to trigger event ( almost used in FreeeRTOS) and sometimes it is used as a timer.

  • I wonder what different between timer and systick? Because sometime I think systick behavior is the same as timer. I have searched the differ, and know: systick is in arm core and timer is of chip vendor.
  • And which situation we should use systick intead of using timer? Please let me know. Thank you.

Solution

  • The reasoning behind this is any OS developer can write code for any Cortex-M which has SysTick, and not need to worry about the vendor specific details. There is a guarantee that SysTick always works the same way across a wide range of devices so there is less low-level porting to be done.

    Same for your course, if you are writing bare metal, you don't need to worry about the device vendor until you use their peripherals (timer, uart, watchdog).