Hi. I am working with nrf52832 trying to get Bluetooth and UART and a I2C peripheral working at the same time. I had a working version of the I2C peripheral and UART working together and tried to merge Bluetooth in, referencing the experimental_ble_app_blinky example provided in nRF5_SDK_12.3.0.
Currently when I added ble_stack_init() into my existing program plus all the elements it needs for compiling, I have it in function without breaking any functions I had with UART. However, after I added gap_params_init() after ble_stack_init(), along with everything it needed to compile, of course, my device started to keep rebooting, after the program compiled and ran.
I changed APP_ERROR_CHECK(err_code) statements in my gap_params_init function into printf statements to print out the error code and I got err_code = 12289 for both sd_ble_gap_device_name_set and sd_ble_gap_ppcp_set.
I have already found out that this error code means that sd_ble_enable has not been called, however, I had also made sure that sd_ble_enable was actually called before it gets to gap_params_init(). The sd_ble_enable was called inside a function named softdevice_enable, and softdevice_enable was called inside ble_stack_init(). I have also added debugging printf statements inside my ble_stack_init function and made sure that softdevice_enable was indeed called successfully before the program gets to gap_params_init().
I am not sure why I am getting this error code.