2

Usually, the gpio16 is not used as gpio.

But we can read the state or change the state by writing directly to the registers.

WRITE_PERI_REG(PAD_XPD_DCDC_CONF, (READ_PERI_REG(PAD_XPD_DCDC_CONF) & 0xffffffbc) | (uint32)0x1); 
WRITE_PERI_REG(RTC_GPIO_CONF, (READ_PERI_REG(RTC_GPIO_CONF) & (uint32)0xfffffffe) | (uint32)0x0);
WRITE_PERI_REG(RTC_GPIO_ENABLE, READ_PERI_REG(RTC_GPIO_ENABLE) & (uint32)0xfffffffe);
(READ_PERI_REG(RTC_GPIO_IN_DATA) & 1);

Is there a way to enable interrupts on this pin by writing directly to the registers?

  • 2
    I'm voting to close this question as off-topic because it is a fundamental detail question about a particular chip, rather than a question about IoT usage of that chip. – Chris Stratton Sep 20 '17 at 16:46
  • I think you will get more help on a dedicated forum, rather than on S.E – Mawg says reinstate Monica Oct 1 '17 at 8:49
  • Here's a "non-arduino" page that says the same thing esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations - so, I'm guessing the arduino limitation is due to some lower level limitation – Jaromanda X Feb 21 '18 at 12:56
  • @JaromandaX Thanks. I already solved this issue by using the hardware timer and periodically retrieving the state of the pin. – Andrew Romanenko Feb 21 '18 at 13:03
  • I guess the technical reference won't help then (there's a16 bit word related to interrupts, with 1 bit per GPIO - so, obviously 1 gpio has to miss out :p) – Jaromanda X Feb 21 '18 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.