VoCore, Micropython, more Blinking

Lately I measured the maximum frequency I could get out of the VoCore by toggling a GPIO as fast as possible using various approaches. Today I wrote a simple Kernel module which allows me to set/clear a GPIO through IOCTL. Also I created a FFI binding to IOCTL for micropython and the usual test program for toggling the pin. And, no surprise, this is the fastest I was able to get so far from user space and micropython: 9kHz (remember, pure Kernel implementation was 14kHz).

Thus, the ranking now is:

Code Freq
Shell, sysfs 1.2kHz
Micropython, sysfs 1.6kHz
Python 2.7, sysfs 0.7kHz
C, sysfs 3.2kHz
Micropython, IOCLT, kmod 9.2kHz
Pure kmod 14kHz

The full source code could be found in this gist.

Leave a Reply

You must be logged in to post a comment.