2009-07-03 01:23 AM
Chronometer
2011-05-17 04:16 AM
Hi,
I want to measure the execution time of a function. I want make something like that: int main(){ start Timer1; /*--- Measured function(s); ---*/ t = TIMER1_CNT; } Someone knows the solution witch takes the less space of ROM ? Have a good day.2011-05-17 04:16 AM
I don't find the good functions,
I try: { #include ''stm32f1Ox_lib.h'' #include ''stm32f1Ox_conf.h'' TIM1_SetCounter(); t=TIM1_GetCounter(); } but build is failed becaude of File truncated ??? I don't see how to use a TIMER, and why the file is truncated. Normally, when the Timer start this is the register TIME1_CNT which stock the value ?2011-05-17 04:16 AM
Move your #include lines outside of your function, and keep on studying. Good luck!
2011-05-17 04:16 AM
Hi,
I re-ask my question : 1) What is the command to put 0x01 in the Control_Register_1 of Timer1 without use functions ? 2) Counter (CNT), TIM_CNT is the register where the value of the number of clock hits, is stocked ? It always up afeter enable counter ? Thanks.