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

Sometimes main function never gets reached. Need help badly.

Hi, I set a debug LED on as the very first thing I do in main. Randomly (sometimes 2 in a row, sometimes 1 in 100), sometimes my debug LED never comes on and no code is executed.

I got some help from Laird in modifying my startup file, which should use a handler that I put in my main.c if an exception occurs before main is reached, but that even never gets hit. I am using nrf51822 and softdevice 2.1.0.

I have attached my startup file. Please could someone have a look and tell me if there is anything else I can do to try fix this? I cannot tell you how many fruitless hours I have spent.

The only other thing I can think that may or may not make a difference, is the inclusion/disclusion of a pulldown resistor on SWDCLK. I removed that resistor as it seemed to improve the situation, but maybe that was the wrong thing to do. Could it have an effect?arm_startup_nrf51.s

Parents Reply Children
No Data
Related