I test DA14580 in my DA14580EVKET-B, and set GPIO port 0, pin4 as output, value is 1.
If #undef CFG_EXT_SLEEP , output always high.
if #define CFG_EXT_SLEEP , ouput become low
How to keep the output when system enter Extend Sleep?
I test DA14580 in my DA14580EVKET-B, and set GPIO port 0, pin4 as output, value is 1.
If #undef CFG_EXT_SLEEP , output always high.
if #define CFG_EXT_SLEEP , ouput become low
How to keep the output when system enter Extend Sleep?
Hello ZhiGang,
Can you clarify the question ? are you saying that hwen you enter extended sleep mode, the I/O state of the GPIO port 0 is not retaining its state ?
All the GPIOs have retention state so will keep their state during extended sleep. (As input each GPIO can be used as input to the wake-up counter in extended sleep.)
BR JE_Dialog
I find that set_pad_functions() will called every time system wakeup, In this function I set I/O output LOW. but Some I/O will set to HIGH in working. So when system wakeup, It's become LOW.
Hi
The periph_init function in periph_setup.c is called every time you wake up from sleep. This function calls the setpad function which always sets the level unconditionally - just as you stated.
You should remove the statement
GPIO_ConfigurePin( GPIO_PORT_1, GPIO_PIN_1, INPUT_PULLUP, PID_GPIO, false );
从set_pad_functions()的乐趣ction.
In the function app_set_dev_config_complete_func(), set your default or start-up value using the GPIO_ConfigurePin:
GPIO_ConfigurePin( GPIO_PORT_1, GPIO_PIN_1, INPUT_PULLUP, PID_GPIO, false ); // false sets the pin low
Then in your application, instead of setting the pin with the GPIO_SetInactive() or GPIO_SetActive(), use the GPIO_ConfigurePin() function - use false to set the pin low, use true to keep it high. This will ensure that the pin is correctly configured and remains latched during sleepmode.
Hi MHv_dialog,
I configured GPIO pin like the description in your last statement. When I undef the flag CFG_EXT_SLEEP, it works fine, but otherwise CFG_EXT_SLEEP is defined and I wake up from sleep, the pin is low. Is it necessary to set the port retention separate?
BR SEM
Hi MHv_Dialog,
do you have any news for me???
BR SEM