Our Aim is to generate a 40Khz square wave on a GPIO pin.
We have tried several methods to achieve this in Android and Linux
- By writing a C++ program using the GPIO Class in Linux
- Writing a shell script to export the GPIO and modify the GPIO files
- We also tried step 2 in Android
The problem we are facing is that File Operations are extremely slow, We measured it and it takes 2ms to open, modify and save the file for OS.
But to generate 40Khz square wave we need to toggle the GPIO pin at 12.5 Micro Seconds
How do we achieve this in Dragon Board 410C ?