This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

My code keeps crashing.

I used the ble_app_lbs example as a template, with a PCA10003 eval board (nrf51422 chip). SD 110, Nordic SDK V6.1. Keil uVision 5.

I launch my application and my board starts advertising. I can see my board in the Nordic's Master Control panel, and the signal strength bounces around. I don't do anything, I just let my board run in advertising mode, and watch it in the control panel. Then my board just stops. The time it takes to stop is random, sometimes it will run for several minutes (15-20 minutes), usually it runs less than 5 minutes.

When I click the stop button in uVision, in the disassembly window the yellow arrow on left side that shows you were the code is executing, is always pointed at address 0x000006B0 or 0x000006B2. (see below)

I'm stuck - I don't know how to track down what's causing this. I've tried removing any code that is not necessary for BLE. I have created a custom service, but I don't think the problem is there. I call services_init(); it executes without errors. Because my board never leaves advertising mode the service is never called.

Any suggestions would be much appreciated. Thanks.
Here's the code cut and pasted from the disassembly window:

0x000006A6 4770      BX       lr
0x000006A8 B510      PUSH     {r4,lr}
0x000006AA F000F807  BL.W     0x000006BC
0x000006AE BD10      POP      {r4,pc}
0x000006B0 4B01      LDR      r3,[pc,#4]  ; @0x000006B8
0x000006B2 681B      LDR      r3,[r3,#0x00]
0x000006B4 68DB      LDR      r3,[r3,#0x0C]
0x000006B6 4718      BX       r3
0x000006B8 0000      MOVS     r0,r0
0x000006BA 2000      MOVS     r0,#0x00
0x000006BC 4819      LDR      r0,[pc,#100]  ; @0x00000724
0x000006BE 491A      LDR      r1,[pc,#104]  ; @0x00000728
0x000006C0 4770      BX       lr
0x000006C2 F7FFFFFB  BL.W     0x000006BC
0x000006C6 F7FFFCFB  BL.W     0x000000C0
0x000006CA BD00      POP      {pc}
0x000006CC BF20      WFE 
Parents Reply Children
No Data
Related