⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
Anonymous (not verified)
systick timer question

Is it okay to use systick timer in my application? I want to know whether the kernel can reset the systick timer or not?
Also am I correct in understanding if one part of my app starts a timer(any timer pwm or systick) it is possible for another module/part of my app to access and reset it? or is this just with the systick timer.

Test case:
one my test code uses systick timer to initiate a lcd being slowly ramp up its contrast, this works by setting an interval and at each interval a function is called by systick_register_callback to ramp-up the contrast. It usually works fine until i added another test code to blink leds using the systick timer right after the lcd function is called. overrides the lcd call back function so nothing happens on the lcd.

Thanks,
Mutahir

Device:
MT_dialog
Offline
Last seen:3 months 1 day ago
工作人员
加入:2015-06-08 11:34
Hi mutahir,

Hi mutahir,

Yes you can use the systick timer, the kernel has nothing to do with systick timer. The systick timer is a timer provided by the M0 and also when the 580 falls to sleep the systick timer will also be disabled. If you would like to keep time while sleeping you can use the kernel timers with 10ms granularity. Regarding the starting and stoping a timer i dont see any problem in doing that. The kernel that the 580 has, handles only the BLE events, it doesn't provide mutexes or semaphores in order to allow or deny access to a peripheral, you just start a timer and at some point of time you stop it regardless if the stop function is invoked by a different TASK.

我不该让你测试用例布鲁里溃疡t if two things access the systick timer at the same time i suppose that this is expected.

Thanks MT_dialog

mutahir (not verified)
Hi,

Hi,
Thank you very much for the explanation.
Yes in my test case the callback function was being changed by the other module; so it was expected.
Thanks for your help in this.
Warm Regards,
Mutahir