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

how to program NRF51822 with VisualStudio to advertise itself?

Howdy! I have to admit that after about 2 weekes of fight i finally made some progress with NRF51. Afterall i can upload my own program to chip so it changes leds on NRF51 DK by WaveShare. Unfortunatelly I can not do anything to make chip advertise with BLE itself. Probably it is just something small i missed but i have no idea what it is.

Some specs:

  • i have STLink Dongle NRF51

  • motherboard by WaveShare visual

  • Studio 2015 with VisualGDB and
    openOCD for windows 7

Also VisualGDB has sample project that I can generate. After uploading those projects to chip it seems to work completely fine - LED Blink(BSP) example flashes leds as i want to, but there are also two other examples - one for BLE Beacon, second for BLE Proximity. I expected it starts to advertise ship but i guess it didnt. Both, Beacon and Proximity project are programmed on chip - visual studio says there is no problem with upload and it finishes with success. However my Iphone 5S doesnt find any bluetooth devices even if it is 10 cm away from chip. I downloaded some NRF apps for Iphone to check UIDs and connect to them (NRF Beacons, NRF Connect and NRF Toolbox), but they also dont find anything.

Can you please advice me what to make NRF51822 to advertise? Kalreg.

Afterall i am not sure if program has been correctly uploaded - log from OpenOCD looks like this:

 Open On-Chip Debugger 0.9.0 (2016-10-14) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
For bug reports, read
        openocd.org/.../bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
VisualGDB_OpenOCD_Ready
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.241497
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : accepting 'gdb' connection on tcp/51929
Info : nRF51822-QFAC(build code: A1) 256kB Flash
nrf51.cpu: target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x00012b98 msp: 0x20001c48
nrf51.cpu: target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x00012b98 msp: 0x20001c48
Warn : using fast async flash loader. This is currently supported
Warn : only with ST-Link and CMSIS-DAP. If you have issues, add
Warn : "set WORKAREASIZE 0" before sourcing nrf51.cfg to disable it
nrf51.cpu: target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000001e msp: 0x20001c48
Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (2068). Workaround: increase "set remotetimeout" in
 GDB
nrf51.cpu: target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x00012b98 msp: 0x20001c48
nrf51.cpu: target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x00012b98 msp: 0x20001c48
Error: address + size wrapped(0xfffffffe, 0x00000004)
Error: address + size wrapped(0xfffffffe, 0x00000004)
Parents Reply Children
No Data
Related