2015-01-21 02:57 AM
Hi
I want to implement delay function using timer , as this has to be used with RTOS interrupt method is preffered and the Delay can vary from 500Microsec to 5.6Millisec. And this will be called at many location in the code the timer has to be restated again. I have created a program to achieve the same but not able to restart the Timer . Somebody please guide/tutor me about how to achive stop timer and restart it again?? I'm using STM32F2 ..... #stm32f4 #discovery #stm32f2 #timers2015-01-21 04:49 AM
Interrupting at 1us is problematic. This has been covered repeatedly.
Not sure you need to keep stopping/starting. If you must interrupt, consider a free running 32-bit timer where you advance or use multiple compare registers. For brief delays, just use a free running timer or DWT_CYCCNT, and wait for a prescribed number of cycles, at 1us (1MHz) or faster.