This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What are the consequences of using low-frequency GPIO lines with a high-frequency signal?

I have an external clock running at 3Mhz which I'd like to align with in software. Consider this contrived example:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// P0.03 is recommended 10kHz or less, but using for 3Mhz
#define CLOCK_PIN NRF_GPIO_PIN_MAP(0,3)
// P0.19 has no specified maximum frequency, and presumably is appropriate
#define CLOCK_PIN_FAST NRF_GPIO_PIN_MAP(0,19)
void init(){
nrf_gpio_cfg_input(CLOCK_PIN);
}
void align(){
while(!nrf_gpio_pin_read(CLOCK_PIN){};
while(nrf_gpio_pin_read(CLOCK_PIN){};
}
void main(){
init();
int counter = 0;
while(counter < 100000){
align();
counter++;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

What would the consequences be of attempting to read values on a GPIO pin not recommended for such a high frequency? Please disregard that a PPI channel and hardware timer would be more appropriate for this contrived example, I would really just like to know any and all consequences for not following the recommended specification for low-frequency GPIO pins.

Thanks!