Dialog Semiconductor customer support - GPIO driver https://support.dialog-semiconductor.com/resource-keywords/gpio-driver en 我醒来后gpio不能改变状态 https://support.dialog-semiconductor.com/my-gpio-cant-change-state-after-wake

Q1:I want led on when establish a connection,and off when go to sleep,
my code as the below
void periph_init(void)
{
....
GPIO_ConfigurePin(GPIO_LED_PORT,GPIO_LED_PIN, OUTPUT, PID_GPIO, false);//P03 set to low
}

void user_before_sleep(void)
{
...
GPIO_ConfigurePin(GPIO_LED_PORT,GPIO_LED_PIN, OUTPUT, PID_GPIO, false);//set to low before sleep for Power saving
}

void user_on_connection(uint8_t connection_idx, struct gapc_connection_req_ind const *param)
{
GPIO_ConfigurePin(GPIO_LED_PORT,GPIO_LED_PIN, OUTPUT, PID_GPIO, true);//when connected set high
}

can you tell me why the pin is still output low,I had establish connected although.
how can I change it?
Q2:
What's the meaning of this GetBits16(SYS_STAT_REG, PER_IS_DOWN ?Can I need it when device wake up??
if(GetBits16(SYS_STAT_REG, PER_IS_DOWN))
{
periph_init();
}

thank you

Device: 
星期五,29 Jul 2016 03:21:55 +0000 RandyYu 4304 at https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/my-gpio-cant-change-state-after-wake#comments