< p > <代码> uint8_t广告= true; < /代码> < / p > < p > <代码>空白user_adv_stopped (uint8_t状态)< br / > {< br / > arch_set_pxact_gpio (); < br / > / /改变角色的差距中央< br / >广告= false; < br / > user_app_configuration_func (GAP_CENTRAL_MST); < br / >} < /代码> < / p > < p > <代码>空白user_scan_complete (uint8_t状态)< br / > {< br / >广告= true; < br / > user_app_configuration_func (GAP_PERIPHERAL_SLV); < br / >} < /代码> < / p > < p > <代码>空白user_app_on_set_dev_config_complete () < br / > {< br / > arch_set_pxact_gpio();
if(advertising)
{
app_easy_gap_non_connectable_advertise_start();
}
else // Ready to scan
{
// start a scan and a timer to stop it after some time
user_scan_start();
app_easy_timer(200, user_stop_scan);
}
}
void user_on_adv_report_ind (struct gapm_adv_report_ind const * param)
{
volatile static uint8_t param_data[ADV_DATA_LEN];
param_data[23] = param->report.data[23];
param_data[24] = param->report.data[24];
param_data[25] = param->report.data[25];
param_data[26] = param->report.data[26];
}
Depending on what values i have received in param_data, i am taking further action. I have used pwm of timer0 and timer2 for further processing of data received in advertising string. Except this I am not performing any extra functionality.
Now If I run the firmware on discovery kit, after few minutes(approximately 5-7) execution stops and go to wrap_platform_reset handler. This happens only if i receive any data in user_on_adv_report_ind function and perform further operation. If i do not perform further action on received data then firmware does not go to wrap_platform_reset handler. Can you let me know the reason why it is happening and what is the solution for that?
Thanks and Regards,
Ruchi Patel