<?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>SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110528/spi-cs-pin-going-high-and-from-transceiving-function-data-is-not-coming</link><description>I am using nrf52840 and i am working on nrf connect sdk v2.6.0 in my overlay file SPI CS pin is low but it is going high between the communication. Data is not receiving from the sensor using spi_transceive_dt() function but in logic analyzer the MISO</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Apr 2024 07:52:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110528/spi-cs-pin-going-high-and-from-transceiving-function-data-is-not-coming" /><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/481213?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2024 07:52:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4058a12f-74f6-4760-940f-9b0ea4061488</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Not all sensors are equal. You should have a look at the datasheet for your sensor and use that as a basis for how to communicate with the device.&lt;/p&gt;
[quote user="Madhan Mohan Reddy"]tx_buffer = 1&lt;br /&gt;rx_buffer should be 1 or 2 ?[/quote]
&lt;p&gt;This is not correct for the specific sensor that you&amp;#39;re interfacing.&lt;/p&gt;
&lt;p&gt;tx_buffer should be 2 bytes and hold the register (OR with 0x20), and the second byte is the amount of registers to read, minus one.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/481101?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 13:16:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86698f38-670f-4c3a-967f-81b2d75d9c0b</guid><dc:creator>Madhu Mohan Reddy</dc:creator><description>&lt;p&gt;For Receivig the data from sensor I am sending only reg address ,for reading chip id I need RREG two bytes&amp;nbsp;&lt;br /&gt;&lt;br /&gt;using spi_transceive function I want to send 1 byte and receive 1 byte output&amp;nbsp; values&amp;nbsp;&lt;br /&gt;&lt;br /&gt;tx_buffer = 1&lt;br /&gt;rx_buffer should be 1 or 2 ?&lt;br /&gt;&lt;br /&gt;in nrf dev academy in spi lesson its mentioned that tx_buffer = len then rx_buffer = len +1.&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1714396541352v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;thanks in advance&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/481090?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 13:01:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96b5a872-a796-41a0-85ee-34b79abcf22d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;I am not sure what you&amp;#39;re asking. Could you elaborate on what you are actually stuck with?&lt;/p&gt;
&lt;p&gt;You need to send two bytes, not one. The second byte holds the amount of registers to read, minus 1, as per the datasheet of the sensor.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/481046?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 10:59:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccafc3ea-c710-47e1-aea1-cac259e10e87</guid><dc:creator>Madhu Mohan Reddy</dc:creator><description>&lt;p&gt;when I write 1 byte it will come 1 byte&amp;nbsp;&lt;br /&gt;why I am asking in dev academy SPI lesson spi_transceive function transmit size is len&amp;nbsp; receive size is len + 1&lt;br /&gt;&lt;br /&gt;thats why i am asking this&amp;nbsp;&lt;br /&gt;&lt;br /&gt;thanks in advance&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/481043?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 10:52:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4bc8e09-4a2b-4884-8767-2694f3711124</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you look at the chapter I previously mentioned: Each transaction is 2 byte op_code, written from the nRF, and you will then get &amp;#39;n&amp;#39; bytes returned based on&amp;nbsp;the contents of&amp;nbsp;the second byte sent. At this moment, you&amp;#39;re writing 1 and reading 2 bytes twice, then clearing your /CSN pin.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/481012?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 09:01:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5dba5afc-41b1-4941-a9a9-7a4eddb287ab</guid><dc:creator>Madhu Mohan Reddy</dc:creator><description>&lt;p&gt;I am sending 0x20 and 0x01 and in MOSI line 0x20 0xFF,&amp;nbsp; 0x01, 0xFF Coming why&lt;br /&gt;my RREG function below&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/6545.Screenshot-_2800_12_2900_.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/481008?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 08:33:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3b10c8a-8b52-441f-9540-7d4fad55d59e</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Google the sensor you have, and check the manufacturer website.&lt;/p&gt;
&lt;p&gt;You should be able to find the datasheet from there.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/481005?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 08:23:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da83f5a0-e5f0-4403-aa01-a29e6d57a5bb</guid><dc:creator>Madhu Mohan Reddy</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;can you please send the link of&amp;nbsp;&lt;span&gt;9.5.3.10 i cant find and please check the transferSPI function is it correct or not&lt;br /&gt;&lt;br /&gt;Thank you in advance.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/480997?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 07:38:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bff752c-2c0d-4544-9cfe-30cbcd7e0799</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Madhan Mohan Reddy"]In logic analyzer when i sent 0x00(MOSI)[/quote]
&lt;p&gt;0x00 is on the MISO line, according to your trace, while you are sending 0x20 0xFF (where FF is the&amp;nbsp;number of registers to read)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would recommend that you check chapter&amp;nbsp;9.5.3.10 RREG: Read From Register in the datasheet for your connected sensor. This explains how you should interface the sensor.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/480983?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 06:13:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cda4067-3e1b-4cc8-9b18-d579a6b1132e</guid><dc:creator>Madhu Mohan Reddy</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;These are the settings of logic analyzer 1Ms/s and hold off time is 100 m/s&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In logic analyzer when i sent 0x00(MOSI) the data receiving is 0x3E(MISO) correct&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/5187.Screenshot-_2800_9_2900_.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But while printing the same on console i am getting 0x30 why and in&amp;nbsp;&amp;nbsp;spi_transceive function sending data size is N means receiving data should be N+1 or not&amp;nbsp;&lt;br /&gt;below is my function please check&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0207.Screenshot-_2800_10_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/5078.Screenshot-_2800_11_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/480627?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 09:25:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d268d880-85e0-40a0-a098-b043ea011f59</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What are the settings in your Saleae Logic application? Because it seems like you&amp;#39;re still sampling at a lower frequency than the SPIM is running on.&lt;/p&gt;
&lt;p&gt;Your clock line should look like channel 0 in this example trace:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1714037058459v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/480466?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 13:02:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d08b384b-c804-4f76-97e7-415bc08c9d26</guid><dc:creator>Madhu Mohan Reddy</dc:creator><description>&lt;p&gt;In&amp;nbsp;&lt;span&gt;spi_transceive_dt() first byte is dummy as per document so 2nd byte Iam reading but 2nd byte also coming from sensor is zero&lt;br /&gt;&lt;br /&gt;when I increase SCLK frequency as 8 MHZ&amp;nbsp; it is showing like this and miso line is transmitting when CS pin is in high&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/1067.Screenshot-_2800_7_2900_.png" /&gt;&lt;br /&gt;&lt;br /&gt;Iam sending the command and receiving the sensor value using transferSPI function&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/6758.Screenshot-_2800_2_2900_.png" /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2548.Screenshot-_2800_4_2900_.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/1376.Screenshot-_2800_5_2900_.png" /&gt;&lt;br /&gt;&lt;br /&gt;I am sending through uart values are not coming&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI CS pin going High and From Transceiving function data is not coming.</title><link>https://devzone.nordicsemi.com/thread/480448?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 12:28:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7986b8e5-33d3-4a2c-951f-eac99a1c1946</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Your /CSN pin works as it should. Goes low when the transmission occurs, and back to idle level afterwards (ie. high level)&lt;/p&gt;
&lt;p&gt;You need to adjust your sampling frequency in the saleae logic application, looks like it is too low.&lt;/p&gt;
&lt;p&gt;Looks like you&amp;#39;re sending one byte and receiving two. Can you share what you&amp;#39;re sending and receiving?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>