What is the max frequency i can use on a pin to connect gpiote with ppi to a timer as counter (nrf52)?
What is the max frequency i can use on a pin to connect gpiote with ppi to a timer as counter (nrf52)?
Hi,
For an edge to be detected correctly the signal has to have had the opposite value for at least 3 x 16 MHz clock periods for the logic to be ready for the next edge. So if you are counting e.g. rising edges your input will have to stay low for at least three 16 MHz periods between each edge. Then the input has to stay high for at least 1 more period to register. This sums up to a theoretical max frequency of 16 MHz / 4 = 4 MHz. Note that this is under ideal conditions and requires your HF clock to be running at all times and that your signal has a 25% duty-cycle. If you are counting while in System OFF mode you will have to factor in startup times for the clock. If you have e.g. a 50% duty-cycle then max frequency will be 16 MHz / (3 low periods + 3 high periods) = 2.67 MHz. Refer to the electrical specifications.
HI! i am using a simple code to count the pwm (500Hz max) HITLO edges via GPIOTE . But, at high frequencies, the GPIOTE is counting more edges that it should... Why this is happenning?