Posted on June 14, 2018 at 07:38The original post was too long to process during our migration. Please click on the attachment to read the original post.
If I understand correctly, you are trying to count pulses of the measured signal in TIM2, gated by TIM21, set to 1 second period, correct?
As TIM2 is 16-bit only in 'L0, this cannot work higher than up to 65.535kHz. The demo you are mentioning, hasn't it been demonstrated on a different STM32 model?
You have to change your approach. There are many ways to do that. One of them is described here:
Thank you so much for the response. I know that the counter is only 16-bit. I can measure proper values upto 65KHz. After this, my OLED display shows me the overflow. This continues upto 72Khz. After this value, the frequency directly goes to 0. It does not record anything. That is what is confusing me.