Hello,
At the moment I’m trying to get the fasted blinking led as possible.
I have already used to example provided by you (link) to acces the GPIO. This resulted in a roughly 200 kHz refresh cycle. But if possible I want an even faster GPIO because I want to address multiple GPIO’s within a certain amount of time.
On the internet I read that some using a iMX6D in Linux achieved different speeds with different kind of routines. This where his measurements:
- Using sysfs (bash/c) [userspace]: ~3500Hz (own measurement ~200kHz)
- calling /dev/mem using mmap [userspace]: ~800kHz
- using gpio.h in a simple kernel module [kernelspace]: ~280kHz
- ioremap() with writel [kernelspace] : ~1.6MHz
- ioremap() with pointers [kernelspace]: ~5.5MHz
So I have already test the first statement and got ~200 kHz for 1 GPIO. At the moment I’m trying statement 2. I get some values in return (how to do this I got from other forums, but most of the time they are doing the same) but not yet the ones I’m looking for as stated in the datasheet of the iMX6 (yes I have gone through the ~4000 of part 1).
So my question is, is it even possible to address the GPIO in any of the other statements except statement 1 (becuase this already works)?
I will be premature in saying this but I know how to use registers on the processor level and that a bit shift left or right can be disastrous.
ps. I’m using an Apalis iMX6Q with 2GB with Linux running on it.
Any information will be very welcome.
Kind regards,
Remco