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

Strange behaviour with nRF51822 and S110

Hello, I'm trying to develop with the nRF51822 Eval kit and GCC and Eclipse. I've been getting some strange behavior and errors lately. I'm not really sure how to describe it better, because I'm not sure what the problem is but I think it's related to SoftDevice being incorrectly flashed. So let me just give you an example of what's happening:

I flash SoftDevice using the nRFGo studio and start debugging the example project ble_app_hrs. After the program reaches the end of the is_first_start() if block, I get the following:


ble_app_hrs Default [GDB Hardware Debugging]	
	GDB Hardware Debugger (13.08.13 10:47) (Suspended)	
		Thread [1] (Suspended)	
			1 <symbol is not available> 0x00000000	
	arm-none-eabi-gdb (13.08.13 10:47)	
	C:\workspace\Nordic Semiconductor\nRF51 SDK_v4.3.0.27417\Nordic\nrf51822\Board\pca10001\ble\ble_app_hrs\gcc\_build\pricetag_bin_s110_xxaa.out (13.08.13 10:47)	

I terminate the debug session and check what's going on in the nRFGo studio - It tells me to recover, so I do that and flash the softdevice again.

I try debugging again but this time I comment out the line


NRF_POWER->SYSTEMOFF = 1;

to see what happens. Then the program runs and I see the LED blinking but, as far as I can tell, it's not advertising (I checked with three different combinations of BTLE HW and SW, so I'm actually pretty sure it's not advertising).

So at this point I terminate the debug session and run it one more time. This time I get and assert from the BLE_STACK_HANDLER_INIT macro. Error number 8194 (= 0x2002), line 508.

My best guess is that the SoftDevice gets incorrectly flashed and that causes all these errors, but I have no idea what causes it, or how to fix it. Help would be appreciated.

Parents
  • I've seen this error sometimes, but I've had troubles with reproducing it consistently. However, my current theory is that this has something to do with how Eclipse launches GDB. I've never seen it when running GDB manually from the command line.

    It seems to possibly be caused by Ecliipse not doing a reset of the chip after loading the new firmware, and hence causing confusion. I have unfortunately not found an easy way to make it do so, but as far as I've seen, changing the startup commands to just this:

    
    file "c:\full\path\to\your\file.out" 
    load
    mon reset 
    
    

    and removing the checkboxes for loading symbol table and binary file, seems to make it work.

  • Sounds good! If you found this answer helpful, I'd be happy if you could click the "Accept as answer" button, to mark this question as resolved. :-)

Reply Children
No Data
Related