TI E2E Community
Hercules™ Safety Microcontrollers
Hercules™ Safety Microcontrollers Forum
How to create a timer without using interrupts?
I am looking for a way to keep track of time while interrupts are disabled. I am using the Flash-API to program some data and it is advised to disable all interrupts during this time. Since this can take a long time, I still need to feed the watchdog. I can't use the API-Function to trigger the watchdog since it only has an upper boundary. My watchdog on the other hand has to be called within a time-window with lower and upper boundaries.
Is there a good way to do this?
You might wish to take a look at the Performance Monitoring Unit (PMU) embedded inside the Cortex R4 CPU. The PMU has a free-running cycle counter as well as three user selectable event counters. The CPU has internal event notification of cycles inside an exception handler, which could be very helpful in your situation. Access is done via CP15 coprocessor instructions so the timers have very low latency.
Thank you, this suggestion works very nicely.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.