How can I measure the time simple and effective between 2 events in the task(data receiving by MailBox semaphore) using PIT module(may be by reading register and without interrupt). I work on uCos 2, MOD5270.
Thanks in advance
Alexander
How to measure time on uCOS-2, MOD5270 board
Re: How to measure time on uCOS-2, MOD5270 board
You can use the HiResTimer utility. It uses the 32-bit DMA timers to perform stop watch functions.
-Dan
-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: How to measure time on uCOS-2, MOD5270 board
Thanks, I tried, it works perfectly
Earlier, I already implemented such measuring by PIT timers re-scaling, but these timers should be occupied by another services in the project. So, DMA Timers APIs is the solution !
Earlier, I already implemented such measuring by PIT timers re-scaling, but these timers should be occupied by another services in the project. So, DMA Timers APIs is the solution !
Re: How to measure time on uCOS-2, MOD5270 board
Hello, Dan
DMA Timers APIs work properly except one thing.
When I try to stop timer(exactly as in the example) using 2 functions
timer->stopClear();
timer->clearInterruptFunction();
the system crashes. Do you have any idea about it ?
Thanks in advance
DMA Timers APIs work properly except one thing.
When I try to stop timer(exactly as in the example) using 2 functions
timer->stopClear();
timer->clearInterruptFunction();
the system crashes. Do you have any idea about it ?
Thanks in advance
Re: How to measure time on uCOS-2, MOD5270 board
If your only using the timer for timing, you don't need to 'clearInterruptFunction's. I'm not entirely certain what would happen if you used that call without first setting one, but even then it shouldn't be causing you to crash. Are you sure that you have a valid timer handle? (aka, the pointer isn't NULL)
-Dan
-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc