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

Simultaneous scan/advertisement S130 stack problem

Hello! I have a problem when scanning and advertising at the same time with a NRF51822 and S130 v.2.0.0. (SDK11).

I can start both scanning and advertising without any problem and they seem to work fine, but the problem is that if I do both at the same time the device gets stuck at random times at the following code in the stack and triggers a watchdog timeout due to this.

Assembly output of where it gets stuck and loops:

00014184:   wfe     
00014186:   ldrb    r0, [r4, #20]
00014188:   bl      0x10c9a
0001418c:   cmp     r0, #0
0001418e:   beq.n   0x14184

As a test I've setup my device to run scan and advertisement directly from start with short timeouts. 2 sec scan, 5 sec advertisement and when done it repeats this procedure. With this the problem triggers at random times within 1-30 minutes from system start. (Note: times chosen close to what I need for my application).

I've tested to run both advertisement and scanning independently and it doesn't trigger the problem when I do this.

Advertisement interval is set to 100 ms. Scan interval is set to 50 ms and window is set to 25 ms. Watchdog set to 2 seconds timeout.

Has anyone else encountered the same/similar problem or could someone from Nordic give a hint to what the code in question is doing/waiting for?

Related