-
Custom Board with MCU NordicSemi nRF51822-QFAA
-
Softdevice S110 7.1
-
IAR for ARM 7.1
-
SDK 7.2 using NUS example
-
Testing with iPhone 5S, 6 and iPad air (iOS 8.1.3)
/ Nexus 5 and Galaxy Note 3 (Android 4.4.2).
/************************************************************************/
Hi, I'm using a relative humidity + temperature sensor (SI7020-A10).
After I connect with a test device (iOS device or Android device),
two timers starts. (Lets say I use timer timer1 and timer2.
Timer1's interval is 3 second and timer2's interval is 10 seconds.)
Both timer interrupts reads my sensor's data. Then timer1 sends the data
using NUS to the app.
One concern is that after 30 seconds (which is the least common multiple of each intervals)
both interrupts will read the sensor.
I'm worried that would it cause problems or not.
/************************************************************************/
So my questions are,
0.Does both timer interrupt has the same priority?
1.What exactly happens at each 30 seconds?
For example, when I start timer1 and timer2, even though 30 seconds pasts,
timer1 interrupt will occur first than timer2. Does the Program Counter jumps immediately
to the timer2 interrupt handler before finishing timer1 interrupt handler?
Or does it jumps later after it finishes the first interrupt handler?
2.Is this fine for each timer interrupts to read the sensor? I'm worried it is okay
whether it works properly or not.
-Regards, Mango922