<?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>SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52719/spis-of-nrf52-could-not-read-the-data-accuracy</link><description>I am working with SPIS example ( sdk version 15.3). SPI master send data regulaly. For example, it sent 5ms cs low, but there are only two bytes transferred, the first byte at begin of 5ms, other one at the end. SPIS of nrf52 not read the second one,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Oct 2019 07:40:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52719/spis-of-nrf52-could-not-read-the-data-accuracy" /><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/216067?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 07:40:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d0547f5-ffff-4296-aacd-c18856ebad43</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I only have the number from this table:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fspis.html&amp;amp;cp=3_2_0_31_5_1&amp;amp;anchor=unique_954891395"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fspis.html&amp;amp;cp=3_2_0_31_5_1&amp;amp;anchor=unique_954891395&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;T_(SPIS,CWH): Min 300ns. See Figure 3, SPIS Timing Diagram.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;One possible issue is that the nRF tries to spin up the HFXTAL on this trigger, which may take more time. This is why I asked you to try to start the HFCLK manually so that it is kept running.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/216032?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 01:56:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b615e05-758e-45e5-a0de-87110c64de23</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;Could you tell me about the minimum time interval of between CS raise and fall？&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/215930?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2019 12:48:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d4697e0-c09b-4ce4-8ad9-2a60cdcb6140</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;The 300ns minimum is very optimistic considering that a peripherial interrupt can take up to 4&amp;micro;s latency hit according to the S140_SDS_v1.2, and that is when the softdevice is not busy with radio. This spec considers ONLY the SPIS peripherial and no data handling in the &amp;micro;C core.&lt;/p&gt;
&lt;p&gt;SPIS latency is: interrupt enter+ aquire semaphore + change EasyDMA pointers + release semaphore.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think this is doable at all in 3-4 &amp;micro;s. You need to redesign the SPI communication at the SPI master.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/215911?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2019 12:01:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d743344-5d5b-4ab2-abd5-72b496e15580</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2019_2D00_10_2D00_15_5F00_17_2D00_33_2D00_26.kvdat.bin"&gt;devzone.nordicsemi.com/.../2019_2D00_10_2D00_15_5F00_17_2D00_33_2D00_26.kvdat.bin&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can use the software download from &lt;a href="http://www.qdkingst.com/en/download"&gt;http://www.qdkingst.com/en/download&lt;/a&gt;&amp;nbsp; , and import the dat which i post!&lt;/p&gt;
&lt;p&gt;Because file extension couldn&amp;#39;t be allow by the up-loader, so please remove the .bin before you import the file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will try to start the HF_CLK, thanks.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;xin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/215906?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2019 11:48:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:160e979b-84be-4d78-8528-b6f4c5af872b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am sorry that I didn&amp;#39;t specify this, but can you send the .logicdata file? It is not possible to open CSV files in the logic analyzer application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can use nrf_drv_clock_hfclk_request() to start the HF_CLK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/215789?ContentTypeID=1</link><pubDate>Sun, 20 Oct 2019 07:40:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d95878cc-f3a4-4c77-ab83-c53d57194b55</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;By the way how can i enable the HCLK?&lt;/p&gt;
&lt;p&gt;Is the priority could cause the the problem?&lt;/p&gt;
&lt;div style="left:305px;position:absolute;top:22.44px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/215788?ContentTypeID=1</link><pubDate>Sun, 20 Oct 2019 07:38:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:998ff125-d96f-40ca-b7b0-991fcbd706ee</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2019_2D00_10_2D00_15_5F00_17_2D00_32_2D00_09.txt"&gt;devzone.nordicsemi.com/.../2019_2D00_10_2D00_15_5F00_17_2D00_32_2D00_09.txt&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2019_2D00_10_2D00_15_5F00_17_2D00_32_2D00_50.csv"&gt;devzone.nordicsemi.com/.../2019_2D00_10_2D00_15_5F00_17_2D00_32_2D00_50.csv&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope the detail information could help you to solve the problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/215521?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 12:44:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ee7eada-475f-43e1-8ff1-cc68efc15fcf</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Is it possible to save the file that this screenshot is from?&lt;/p&gt;
&lt;p&gt;I would like to measure some timings. It may be that the nRF doesn&amp;#39;t have time to start the clocks. Can you try to enable the HCLK and keep it running? Does that change the behavior?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/215045?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2019 11:26:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cb5ec85-f7d0-47b4-8abd-361413542ed3</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;I had tried unmodified spis again, only add the instructions you give to me, no any more changed, the second bytes was lost, and many bytes not printed in log info, but only the first was printed with server 0x00. i think maybe print log info take so much time, so some bytes was lost.&lt;/p&gt;
&lt;p&gt;I tried to store all data to a big buffer like the amount reached to 200 without printing any log info, i tried setup the break point when the 200 data had stored to the buffer, then to find the second bytes, result tell me i was fail again.&lt;/p&gt;
&lt;p&gt;So i can sure, your minimum high of the CS 300ns is wrong, because i can get the second byte with&amp;nbsp;logic analyzer but the 52832 could not. Could you give me any advice?&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x2798/__key/communityserver-discussions-components-files/4/20191015192226.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/214888?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2019 14:13:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62e7f4a5-7edf-4335-8674-f17557df92c5</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;According to the datasheet the minimum high of the CS/SS is 300ns, so 3.5us should really be fine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are you using the following function to check whether the data is received?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_LOG_INFO(&amp;quot; Transfer completed. Received: %s&amp;quot;,(uint32_t)m_rx_buf);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;can you try the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        NRF_LOG_RAW_INFO(&amp;quot;received string len %d, data: 0x&amp;quot;, sizeof(m_rx_buf));
        for (uint8_t i=0; i&amp;lt;sizeof(m_rx_buf); i++)
        {
            NRF_LOG_RAW_INFO(&amp;quot;%02x:&amp;quot;, m_rx_buf[i]);
        }
        NRF_LOG_RAW_INFO(&amp;quot;\n&amp;quot;);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am sorry I can&amp;#39;t give a concrete answer, but I don&amp;#39;t have any HW capable of simulating your device. Please test this with the unmodified spis example, except for the printing of the string. I don&amp;#39;t understand exactly how you handle the SPI events in the main file that you sent.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/214786?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2019 10:34:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00168159-bc67-448d-b3c4-1dd992dc8a51</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;Hi, Edvin,&lt;/p&gt;
&lt;p&gt;I found something wrong using&amp;nbsp;the logic analyzer.&lt;/p&gt;
&lt;p&gt;The problem was cause by the second cs signal, it&amp;#39;s stay on high just take&amp;nbsp;3.5us which was too small than the others(34us).&lt;/p&gt;
&lt;p&gt;Is there any thing i can changed to solve the problem?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Xin&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x1408/__key/communityserver-discussions-components-files/4/20191014183311.png" /&gt;&lt;/p&gt;
&lt;div style="left:132px;position:absolute;top:6.08px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/214765?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2019 09:09:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:427c37ca-fdde-4088-89ae-7229fb5bdb44</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;Only 1 byte was received, that&amp;#39;s the reason i launch the item.&lt;/p&gt;
&lt;div style="left:318px;position:absolute;top:-20px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/214761?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2019 09:06:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac62747c-937f-4254-9c24-b143f5664747</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;When you set the buffer to 20 bytes (the length), what are the values in the buffer when the event is triggered?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/214485?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 03:57:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e0cb077-5c92-4b48-8d08-7073239f022b</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;I post another photo to show the&amp;nbsp;MOSI and&amp;nbsp;CLK, so you can clear to read the detail infomation, yellow line is the CLK and blue line is MOSI.&lt;/p&gt;
&lt;p&gt;&lt;img alt="CLK with MOSI" src="https://devzone.nordicsemi.com/resized-image/__size/1040x1080/__key/communityserver-discussions-components-files/4/clk_2600_data.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/214484?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 03:49:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9219ba2-5191-4748-a2bf-bc670806734d</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;blue line is CS&lt;/p&gt;
&lt;p&gt;I read the SPIS in&amp;nbsp;spis_event_handler, the code were post 3 days ago!&lt;/p&gt;
&lt;div style="left:32px;position:absolute;top:-20px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/214336?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2019 11:07:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c6f264c-da4f-4d1a-aaa4-4cb21e88b130</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I assume the yellow line is your CLK and the blue is the MOSI? To me it looks like there is nothing in the MOSI in the yellow box. It looks like it belongs to the 3rd 8 but cycle on the CLK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, where do you set up your SPIS to read? Can you send some snippets?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/214305?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2019 09:05:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:402f18b1-32cc-46e6-9d9d-5fb6b0786c91</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;Yes, i create the graph.&lt;br /&gt;but no any info lost.&lt;/p&gt;
&lt;p&gt;CLK only had two 8 bits cycle, one at the cs got low, another at before cs to high.&lt;/p&gt;
&lt;p&gt;CLK &amp;amp; CS relationship, please check the attachment.&lt;/p&gt;
&lt;p&gt;The data in gray box was lost. All other data are no problem.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x1920/__key/communityserver-discussions-components-files/4/4834.clk_2600_cs.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/214271?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2019 07:01:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:004e3807-4f76-4205-bfc7-f5ebf8de1360</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;You say that you have created this graph. Are there any simplifications? Is the CLK signal low for the 5ms that no data is sent?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/214246?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2019 02:11:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a10932b0-5171-4b5c-a935-5f0d635d3359</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;I had tried from 2 to 20, the same result.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/213923?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2019 13:00:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5968d713-796a-4423-8819-2e5150436f6e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;From your main.c file, you have:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;APP_ERROR_CHECK(nrf_drv_spis_buffers_set(&amp;amp;spis, m_tx_buf, 0, m_rx_buf, 1));
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Try to increase the length of the receive buffer, which you currently have set to 1.&lt;/p&gt;
&lt;p&gt;Can you try:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;APP_ERROR_CHECK(nrf_drv_spis_buffer_set(&amp;amp;spis, m_tx_buf, 2, m_rx_buf, 2));&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/213839?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2019 09:54:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0a589ee-3fa9-4fc9-9388-602fd2cec345</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;But i believe 52832 is more strong than PIC16f1823. Am i right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/213829?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2019 09:27:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee1de3dc-a67a-4d8d-bf99-f7c2eb807a7d</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;I know some mcu could solve the problem, like PIC16f1823&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/213819?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2019 08:52:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3d1836f-f902-4e41-92dc-ebe601f66d1f</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;when i set the breakpoint at line 80, i found all the data i recevied to buffer &amp;quot;MyString&amp;quot;, lost the second bytes.&lt;/p&gt;
&lt;p&gt;i received data from SPIM should be 17 bytes every time, the first and the second byte using the same cs signal, but all the other 15 bytes using 15 cs signal individual, and the cs&amp;nbsp;interval always in 500ns. so i got the first byte， lost the second byte, and then got all the other byte correctly.&lt;/p&gt;
&lt;p&gt;so i think there are some problem for long time cs valid and not clk and data&amp;nbsp; appear？&lt;/p&gt;
&lt;div style="left:279px;position:absolute;top:78.6px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/213818?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2019 08:47:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9db8049c-2fa7-46f7-a67a-f3a0ede2ca75</guid><dc:creator>hzhuxin</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;But i should confirm i lost the second byte, not the first!&lt;/p&gt;
&lt;p&gt;And i check the spis_event_handler parameter&amp;nbsp;event,&amp;nbsp;event.rx_amount is always 1, so i can make sure the second byte lost.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 *
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 *
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 *
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &amp;quot;AS IS&amp;quot; AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;sdk_config.h&amp;quot;
#include &amp;quot;nrf_drv_spis.h&amp;quot;
#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;
#include &amp;lt;string.h&amp;gt;

#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_log_default_backends.h&amp;quot;

#define SPIS_INSTANCE 1 /**&amp;lt; SPIS instance index. */
static const nrf_drv_spis_t spis = NRF_DRV_SPIS_INSTANCE(SPIS_INSTANCE);/**&amp;lt; SPIS instance. */

#define TEST_STRING &amp;quot;Nordic 1234567890123&amp;quot;
static uint8_t       m_tx_buf[] = TEST_STRING;           /**&amp;lt; TX buffer. */
static uint8_t       m_rx_buf[sizeof(TEST_STRING) + 1];    /**&amp;lt; RX buffer. */
static const uint8_t m_length = sizeof(m_tx_buf);        /**&amp;lt; Transfer length. */

static volatile bool spis_xfer_done; /**&amp;lt; Flag used to indicate that SPIS instance completed the transfer. */

/**
 * @brief SPIS user event handler.
 *
 * @param event
 */

#define DATA_BUFFER_SIZE 2000
void spis_event_handler(nrf_drv_spis_event_t event)
{
    static uint8_t MyString[DATA_BUFFER_SIZE];
    static uint8_t MyStringIndex = 0;
    int i, j;
    uint8_t *StartPointer, *NextPointer;
    if (event.evt_type == NRF_DRV_SPIS_XFER_DONE)
    {
        spis_xfer_done = true;
        if (MyStringIndex == DATA_BUFFER_SIZE)
         {
            NRF_LOG_INFO(&amp;quot; Transfer completed. Received: %d\n&amp;quot;, MyStringIndex);

            //Find the first Data
/*            for (i = 0; i &amp;lt; DATA_BUFFER_SIZE; i ++)
              if (MyString[i] == 0x80 || MyString[i] == 0x90 || MyString[i] == 0xa0)
              break;

            if (i &amp;lt; DATA_BUFFER_SIZE)
            {
              StartPointer = &amp;amp;MyString[i]; 

            while ((StartPointer != NULL) &amp;amp;&amp;amp; (StartPointer &amp;lt; (&amp;amp;MyString[DATA_BUFFER_SIZE - 1])) &amp;amp;&amp;amp; (StartPointer + 16 &amp;lt; (&amp;amp;MyString[DATA_BUFFER_SIZE - 1])) )
            {
              NextPointer = StartPointer + 1;
              //Find the ending of the data
              for (j = 1; j &amp;lt; 16; j ++, NextPointer ++)
              {
                if (*NextPointer == 0x80 || *NextPointer == 0x90 || *NextPointer == 0xa0)
                break;
              }

              //Show the data to RTT or UART
              NRF_LOG_HEXDUMP_INFO(StartPointer, j);
              StartPointer += j;
            }

            memset(MyString, 0, 100);
            MyStringIndex = 0;
          }
         }*/
         MyString[MyStringIndex] = m_rx_buf[0];
         MyStringIndex ++;
  }
}

int main(void)
{
    // Enable the constant latency sub power mode to minimize the time it takes
    // for the SPIS peripheral to become active after the CSN line is asserted
    // (when the CPU is in sleep mode).
    NRF_POWER-&amp;gt;TASKS_CONSTLAT = 1;

    bsp_board_init(BSP_INIT_LEDS);
 
    APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
    NRF_LOG_DEFAULT_BACKENDS_INIT();

    NRF_LOG_INFO(&amp;quot;SPIS example&amp;quot;);

    nrf_drv_spis_config_t spis_config = NRF_DRV_SPIS_DEFAULT_CONFIG;
    spis_config.mode = NRF_SPIS_MODE_0;
    spis_config.csn_pin               = APP_SPIS_CS_PIN;
    spis_config.miso_pin              = APP_SPIS_MISO_PIN;
    spis_config.mosi_pin              = APP_SPIS_MOSI_PIN;
    spis_config.sck_pin               = APP_SPIS_SCK_PIN;


    APP_ERROR_CHECK(nrf_drv_spis_init(&amp;amp;spis, &amp;amp;spis_config, spis_event_handler));

    while (1)
    {
        spis_xfer_done = false;

        APP_ERROR_CHECK(nrf_drv_spis_buffers_set(&amp;amp;spis, m_tx_buf, 0, m_rx_buf, 1));

        while (!spis_xfer_done)
        {
            __WFE();
        }

        NRF_LOG_FLUSH();

//        bsp_board_led_invert(BSP_BOARD_LED_0);
    }
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS of nrf52 could not read the data accuracy</title><link>https://devzone.nordicsemi.com/thread/213804?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2019 07:29:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dde8b075-e337-4cc0-ad5d-73d85c5b7895</guid><dc:creator>Edvin</dc:creator><description>[quote user="hzhuxin"]What i ask is, if master send these data to me, i should received two bytes, am i right?&lt;br /&gt;But in fact, only one bytes could be received.[/quote]
&lt;p&gt;&amp;nbsp;Ok. So the issue is not that you are missing a lot of information in between the two bytes, but that you only read the second byte. Now I understand. And you only get the second byte, was that so? So you are missing the first?&lt;/p&gt;
&lt;p&gt;Can I see how you set up, and how you read your SPI(S) on the nRF? Can you try with the SDK\examples\peripheral\spis example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>