This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Cann't run the BLE code

Hi

I met a problem when I use my new board,I found that the example in the peripheral folder in SDK can run correctlly,but the the example in the ble_peripheral folder cann't work.Afterwards,I found that it is because the ble_stack_init() function.Pls see the attachment.image description(/attachment/fdae08a039f8b65fb17766e1a4d96923) The SDK I use is 8.0,S110_V8.0,and the chip is nRF51822 QFAC A 1506.I know the problem is not software problem.Also,I have checked the 16M crystal,which is 20ppm.

Anyone could tell me what reason may be?Thank you very much.

  • Do you have a 32kHz crystal on the board? If not, are you changing the ble init to use a synthesized 32kHz source?

  • Yes,I have a 32kHz crystal on the board.I also try to use NRF_CLOCK_LFCLKSRC_RC_250_PPM_250MS_CALIBRATION,but the problem still cann't be solved.

  • ok so what are you actually seeing? You enter ble_stack_init() and never return? If you step into the function what happens, where does it go? Does it call an error handler and loop forever, or end up in a HardFault? Have you ensured that you've used the correct memory map for the chip you're actually using, which may be different from the dev board you used to test it?

  • Yes,it will call an error handler and end up in a HardFault(HardFault_Handler).And it can not run to the while(1). I use the same code and the same setting for the keil MDK to test on the PCA10028 V1.1.0,it can run correctlly.But the chip on the PCA10028 is nRF51422 QFACA1. Alice (just now)edit

  • so what error handler does it call and why does it call it? What instruction does it execute when it goes to the hardfault handler?

1 2