Gemalto is now part of the Thales Group, find out more.

You are here

GPIO Flapping | Thales IoT Developer Community

January 3, 2019 - 12:21pm, 1147 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?