- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found that "post_sleep_cback_handler" is not called by BT stack at waking up from LPM at the following condition.
[Condition]
(1) Have enter CYW20819 into slave state (Inquiry / Page scan enable: ON)
(2) Permit LPM (Return WICED_SLEEP_ALLOWED_WITHOUT_SHUTDOWN: ePDS)
(3) A peer device tries to pair --> (Fail: PIN code mismatch, Passkey error)
(4) A peer device re-tries to pair --> (Success)
(5) Forbids LPM (Return WICED_SLEEP_NOT_ALLOWED)
With paring operation and WICED_SLEEP_NOT_ALLOWED, CYW20819 must wake up from LPM. But "post_sleep_cback_handler" is NOT called with "restore_configuration: True".
Briefly when re-pairing is performed on LPM state, wake-up callback with "restore_configuration: True" is NOT called.
I re-initialize UART (RTS/CTS) in the callback, so I faced the problem with UART by above issue.
Please check this issue.
---------------------------------------------
void lpm_init(void){
wiced_result_t ret;
wiced_sleep_config_t lpm_config;
lpm_config.sleep_mode = WICED_SLEEP_MODE_NO_TRANSPORT;
lpm_config.device_wake_mode = WICED_SLEEP_WAKE_ACTIVE_LOW;
lpm_config.device_wake_source = 0;
lpm_config.device_wake_gpio_num = 0;
lpm_config.host_wake_mode = WICED_SLEEP_WAKE_ACTIVE_HIGH;
lpm_config.sleep_permit_handler = lpm_permit_handler;
lpm_config.post_sleep_cback_handler = lpm_post_sleep_callback;
ret = wiced_sleep_configure(&lpm_config);
if(ret != WICED_SUCCESS) while(1);
return;
}
void lpm_post_sleep_callback(wiced_bool_t restore_configuration){
if(restore_configuration){
uart_reinit();
wiced_auth_chip_reinit();
}
return;
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please share your relevant code/project ? I would like to know the implementation details and try to reproduce the issue for better understanding.
In ePDS mode, the CYW20819 can wake up either after a programmed period or upon receiving an external event.
Thanks,
-Dheeraj