Hi All,
I am using the nrf51422 and softdevice S310 to send out ANT+ and BT Smart in my project.
I use RTC1->Counter in order to get a timestamp for an interrupt from a hall sensor.
But the there seem to be something strange going on because suddenly i get strange values from the RTC1->Counter register.
If i read the Counter register every second i get the following:
1 00008002
2 0001000E
3 00018002
4 00020005
5 00028002
6 00030005
7 00038002
8 00040008
9 00048004
10 00050006
11 00058002
12 00060005
13 00068002
14 00070005
15 00078002
16 00080003
17 00080014
18 00088002
19 00090005
But look at line 17! Because I am running RTC1 as a 32Khz counter i should see an increment of approx 0x8000 each read.
But suddenly i read a difference of 0x11
I use SEGGER_RTT_printf for the printout
and the following code:
uint32_t timer = NRF_RTC1->COUNTER;
SEGGER_RTT_printf(0,
"%d %04X%04X\n",
cnt++,
(uint16_t)(timer >> 16),
(uint16_t)(timer));
Please help :)