3 Replies Latest reply on Apr 13, 2017 8:43 AM by epr_1639216

    HOW TO GET "SysTick" Value




      I am working on BLE MIDI project using 042-BLE-A kit and needed to implement 13 bit time stamp whenever BLE packet sent per the protocol but it is working well though by just increasing like timeStamp++. But wanted to get actual time stamp using systick timer value every 100us by calling below function. I don't need interrupt.


      static uint16 getTimeStamp(void)
          return timeStamp = ~(CySysTickGetValue());




      To do that I added below line in main.c to start SysTick Timer.




      CySysTickSetReload(2400); //by CY_BOOT_Component v5.5 p98; Sysytem clock(Hz) x desired interrupt interval(us)




      But after changing my firmware, BLE connection is not recognized.


      So I deleted the last three lines then BLE connection works and found the CySysTickEnable() was blocking the BLE connection at least.


      Can anyone explain why it happens and how to get SysTick value flawlessly......? Or Should I use a Timer component...?