# Speeding up GPIO Write Time

Source: https://forum.modalai.com/topic/3508/speeding-up-gpio-write-time
Category: VOXL SDK and Software (https://forum.modalai.com/category/47/voxl-sdk-and-software)
Tags: voxl-sdk
Posted: 2024-05-30 16:40:29 UTC by Ritwik Majumdar
Replies: 1 · Views: 565

## Ritwik Majumdar · 2024-05-30 16:40:29 UTC

In the VOXL [documentation](https://docs.modalai.com/voxl-gpio-io/#performance-using-libapq8096_io), it states that the gpio pin must already be opened and that libvoxl_io must be preloaded to acheive the 1-2 ms call time. 

Does the VOXL 2 library (libqrb5165-io) suffer from this same problem? If so, how do I get to the fast call time?

## Reply by Alex Kushleyev (ModalAI staff) · 2024-06-05 20:18:15 UTC

@Ritwik-Majumdar 

The delay of VOXL2 control has not been tested, but it should be relatively small (1ms or less)

You can control the GPIO directly from command line, see 
- https://docs.modalai.com/voxl2-linux-user-guide/#gpios
- https://docs.modalai.com/voxl-gpio-io/#manipulating-gpio-using-linux-commands

Please take note of the GPIO pin numbering : `the GPIO have an offest of 1100 (e.g. GPIO 84 = 1184)`

Setting CPU to perf mode (`voxl-set-cpu-mode perf`) will speed things up.

You can time the execution time (i just did in perf mode). Sometimes 0.000s, sometimes 0.001s, so somewhere around 1ms. You can do more precise timing if needed.

```
voxl2:/$ time echo 1 > /sys/class/gpio/gpio<GPIO_NUM>/value

real	0m0.001s
user	0m0.000s
sys	0m0.000s
```
