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

Switched to IAR and project continuously restarts

I started evaluating the nRF52 using Keil and everything worked great. However, I switched to developing in IAR because I have a full license. I'm using the same code (ble peripheral uart example), but now the unit will restart after a few seconds. If I let the project run, then it continuously resets. It always runs to the "power_manage()" function before it restarts. So, I set a breakpoint at the start of main and it continuously hits the breakpoint. The only thing I can think of that is different is when I connected the dev board to IAR, then IAR noticed that an update was available for the firmware so I updated it. But I can't see how this would cause the issue. I'm guessing something is calling a fault routine and that is restarting the unit, but I'm not sure.

Does anyone have any ideas as to why the unit continuously resets? If not, are there any tests you recommend I try? Anything will help.

I'm using SDK12, s132v3, and the debugger firmware is J-Link OB-SAM3U128-V2-NordicSemV1.00. I'm guessing the problem is in my setup, not in the code itself because it worked in Keil.

Update: I removed the power_manage() function and added an LED that toggles. The reset bug still occurred, so I removed the ble_advertising_start() function and the issue disappeared.

Here is where the program catches when the code is unaltered. I included a screenshot of the call stack, error handler, and error code.

image description

Parents Reply Children
No Data
Related