3

Goodmorning,

i've found out that in a kernel module gpio_set_value and gpio_get_value are very slow (60 useconds). According to this site, http://codeandlife.com/2012/07/03/benchmarking-raspberry-pi-gpio-speed/ it's possible to access gpio in less than 75 nanoseconds...consider that in the kernel module i've disabled interrupts, so it should not care about the other processes... I've found a guide about accessing gpio using memory registers.

http://elinux.org/RPi_Low-level_peripherals#C

Do you have any idea about how to use this code in a kernel module? Thnaks in advance.

1

the kernel module does exactly same thing, maps the memory and writes to a predefined addresses, but when you factor in the system call processing, context switch latency and consider the other processes running on the same system, 60uS does not seem "very slow".

if you can elaborate what's your goal, you might get better answers.

  • You are right, it was an errore in the measure of latency...the time response is about 120 nanoseconds – Flavio Barisi Aug 2 '13 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.