I have been working with Bluetooth Mesh SDK since few months. Recently, we came across a custom BLE module which has Laird's BL652(nRf52832) chip on it (Not the BL652 DK). We tried to execute few UART examples on the module which worked fine. When we tried to flash the Mesh examples like light_switch server, enocean, etc. to control the module using the nRF Mesh App, the execution stops in the initialize function and start function in the main().
I am attaching the link of the BL652 by Laird for your reference here.
I can't even see any response on the debug terminal other than the name of the example. Any idea on how to resolve the issue?
Make sure the 32KHz crystal is connected. I think the mesh SDK defaults to turning it on. I had this issue with the BL654 module on their DVK so it may be the same for the BL652
We are using just the BL652 chip but not the development board. So, we do not have the 32KHz crystal on this custom board.
If you don't have the 32kHz crystal on the board you would need to configure the softdevice to use the RC oscillator instead.
You need to modify sdk_config.h NRF_SDH_CLOCK_LF_SRC to NRF_CLOCK_LF_SRC_RC instead of NRF_CLOCK_LF_SRC_XTAL
I changed the clock source as you mentioned and I also changed the NRF_SDH_CLOCK_LF_ACCURACY to NRF_CLOCK_LF_ACCURACY_500_PPM as it prompted in the warning. Now, it results in a Mesh error 7 at 0x00000000(:0)
I traced that the error was pointed to nrf_sdh_enable request function in the ble_stack_init(). The part of the code resulting in error is
ret_code = sd_softdevice_enable(&clock_lf_cfg, app_error_fault_handler);
m_nrf_sdh_enabled = (ret_code == NRF_SUCCESS);
if (ret_code != NRF_SUCCESS)
Any additional changes required to enable the soft device?
Also, does the packaging affect the initialization as this custom board has a completely different I/O compared to the nRF52832 on the nRF52 DK.
In order to test the UART communication, I made changes to the UART pins in the pca10040.h file and it worked. I am curious to know if the pin configurations does affect the soft_device enabling and initialization of Mesh.