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

nrf51822 not work in non debug mode

i use nrf51822 for my project, i want to do is when smartphone are pair with my module i store one flage in flash whenever user enter right security key and after reset i read that flag so no security key are enter next time. when smartphone is connect i send string from uc to phone. so the problem is when i use debug without break point it work perfectly it send string after reset and flag are also proper so no security key are ask next time. but when i not use debug it send string only one time after reset it not send string. flag which is store in flash are also proper because whenever it proper i simply blink led. so flash flag problem. is their any other mistake that i made.? if you have suggestion or solution than please tell me. sorry for poor English.... Thank you

Parents
  • Usually when a piece of code works in debug mode, but not on normal mode it's because debug forces the clock source to be on. So check you 16 MHz/32 kHz clock sources used by your application and make sure they have them available. In debug mode they will all be running and hence you code will work. When you are out of debug mode, the clock source have to be requested.

Reply
  • Usually when a piece of code works in debug mode, but not on normal mode it's because debug forces the clock source to be on. So check you 16 MHz/32 kHz clock sources used by your application and make sure they have them available. In debug mode they will all be running and hence you code will work. When you are out of debug mode, the clock source have to be requested.

Children
No Data
Related