<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nrf52840 hitting unknown breakpoints</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125148/nrf52840-hitting-unknown-breakpoints</link><description>Hello all, 
 I am trying to prove that I can compile and upload some simple code that I have written and run it successfully on an nrf52840. 
 I&amp;#39;m using an mdbt50q-db-40 development board from Raytac, a raspberry pi 3 and openocd to flash the mcu over</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Oct 2026 12:01:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125148/nrf52840-hitting-unknown-breakpoints" /><item><title>RE: nrf52840 hitting unknown breakpoints</title><link>https://devzone.nordicsemi.com/thread/571887?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2026 12:01:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e928fa3c-6b65-444d-a0aa-bd765d1f3124</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;&lt;span&gt;I&amp;#39;m glad to hear you were able to identify the problem, and thank you for taking the time to report back. Regarding the hex file I sent, I mistakenly built it for the PCA10040 (nRF52 DK) as I thought you were using&amp;nbsp;the nRF52832 for some reason but that turned out to be fine for this basic sample.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1790942322846v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;( Ref.&amp;nbsp;&lt;a id="" href="https://docs.nordicsemi.com/r/bundle/nrf5_sdk_v17.1.0/page/sdk_for_custom_boards.html"&gt;https://docs.nordicsemi.com/r/bundle/nrf5_sdk_v17.1.0/page/sdk_for_custom_boards.html&lt;/a&gt;)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 hitting unknown breakpoints</title><link>https://devzone.nordicsemi.com/thread/571886?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2026 11:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d8eb1ab-e525-43c0-b1eb-6bc419f552ad</guid><dc:creator>iforce2d</dc:creator><description>&lt;p&gt;I discovered the problem with being unable to run after flashing via&amp;nbsp;OpenOCD on Raspberry Pi. In my .cfg file I had &amp;quot;reset_config srst_only srst_push_pull&amp;quot; which I think might have been expecting to restart only&amp;nbsp;by a physical wire between the Pi and the nRF52840. I did have that wire connected occasionally but perhaps that setting was still not appropriate. After removing that line it&amp;nbsp;now flashes and runs just fine, so the contents of my .cfg is:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;adapter driver bcm2835gpio
transport select swd
adapter gpio swdio 23
adapter gpio swclk 24
source [find target/nrf52.cfg]&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps someone...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 hitting unknown breakpoints</title><link>https://devzone.nordicsemi.com/thread/571854?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2026 02:51:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8809a127-ef89-4fd0-b0c2-3622f75bea0f</guid><dc:creator>iforce2d</dc:creator><description>&lt;p&gt;Ok, I think I have sorted this out now. I noticed that even though&amp;nbsp;OpenOCD on the RPi got stuck after flashing my program, it&amp;nbsp;would run fine&amp;nbsp;after a full power-off reset.&lt;/p&gt;
&lt;p&gt;The reason it took me so long to&amp;nbsp;notice that, is because&amp;nbsp;I had been disconnecting the VCC pin to do a power-off reset, but apparently there is still enough power from either DIO or CLK that it doesn&amp;#39;t reset at all! Just by chance one time I disconnected GND instead to do the reset&amp;nbsp;which actually does caus a reset.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After that, I moved back to using a ST-Link dongle from my main desktop computer which is what I wanted to do in the first place, and that works fine - program, verify, reset causes the program to start every time without any problems, and debugging works fine. I should have just tried that earlier, but after the APPROTECT problem with the ST-Link dongle I thought the RPi would be more&amp;nbsp;dependable so I wanted to get everything working there first.&lt;/p&gt;
&lt;p&gt;In hindsight, all I had to do was use the RPi just once to run nrf52_recover, and then go straight back to the ST-Link dongle. But it ended up being a perfect storm of overlapping problems all taking their turn to rob me of two days of my life, namely:&lt;/p&gt;
&lt;p&gt;- didn&amp;#39;t realize the OpenOCD message &amp;quot;nRF52 device has a CTRL-AP dedicated to recover the device from AP lock. Do not enable UICR APPROTECT&amp;quot; is only a general warning, it doesn&amp;#39;t mean debugging is blocked right&amp;nbsp;now&lt;/p&gt;
&lt;p&gt;- didn&amp;#39;t realize P0.14 and P0.16 were connected to nRESET&lt;/p&gt;
&lt;p&gt;- didn&amp;#39;t realize disconnecting only VCC was not actually causing a reset&lt;/p&gt;
&lt;p&gt;One thing I still can&amp;#39;t explain is why Vidar&amp;#39;s hex would start ok from the RPi but mine wouldn&amp;#39;t.&lt;/p&gt;
&lt;p&gt;Anyway, now I am back to the IDE and dongle I prefer, I&amp;nbsp;have s113 soft device and ble_app_uart running nicely. Thanks for your time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 hitting unknown breakpoints</title><link>https://devzone.nordicsemi.com/thread/571828?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 12:42:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:546d023b-1234-406e-bc13-b9ed38312ec0</guid><dc:creator>iforce2d</dc:creator><description>&lt;p&gt;Thanks for the reply. With your hex file it seems to work fine, and if I only flash yours repeatedly it starts up nicely every time.&lt;/p&gt;
&lt;p&gt;Example of flashing yours:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;gt; halt
[nrf52.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x21000000 pc: 0x00000742 msp: 0x2000fff8
&amp;gt; program /home/pi/nrf/4555.blinky_pca10040.hex verify
[nrf52.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x21000000 pc: 0x00000742 msp: 0x2000fff8
** Programming Started **
Adding extra erase range, 0x00000760 .. 0x00000fff
** Programming Finished **
** Verify Started **
** Verified OK **
&amp;gt; reset
[nrf52.cpu] halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000002e msp: 0x2000fff8
&amp;gt; resume ( &amp;lt;-- blinky runs ok here )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Example of flashing mine:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;gt; halt
[nrf52.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x21000000 pc: 0x00000742 msp: 0x2000fff8
&amp;gt; program /home/pi/nrf/nrf52832_xxaa.hex verify       
[nrf52.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x21000000 pc: 0x00000742 msp: 0x2000fff8
** Programming Started **
Adding extra erase range, 0x00000888 .. 0x00000fff
** Programming Finished **
** Verify Started **
** Verified OK **
&amp;gt; reset
[nrf52.cpu] halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000002e msp: 0x2000fff8
&amp;gt; resume
[nrf52.cpu] clearing lockup after double fault
[nrf52.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x21000000 pc: 0x00000472 msp: 0x20040000
[nrf52.cpu] Polling failed, trying to reexamine
[nrf52.cpu] Cortex-M4 r0p1 processor detected
[nrf52.cpu] target has 6 breakpoints, 4 watchpoints
[nrf52.cpu] Examination succeed

(at this point, reset and resume both continue to give the same result as above)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I notice your file name has pca10040 rather than pca10056 so I tried building for pca10040, but same result.&lt;/p&gt;
&lt;p&gt;So it would seem like my build is just messed up somehow. I will try with some other toolchain I guess...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 hitting unknown breakpoints</title><link>https://devzone.nordicsemi.com/thread/571820?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 11:03:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c864a2c-a886-4501-aaf1-f427f2d26a14</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I don&amp;#39;t have an OpenOCD programmer here to test with (we officially support JLink debuggers), but to help narrow down the problem, please try flashing the attached hex file. It is built from the same Blinky project modified to only toggle P0.15.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4555.blinky_5F00_pca10040.hex"&gt;devzone.nordicsemi.com/.../4555.blinky_5F00_pca10040.hex&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 hitting unknown breakpoints</title><link>https://devzone.nordicsemi.com/thread/571818?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 10:23:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aa957c8-4c03-459e-af7c-9efb69d2243c</guid><dc:creator>iforce2d</dc:creator><description>&lt;p&gt;Schematic for this board is here:&amp;nbsp;&lt;a id="" href="https://nicekeyboards.com/docs/nice-nano/pinout-schematic/"&gt;https://nicekeyboards.com/docs/nice-nano/pinout-schematic/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is an LED on P0.15 which I tried (excluding all other LEDs). With that program in place, occasionally the LED does&amp;nbsp;light up at the moment I do a &amp;#39;resume&amp;#39; after programming, but it doesn&amp;#39;t get a chance to actually blink. One time after taking a break for a day to regain some sanity, I powered the board up and it actually ran normally, blinking as expected! Have not been able to reproduce it though. On another occasion, the LED lit up when I connected the reset pin to the RPi (needed for nrf52_recover).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 hitting unknown breakpoints</title><link>https://devzone.nordicsemi.com/thread/571815?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 10:05:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0caa96c3-b352-4d4e-b5a9-f4059a7ed5ec</guid><dc:creator>iforce2d</dc:creator><description>&lt;p&gt;I am having almost exactly the same problem. My board is a Nice Nano, I think (or maybe a clone of that). Steps I took are as below.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;On build machine, Fedora Linux desktop:&lt;/p&gt;
&lt;p&gt;- download the nRF5 SDK, version 17.1.1, extract from zip&lt;/p&gt;
&lt;p&gt;- edit&amp;nbsp;components/toolchain/gcc/Makefile.posix to set my toolchain&amp;#39;s bin folder (using toolchain from STM32CubeIDE)&lt;/p&gt;
&lt;p&gt;- edit&amp;nbsp;examples/peripheral/blinky/main.c so that it does nothing, ie. while(true) {}&lt;/p&gt;
&lt;p&gt;- in&amp;nbsp;examples/peripheral/blinky/pca10056/blank/armgcc run make, builds ok&lt;/p&gt;
&lt;p&gt;- flash using OpenOCD and ST-Link dongle, struggle for many hours with APPROTECT&lt;/p&gt;
&lt;p&gt;- give up and copy .hex file to Raspberry Pi 3&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;On Raspberry Pi 3 with OpenOCD&lt;/p&gt;
&lt;p&gt;- do nrf52_recover, seems to&amp;nbsp;succeed ok&lt;/p&gt;
&lt;p&gt;- program my .hex file, seems to program and verify ok&lt;/p&gt;
&lt;p&gt;- strike (mostly) same issue as OP describes above&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;gt; program /home/pi/nrf/nrf52840_xxaa.hex verify
[nrf52.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000002e msp: 0xffffffd8
** Programming Started **
Adding extra erase range, 0x00000a30 .. 0x00000fff
** Programming Finished **
** Verify Started **
** Verified OK **

&amp;gt; reset run
[nrf52.cpu] halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000002e msp: 0xffffffd8

&amp;gt; reg 
===== arm v7m registers
(0) r0 (/32): 0xcf6e2db1
(1) r1 (/32): 0x00000000
(2) r2 (/32): 0x00000000
(3) r3 (/32): 0x00000a30
(4) r4 (/32): 0x00000a30
(5) r5 (/32): 0x00000008
(6) r6 (/32): 0x04c11db7
(7) r7 (/32): 0x00000000
(8) r8 (/32): 0x00000000
(9) r9 (/32): 0x00000000
(10) r10 (/32): 0x00000000
(11) r11 (/32): 0x00000000
(12) r12 (/32): 0x00000000
(13) sp (/32): 0xffffffd8
(14) lr (/32): 0xfffffff9
(15) pc (/32): 0x2000002e
(16) xpsr (/32): 0x61000000
(17) msp (/32): 0xffffffd8
(18) psp (/32): 0x00000000
(20) primask (/1): 0x01
(21) basepri (/8): 0x00
(22) faultmask (/1): 0x00
(23) control (/3): 0x00&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I checked that LR with addr2line but it just gives me a question mark for the&amp;nbsp;0xfffffff9 address, understandably.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The reason I edited main() to do nothing is because apparently this board has P0.14, P0.16 and P0.18 (nRESET) all connected together for some reason, and the blinky would toggle 14 and 16 which probably gave me another few hours of grief before I realized. Been at this for 2 days, never had such a hard time simply blinking an LED. I have worked with nRF51822 in the past and everything was super easy... :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 hitting unknown breakpoints</title><link>https://devzone.nordicsemi.com/thread/552240?ContentTypeID=1</link><pubDate>Thu, 23 Oct 2025 11:41:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b011625f-5a92-46fd-8670-79afb54e8a56</guid><dc:creator>SwitchGM</dc:creator><description>&lt;p&gt;Hey Vidar,&lt;/p&gt;
&lt;p&gt;Thank you very much for the response!&lt;/p&gt;
&lt;p&gt;Surprisingly, I&amp;#39;m no longer experiencing the break point issue.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure why this no longer occurs, but I will update the ticket with any information I find &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thank you for the help. (processor core registers was new to me and a very interesting read!)&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Joe&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 hitting unknown breakpoints</title><link>https://devzone.nordicsemi.com/thread/552155?ContentTypeID=1</link><pubDate>Wed, 22 Oct 2025 12:16:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:327f2ff4-4559-4ac2-8e23-df8a3789836d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Joe,&lt;/p&gt;
&lt;p&gt;Unfortunately, I don&amp;#39;t have experience with this framework or debugger and I&amp;#39;m afraid I don&amp;#39;t have an explanation for why this breakpoint&amp;nbsp;is&amp;nbsp;set either.&amp;nbsp;But it&amp;#39;s interesting&amp;nbsp;that it appears to be set at a RAM address. Most applications don&amp;#39;t execute code from RAM.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you run the &amp;#39;reg&amp;#39; command after the breakpoint has been hit and check which address register r14/lr points to (&lt;a href="https://developer.arm.com/documentation/ddi0439/b/Programmers-Model/Processor-core-register-summary"&gt;https://developer.arm.com/documentation/ddi0439/b/Programmers-Model/Processor-core-register-summary&lt;/a&gt;). You can use addr2line from the command line to look up the LR address&amp;nbsp;in your .elf/.out file (assuming this is included in your build output).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>