2013-05-26 05:08 PM
Hi all,
I need to meassure duration in milliseconds of some process during my program execution. For Arduino the millis() function exists in library but I've found nothing simillar in the STM32 Standard library. How can I (by the simplest way) derive the ms count from any of the system clock? Or do I need to use one of the timers to get duration of the process? Provide me with an example, please, if possible... Thank you in advance :)2013-05-26 06:12 PM
Look at using DWT_CYCCNT to read ticks of the processor core.
[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/compensating%20latencies%20on%20STM32F4%20interrupts&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=800]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2Fcompensating%20latencies%20on%20STM32F4%20interrupts&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=800