<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SD332 - BUG with 4 byte NRF52 ANT Timestamps</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17123/sd332---bug-with-4-byte-nrf52-ant-timestamps</link><description>ANT experts, 
 I have been looking at the nrf52 implementation of the ANT timestamp (and timesync) features. One thing that is rather puzzling is the fact that the documentation for the ANT protocol claims that the timestamp in the extended data will</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Oct 2016 21:43:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17123/sd332---bug-with-4-byte-nrf52-ant-timestamps" /><item><title>RE: SD332 - BUG with 4 byte NRF52 ANT Timestamps</title><link>https://devzone.nordicsemi.com/thread/65719?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2016 21:43:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d0dc925-4b7e-45c5-b689-d438e731076b</guid><dc:creator>shaba</dc:creator><description>&lt;p&gt;Ok turns out that if you are using DBM style measurement, the RSSI_TYPE_DBM_EXT_MESG_FIELD_SIZE is only 3 bytes long. So even though the RSSI field claims to be 4 bytes always, the soon-to-follow timestamp field occupies the last of the 4 bytes in the RSSI field. I am pretty sure this is what is going on as the last byte of the RSSI is believable as the LSB of the timestamp :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SD332 - BUG with 4 byte NRF52 ANT Timestamps</title><link>https://devzone.nordicsemi.com/thread/65718?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2016 17:32:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dc4faec-8e5e-4532-ad41-5508443cf0fd</guid><dc:creator>shaba</dc:creator><description>&lt;p&gt;I am using the sdk 12.0.1 with SD332. Could this be an oversight in the softdevice? I could try flipping to 212 and verify the behavior for you Petter. While I will not post my raw project code, I will construct a representative example which reproduces the issue that I am seeing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SD332 - BUG with 4 byte NRF52 ANT Timestamps</title><link>https://devzone.nordicsemi.com/thread/65714?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2016 08:58:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:772de552-8146-483a-ac60-07c68cf96013</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not able to reproduce this. The LSB of 32 bit timestamps is not 0, with RSSI included. I tested with SDK 12.0.1 and S212 v2.0.0. Maybe you can upload your complete project so we can be sure we are on the same page?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SD332 - BUG with 4 byte NRF52 ANT Timestamps</title><link>https://devzone.nordicsemi.com/thread/65717?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2016 17:54:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64e10c50-be90-45c1-8ceb-d7d206c0d6dd</guid><dc:creator>shaba</dc:creator><description>&lt;p&gt;Exactly. The 32 bit timestamps work just fine if the RSSI flag is not set. However, when the RSSI flag is enabled - the LSB of the 32 bit timestamps is set to 0 which gives us a 32 bit value with only the middle two bytes being significant. More to the point, we wish to enable the RSSI output, the Channel ID as well as the 32 bit timestamp for the extended messages; which we find results in the RTC value being less precise as I described above. Thanks for the help again Petter!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SD332 - BUG with 4 byte NRF52 ANT Timestamps</title><link>https://devzone.nordicsemi.com/thread/65716?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2016 14:17:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2bab0d7-c473-48ef-9f23-61a6bb0a683b</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I guess I am. It seems to me that a 32 bit timestamp is reported. The MSB is always 0 because the RTC is 24 bits. The rest are the 24 bits of the RTC value. Maybe I&amp;#39;m misunderstanding. Maybe you can try to explain how you came to the conclusion that it is not the RTC value? Do you see this if you simply add sd_ant_lib_config_set(ANT_LIB_CONFIG_MESG_OUT_INC_RSSI); to the ant time synchronization example found in SDK 12.1?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SD332 - BUG with 4 byte NRF52 ANT Timestamps</title><link>https://devzone.nordicsemi.com/thread/65715?ContentTypeID=1</link><pubDate>Fri, 21 Oct 2016 20:32:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c79b2aec-875b-440d-9f7b-ad8cf9c8a924</guid><dc:creator>shaba</dc:creator><description>&lt;p&gt;I think you are missing the point. I understand that the RTC is 24 bits - the value that your timestamp reports back is not the raw RTC value, but the RTC value divided by 256 (the 8 LSB bits are always 0). This makes it 256 times more coarse than we would like it...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SD332 - BUG with 4 byte NRF52 ANT Timestamps</title><link>https://devzone.nordicsemi.com/thread/65713?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2016 14:34:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:095a25ab-1f76-48f7-a5ed-f2d3acbc1003</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure what SDK you are using, but I&amp;#39;m using SDK 12.0.1 with S212 v2.0.0.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;One thing that is rather puzzling is
the fact that the documentation for
the ANT protocol claims that the
timestamp in the extended data will be
at-most 2 bytes, while the code in the
nrf52 includes seem to hint that we
can have the timestamp in 2 byte or 4
byte modes (based on the way the
timestamp-ing is configured).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I understand that you find that puzzling, but I think this is explained &lt;a href="https://devzone.nordicsemi.com/question/94427/ant-time-synchronization-example-understanding/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Would this mean that the extended
messages coming back from the event
could potentially have 12 bytes of
extended data (if all bits are set for
which features are enabled)?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I think so, it actually seems it can be 40 bytes:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define ANT_EXT_MESG_DEVICE_ID_FIELD_SIZE    ((uint8_t)4)
#define ANT_EXT_MESG_RSSI_FIELD_SIZE         ((uint8_t)4)  // maximum RSSI field size regardless of RSSI type
#define ANT_EXT_MESG_TIME_STAMP_FIELD_SIZE   ((uint8_t)2)
#define ANT_EXT_MESG_ALT_TIME_STAMP_FIELD_SIZE ((uint8_t)4)
#define ANT_EXT_STRING_SIZE                  ((uint8_t)16) // additional buffer to accommdate for 24 byte advance burst mode &amp;amp; encrypted usr data

// The largest serial message is an ANT data message with all of the extended fields
#define MESG_ANT_MAX_PAYLOAD_SIZE            ANT_STANDARD_DATA_PAYLOAD_SIZE

#define MESG_MAX_EXT_DATA_SIZE               (ANT_EXT_MESG_DEVICE_ID_FIELD_SIZE + ANT_EXT_MESG_RSSI_FIELD_SIZE + ANT_EXT_MESG_ALT_TIME_STAMP_FIELD_SIZE + ANT_EXT_STRING_SIZE) // ANT device ID (4 bytes) + ANT RSSI (4 bytes) + ANT timestamp (4 bytes) + ANT Ext String Size
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Additionally, what happens to the
extended fields if advanced burst or
encrypted channels are enabled?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Please add this as new question.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I only get the top 24 bits of the RTC2
counter. Is this a bug that you guys
need to resolve in the softdevice?
This pretty much makes the RTC based
timestamps un-usable!!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/rtc.html?cp=2_2_0_24#concept_rvn_vkj_sr"&gt;RTC2&lt;/a&gt; is a 24-bit counter.&lt;/p&gt;
&lt;p&gt;Edit: Added link.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SD332 - BUG with 4 byte NRF52 ANT Timestamps</title><link>https://devzone.nordicsemi.com/thread/65712?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2016 22:55:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83f6c332-a958-413e-bcc4-91fff60b9e63</guid><dc:creator>shaba</dc:creator><description>&lt;p&gt;Appreciate it Petter! I am happy to run any experiments for you as well. I figure it is more useful for NRF to have these discussions here as well. It will be nice to see this community embrace ANT like they embrace BLE :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SD332 - BUG with 4 byte NRF52 ANT Timestamps</title><link>https://devzone.nordicsemi.com/thread/65711?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2016 10:10:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2d8f563-cf3f-42db-bbff-8d9484a3285c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I think Dynastream is better suited to answer this, but I will try to look into it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SD332 - BUG with 4 byte NRF52 ANT Timestamps</title><link>https://devzone.nordicsemi.com/thread/65710?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2016 19:03:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:557320f8-86ab-4d86-b078-b5a66add9a79</guid><dc:creator>shaba</dc:creator><description>&lt;p&gt;I have also posted this in the dynastream wiki here: &lt;a href="https://www.thisisant.com/forum/viewthread/6614/"&gt;www.thisisant.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>