HI, I have a question about the eTimer module , I use the eTimer module to measure PWM signal, to measure the frequency ,period , pulseH and pulseL ,.
here is the questions:
1. If I set ONESHOT bit to 0, which means that the counter is in free running mode, will the capture still continue when the ICF2/1 (Input Capture 2/1 Flag) is set ?
2. If I set ONESHOT bit to 1, which menas that the counter is one shot capture mode , and i still set the CFWM(Capture FIFO Water Mark) to 1 , will the capture register to capture twice before the ICF2/1 (Input Capture 2/1 Flag) is set ?
Regards,
meng
Solved! Go to Solution.
Hello,
1. If I set ONESHOT bit to 0, which means that the counter is in free running mode, will the capture still continue when the ICF2/1 (Input Capture 2/1 Flag) is set ?
Yes
2. If I set ONESHOT bit to 1, which means that the counter is one shot capture mode , and i still set the CFWM(Capture FIFO Water Mark) to 1 , will the capture register to capture twice before the ICF2/1 (Input Capture 2/1 Flag) is set ?
When ONESHOT is set to 1, eTimer is waiting for one edge and then it is stole.
When watermark is set to 1, flag is set after second edge. But the second edge will occur only if you again start capture via ARM bit, because you have one shot mode.
regards,
Peter
Hello,
1. If I set ONESHOT bit to 0, which means that the counter is in free running mode, will the capture still continue when the ICF2/1 (Input Capture 2/1 Flag) is set ?
Yes
2. If I set ONESHOT bit to 1, which means that the counter is one shot capture mode , and i still set the CFWM(Capture FIFO Water Mark) to 1 , will the capture register to capture twice before the ICF2/1 (Input Capture 2/1 Flag) is set ?
When ONESHOT is set to 1, eTimer is waiting for one edge and then it is stole.
When watermark is set to 1, flag is set after second edge. But the second edge will occur only if you again start capture via ARM bit, because you have one shot mode.
regards,
Peter