Closed DhirajGehlot closed 6 years ago
Welcome, i have similar problem. Timer1 and Timer2 works together to measure frequency, but when i want send data via BLESerial.write(data) counter stop. Any solution for this? Regards
Hello,
I got solution to this problem. The issue is cased by running BLE functions from a high priority interrupt. When using a BLE stack such as the S130 SoftDevice interrupt priorities 0 and 2 are reserved for the SoftDevice, and should not be used by the application. Set the interrupt priority of the TIMER2 interrupt to 3, and it should work better: NVIC_SetPriority(TIMER2_IRQn, 3);
Hello Everyone,
I am using nrf51822, S130 SDK11 with arduino 1.8.1. Currently I am trying to write data (battery data) and toggle led at set interval using timer 2. I am using BLESerial example code to write data. When the timer times out, the BLE kind of crashes and doesn't respond However, if I disable "BLESerial.write(data);" , the led toggles properly and program runs correctly. Somehow, the BLESerial call is causing problem. Is it something that BLESerial function calls and TIMER2 are inter-related? I checked the product specification which mentions TIMER0 is used by softdevice and there is no dependency on TIMER2. Can someone help me out for this issue?