I have an external clock running at 3Mhz which I'd like to align with in software. Consider this contrived example:
// 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++; } }
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!