1
Discussion - MCU / GPIO interrupt wakeup from power-down mode
« on: May 06, 2021, 04:42:37 AM »
I have successfully used the code below (at the start of main() ) to set the FT908 to wake from power-down mode with a falling edge on GPIO57:
However, when I change the GPIO pin from 57 to 49 (making the appropriate code changes), the FT908 will no longer wake up. Is it not possible to use GPIO49 for this? I'd like to wake the FT908 from power-down on receiving a break character on UART0, which is why want to use UART0_RXD/GPIO49 (I have had no luck trying to use the UART0 interrupt to wake the system).
The idea being that once the system is awake, the code then reconfigures GPIO49 to UART0_RXD and enables UART0.
Any suggestions appreciated, thanks
Code: [Select]
gpio_function(57, pad_gpio57);
gpio_dir(57, pad_dir_input);
gpio_pull(57, pad_pull_pullup);
interrupt_attach(interrupt_gpio, (uint8_t)interrupt_gpio, ISR_gpio);
gpio_interrupt_enable(57, gpio_int_edge_falling);
interrupt_enable_globally();
SYS->PMCFG_L &= ~MASK_SYS_PMCFG_PM_PWRDN_MODE;
SYS->PMCFG_L |= MASK_SYS_PMCFG_PM_PWRDN;
However, when I change the GPIO pin from 57 to 49 (making the appropriate code changes), the FT908 will no longer wake up. Is it not possible to use GPIO49 for this? I'd like to wake the FT908 from power-down on receiving a break character on UART0, which is why want to use UART0_RXD/GPIO49 (I have had no luck trying to use the UART0 interrupt to wake the system).
The idea being that once the system is awake, the code then reconfigures GPIO49 to UART0_RXD and enables UART0.
Any suggestions appreciated, thanks