<?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>nRF52840 Radio receiving with CRC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80695/nrf52840-radio-receiving-with-crc</link><description>Hi 
 I have nRF52840 DK with nRF5_SDK_17.0.2_d674dde 
 I am using radio_test example code under examples\peripheral\radio_test: 
 Radio Channel is fixed at 10, 
 The data packet is : from x01 to 0x1F 
 20 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Oct 2021 12:33:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80695/nrf52840-radio-receiving-with-crc" /><item><title>RE: nRF52840 Radio receiving with CRC</title><link>https://devzone.nordicsemi.com/thread/334870?ContentTypeID=1</link><pubDate>Tue, 19 Oct 2021 12:33:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78818a1c-8db5-4fc0-9f01-74781237166e</guid><dc:creator>TigerD</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thank you for your valuable knowledge. I will try to use EVENTS_ADDRESS and compensate T.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Radio receiving with CRC</title><link>https://devzone.nordicsemi.com/thread/334801?ContentTypeID=1</link><pubDate>Tue, 19 Oct 2021 09:13:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:010a6ffe-cce6-420b-95f5-07cb4d553697</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;I think the RSSI will be more accurate if you start the sampling after receiving the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/radio.html?cp=4_0_0_5_19_13#register.EVENTS_ADDRESS"&gt;EVENTS_ADDRESS&lt;/a&gt; so that the sample is taken while receiving the packet payload. Also note that - 99dBm is outside the valid RSSI range between -90 to -20 dB.&lt;/p&gt;
&lt;p&gt;For even better accuracy you should consider including temperature compensation with the internal TEMP sensor: &lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52840_Rev3/ERR/nRF52840/Rev3/latest/anomaly_840_153.html?cp=4_0_1_0_1_9"&gt;[153] RADIO: RSSI parameter adjustment&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Radio receiving with CRC</title><link>https://devzone.nordicsemi.com/thread/334673?ContentTypeID=1</link><pubDate>Mon, 18 Oct 2021 15:44:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f748c3b2-45c3-4d5b-9943-5ad0a057e52d</guid><dc:creator>TigerD</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thank you for debugging my code. I made a mistake in frc_tx code by setting&lt;/p&gt;
&lt;p&gt;NRF_RADIO_CRC_ADDR_SKIP instead of NRF_RADIO_CRC_ADDR_INCLUDE.&lt;/p&gt;
&lt;p&gt;Now I set CRCCNF to&lt;/p&gt;
&lt;p&gt;nrf_radio_crc_configure(RADIO_CRCCNF_LEN_Disabled, NRF_RADIO_CRC_ADDR_INCLUDE, 0x18E);&lt;/p&gt;
&lt;p&gt;on both projects, and I still got:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1634571804214v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Was the above setup for CRC not enough?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT1 : the CRCPOLY is 0x18D not 0x18E passed in.&lt;/p&gt;
&lt;p&gt;Is one byte CRC not enough?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT -2 : made mistake again: It shall be configured as : &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; nrf_radio_crc_configure(RADIO_CRCCNF_LEN_One, NRF_RADIO_CRC_ADDR_SKIP, 0x18D);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then it works. Thank you again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you please review RSSI value reading :&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_radio_shorts_enable(NRF_RADIO_SHORT_READY_START_MASK | NRF_RADIO_SHORT_END_START_MASK &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp; RADIO_SHORTS_ADDRESS_RSSISTART_Msk |&amp;nbsp; RADIO_SHORTS_DISABLED_RSSISTOP_Msk &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/p&gt;
&lt;p&gt;&amp;nbsp;if (nrf_radio_event_check(NRF_RADIO_EVENT_RSSIEND)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rssi = (volatile uint8_t )NRF_RADIO-&amp;gt;RSSISAMPLE;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is that correct?&lt;/p&gt;
&lt;p&gt;I have noticed that under -85dBm rssi, it starts having receiving problem (skipped or rejected by CRCOK). But in some other applications, -99 dBm is still capable of receiving. I am not so sure that is there anything wrong with my code (radio test and frc_tx).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;David Zhou&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Radio receiving with CRC</title><link>https://devzone.nordicsemi.com/thread/334671?ContentTypeID=1</link><pubDate>Mon, 18 Oct 2021 15:12:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa2346a5-bed5-485a-9069-f6caa1a9fffe</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;Thanks. I ran you code here and noticed the same problem you&amp;#39;ve been describing. However, when I look at the RADIO registers I see that &lt;span&gt;&lt;a title="CRC" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/radio.html?cp=4_2_0_22_5#concept_v1f_qdj_4r"&gt;CRC&lt;/a&gt;&lt;/span&gt; has not been enabled. &lt;span&gt;&lt;a title="  CRCCNF  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/radio.html?cp=4_2_0_22_13_19#register.CRCCNF"&gt; CRCCNF&amp;nbsp; &lt;/a&gt;is &amp;#39;0&amp;#39;.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Radio receiving with CRC</title><link>https://devzone.nordicsemi.com/thread/334387?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 13:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af4befb0-9351-4b5a-a01a-876c3e615703</guid><dc:creator>TigerD</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have attached two projects source code. Global Macros:&lt;/p&gt;
&lt;p&gt;SDK7=SDK7=F:\_Develop\nRFSDK\nRF5_SDK_17.0.2_d674dde&lt;/p&gt;
&lt;p&gt;EDIT1:&lt;/p&gt;
&lt;p&gt;Project folder structure:&lt;/p&gt;
&lt;p&gt;local_root:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; nRF5_SDK_17.0.2_d674dde&lt;br /&gt;&amp;nbsp; _Project\nRF_17\frc_tx&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; \radio_test&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Load radio_test, and type print_rx on UART terminal, it will receive packages from frc_tx project running from a second nRF52840 DK.&lt;/p&gt;
&lt;p&gt;I calculated checksum, printed on the second and third bytes, if not equal. (EF BA), Fourth byte [03], is the number of packages with checksum error. (But all packages are received when CRCOK event triggered). (Radio channel is fixed at 10).&lt;/p&gt;
&lt;p&gt;20 EF BA 03&amp;nbsp; 24 05 06 07&amp;nbsp; 08 09 0A 0B&amp;nbsp; 0C 0D 09 BF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;10 11 12 13&amp;nbsp; 14 15 16 17&amp;nbsp; 18 19 1A 1B&amp;nbsp; 1C 1D 1E 1F&lt;/p&gt;
&lt;p&gt;At the same time, could you please review my code for reading RSSI values? I noticed that RSSI &amp;gt;|(-85)|, it is likely to have checksum errors. But for Beacon examples, RSSI at -99 or less (more negative), is still receiving packets ok. I am wondering I did anything wrong in reading RSSI, or something else.&lt;/p&gt;
&lt;p&gt;Appreciate your help!&lt;/p&gt;
&lt;p&gt;David Zhou&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/frc_5F00_tx.zip"&gt;devzone.nordicsemi.com/.../frc_5F00_tx.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/radio_5F00_test.zip"&gt;devzone.nordicsemi.com/.../radio_5F00_test.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Radio receiving with CRC</title><link>https://devzone.nordicsemi.com/thread/334337?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 11:58:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67d585ad-4d8f-4396-acf3-86f5d19dc118</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;The RADIO should only report packets with a valid checksum, and I think it should be unlikely to have a CRC collision here. Seems more likely that there is a FW bug causing the log buffer to become invalid, etc.&lt;/p&gt;
&lt;p&gt;Could you provide the code you use to test this?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>