2014-12-04 02:34 AM
Hello Everyone ;
I am trying to learn the time elapsed for FIR filter with 100 taps in stmd32f407 ; we use keil ; we use simulator of keil in Xtal region should we put the CPU speed clock or the external clock for example in our board we use 8MHZ but we run at speed 168MHZ ; does the keil simiulation time is near to real World? any other way to learn the elapsed time of a function in real time ? that is important and critical for us . Thank you Hector2014-12-04 04:42 AM
The functionality afforded by the Keil simulator is a bit sketchy, especially with PLL/clock settings, you could benchmark speed and extrapolate.
On real systems frankly the easiest method is to use the cycle counter (CYCCNT) in the Data-Watchpoint-Trace (DWT).http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337h/BABJFFGJ.html
[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Duration%20of%20FLOAT%20operations&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=4289]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FDuration%20of%20FLOAT%20operations&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=42892014-12-04 06:43 AM
2014-12-04 06:54 AM
DWT_CYCCNT runs directly at the processor's clock, which in 'F4xx is equal to HCLK, your system clock, 168MHz. I.e. you divide the cycle count by 168, and the result is execution time in microseconds.
OTOH, if you will have active interrupts, and/or significant DMA traffic, the results may differ. JW2014-12-07 10:58 AM