When i added timer in my bluetooth code my board will not advertise.using pca10028 and nrftool box uart app on iphone 5s. here is my complete code. Using timer1 Final with timer.zip
When i added timer in my bluetooth code my board will not advertise.using pca10028 and nrftool box uart app on iphone 5s. here is my complete code. Using timer1 Final with timer.zip
The problem is that you do not clear all interrupts in TIMER1_IRQHandler. If I add the following line to the handler I do not see any problems:
NRF_TIMER1->EVENTS_COMPARE[0] = 0;
As the interrupt is not cleared, the IRQ is entered again as soon as it exits (only interrupted by higher priority interrupts). This causes the SoftDevice to loose its timing and will trigger a hard fault (which you see if you run the code in a debugger).
thank you :)
thank you :)