Hi, I have some questions about GPIO interrupt.
Now, I want to know the state of the pin, So I use the gpio_pin_read(PIN) to get the state. But when the pin is suspended, the value returned from gpio_pin_read(PIN) is uncentain. Actually, it must be low when pin is suspended. What can I do to get the right state?
Someone told me to config pull_cfg as pulldown. I tried it but not work. After configed as pulldown, gpio_pin_read(PIN) only got low.
And another question. Use GPIO interrupt, configed as LOTOHI. Sometimes the pin changed from low to hign, there wasn't interrupt handling. I used the oscilloscope to check the pin state, it viewed low to high. This situation is accidental.