GPIO Flapping | Telit Cinterion IoT Developer Community
January 3, 2019 - 12:21pm, 1368 views
Hi,
I have a ELS61-E R2 module and am working with the GPIOs and noticed some very strange behaviour. We are getting GPIO flapping where pins will rapildy flip from 0 - 1 constantly.
Also when testing using a switch board have noticed that when executing ^SGIO whilst polling the same pin we do not get the same result as expected there are cases where the last value printed by ^SCPOL is 0 and SGIO will print 1.
To replicate this boot up any ELS61-E R2 board;
AT^SPIO=1
AT^SCPIN=1,10,1
AT^SCPOL=1,10
You will then start seeing the flapping (Note sometimes you need to prompt the console to print out the ^scpol results as it seems it gets stuck in a buffer. I do this by just doing any at command).
^SCPOL: 10,0
^SCPOL: 10,1
^SCPOL: 10,0
^SCPOL: 10,1
As you can see below when we retreieve pin state using ^SGIO it is different to the previous ^SCPOL.
^SCPOL: 10,0
^SCPOL: 10,1
at^sgio=10
^SGIO: 0
OK
at^sgio=10
^SGIO: 0
OK
^SCPOL: 10,0
^SCPOL: 10,1
at^sgio=10
^SGIO: 0
OK
What could the reason be for this flapping?
Hello,
As I understand you activate polling and change the pin state with some external switch board. If the state is constantly changing with some frequency it could probably be possible that you get the different/new state with SGIO. Or is the state constant on external device while you observe changes on the module?
One problem I can see here is that you have configured the pin as output. For polling it should be set as input.
What hardware do you use with the module - any developer board, terminal or other? Do electrical parameters comply with hardware interface description document for the module?
Regards,
Bartłomiej