Added systick implementation and sleep