We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

GPIO operation and Flash memory

  • I have a plans to use Omega as replacement for MCU that have to control one signal to monitor whether it is on or have meander form. As there is no library for Python that support falling edge detection there should be check made in a double frequency of a pulses.
    As GPIO information is written to the file and stored in flash memory, I would like to estimate how long Omega's memory will operate before become damaged (did not find that there is FRAM memory used) if GPIO will be updated 10 times per second ?
    Where I am wrong in my meaning or is it true that I could not use Omega as MCU replacement?

  • Actually, I expected a lot of comments stated that I am not right. Does silence means that, when I saw a code in GPIOhelper class I was right:

    def getPin(self, pin):
            # Set direction as in
            fd = open(self.pinDirectionPath.replace("$", str(pin)), 'w')
            # Get value


    I did understand that every time when GPIO ir read, file will be overwritten.
    So in case I would read the state 10 times per second, then after (100000 cycles) or after 10 000 seconds flash memory will be damaged.

    Is there a case to get somehow info about GPIO state and set the GPIO output by using RAM?
    Or I am wrong as this file is not actually a file but a register? Not familiar with linux enough.

  • administrators

    Hi @Pux
    So reading and setting the GPIOs through the file system is done through the sysfs interface, which is essentially a virtual filesystem provided by the Linux kernel to bring info on any connected hardware into userspace.
    The files in /sys/class/gpio that are read by the GPIOhelper you mentioned above are actually virtual files, my best guess is that the virtual file is only updated by the kernel when you attempt to read from it. AND, it's most likely not written to the flash memory at all.

    In short, you should not have any problems with your flash memory getting damaged when using the GPIOs, even if it's updating 10 times a second. šŸ™‚

  • Thank You for the answer. It is clear now that Onion is the right device to make controller in short time.

  • administrators

    @Pux glad to have helped

    Btw, the device is the Omega, the team behind it is Onion šŸ™‚

Looks like your connection to Community was lost, please wait while we try to reconnect.