What is the maximum theoretical GPIO sample speed when by reading the GPIO pin level registers directly (e.g. GPLEV0)?
I've been playing around with Circle a C++ bare metal programming environment for the Raspberry Pi by rst (there is a post about it in this forum) and one of the examples (https://github.com/rsta2/circle/tree/ma ... -gpioclock) samples the GPIO register as fast as possible and manages a speed of ~10MHz. Searching around on the internet suggests that this is a typical maximum speed others have achieved. Why is this?
- The system clock runs at 250MHz so this would suggest ~25 clock cycles per read. Does this sound reasonable?
- Is it possible that the GPIO are running on a slower clock?
- Is it possible that the speed is dependent on which other resources are being used, e.g. USB, SPI, DMA, UART?