Hi,
i am working on nRF52832. i am facing a issue of RESET when i call advertise_start() again after advertise duration. in debug it shows fatal error.
Hi,
i am working on nRF52832. i am facing a issue of RESET when i call advertise_start() again after advertise duration. in debug it shows fatal error.
Hello,
This sounds like a non-NRF_SUCCESS error code is passed to an APP_ERROR_CHECK, which resets the device, which in turns means that the function call failed for some reason.
Please make sure to have DEBUG defined in your preprocessor defines, like shown in the included image:
This will make your logger output a detailed error message whenever a non-NRF_SUCCESS error code is passed to an APP_ERROR_CHECK.
Please do this, and check the returned error code against the returning function's API reference, to see why it was returned and what you could do to resolve it.
Best regards,
Karl
Hi,
by doing this i got this error in debug mode
<info> app_timer: RTC: initialized.
<error> app: ERROR 7 [NRF_ERROR_INVALID_PARAM] at D:\DeviceDownload (2)\nRF5_SDK_17.1.0_ddde560\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\APP_UART\main.c:838
PC at: 0x0002BECF
<error> app: End of error report
It seems that you have attempted to call a function with an invalid parameter.
Which function call returned the error code passed to the APP_ERROR_CHECK on line 838 of main.c?
This is the function you will need to check the API Reference of.
Best regards,
Karl
Hi,
now this error i got in debug mode.
<info> app_timer: RTC: initialized.
<error> app: ERROR 8 [NRF_ERROR_INVALID_STATE] at D:\DeviceDownload (2)\nRF5_SDK_17.1.0_ddde560\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\APP_UART\main.c:838
PC at: 0x0002BEB7
<error> app: End of error report
Hi,
now this error i got in debug mode.
<info> app_timer: RTC: initialized.
<error> app: ERROR 8 [NRF_ERROR_INVALID_STATE] at D:\DeviceDownload (2)\nRF5_SDK_17.1.0_ddde560\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\APP_UART\main.c:838
PC at: 0x0002BEB7
<error> app: End of error report
Which function call returned the error code passed to the APP_ERROR_CHECK on line 838 of main.c?
This is the function you will need to check the API Reference of.
that function is
uint32_t err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
but this function works first time properly.when i call this again after advertising duration.then it RESET.
harrys said:uint32_t err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
ble_advertising_start could return NRF_ERROR_INVALID_STATE when it has not been initialized prior to the call to start advertising, or the error code could be propagated from a lower function call.
What do you do in-between the advertising timeout and the call to restart advertising?