<?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>ADXL362 with nRF9160 DK not working</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82648/adxl362-with-nrf9160-dk-not-working</link><description>Hello Nordic Support, 
 
 I started with a sensor sample project for ADXL362 Three Axis Accelerometer ( https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/sensor/adxl362 ) and connected to my nRF9160DK board. I used the same SPI lines that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Dec 2021 09:41:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82648/adxl362-with-nrf9160-dk-not-working" /><item><title>RE: ADXL362 with nRF9160 DK not working</title><link>https://devzone.nordicsemi.com/thread/344902?ContentTypeID=1</link><pubDate>Thu, 23 Dec 2021 09:41:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:615e1774-9c8f-4ff6-820c-afe5cbcba34b</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Happy to hear you found the solution!&lt;/p&gt;
&lt;p&gt;Have a happy holiday!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADXL362 with nRF9160 DK not working</title><link>https://devzone.nordicsemi.com/thread/344849?ContentTypeID=1</link><pubDate>Wed, 22 Dec 2021 20:00:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18015072-766f-4766-819e-1ca5cd6e0d81</guid><dc:creator>Pritesh</dc:creator><description>&lt;p&gt;I managed to find the problem. When I connected the ADXL362 with P2 header of the nRF91 board the PIN (19,18,17,16) aligned with the SPI pins on ADXL362 P2 header, So I was able to connect it directly in to the header to keep signal path short for low signal distortion at 1.8V IOs, except the GND pin that I had to bend so as to not let it go in the headers. I am using power and GND pins on the second header P1 on ADXL362 board to provide power and GND from nRF91 board.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1640200878518v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;From the schematic it looks like the GND on P2 pin 1 do not go to any specific GND pin on ADXL362 and terminates to board ground. But if I leave P2 header pin 1 GND not connected, ADXL362 respond with &amp;lt;F0&amp;gt; on Chip Id read command. And If I connect P2 header pin 1 GND to GND pin on nRF91DK then I&amp;nbsp; get proper &amp;lt;F2&amp;gt; response for Chip Id read command. This is something I do not understand. The ADXL362 respond but with value that is not documented in the data sheet.&lt;/p&gt;
&lt;p&gt;Today I removed all the jumper wires even for power and ground and connected everything with very small piece of wires between the headers to improve SPI signal quality at high speed. My observation is at 8Mhz even when two board are connected directly without any jumper wires, the clock signals distorts and looks triangle on oscilloscope because of the length of trace path from nRF91 to board headers to ADXL362 and IO voltage being 1.8V. Even at 4 Mhz clock signals are not perfectly square but has acceptable slew rate. Note: Slew rate measurement on oscilloscope was done with logic analyzer probes disconnected. Any SPI chip connected to headers of nRF91DK need to be clocked down to reduce signal distortion.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/IMG_5F00_20211222_5F00_130944.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;I am running nRF91 SPI at 1Mhz and signals looks clean and square, even on 2 Mhz clock rate. And I am able to get correct Chip Id read response &amp;lt;F2&amp;gt; and&amp;nbsp; good X,Y&amp;amp;Z data from ADXL362.&lt;/p&gt;
&lt;p&gt;Still the requirement of connecting header P2 pin 1 GND to host board ground in addition to power and ground connection on P1 header of ADXL362 baffles me. But I have a workable solution now that I can proceed with.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADXL362 with nRF9160 DK not working</title><link>https://devzone.nordicsemi.com/thread/344817?ContentTypeID=1</link><pubDate>Wed, 22 Dec 2021 14:28:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cfc131e-e3f2-487d-b979-f141c3c10d79</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Thanks for providing the this image.&amp;nbsp;Is it correct that you have connected&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1640182622502v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;ADXL362&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Pin&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;Overlay&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;SCLK&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;SPI Communications Clock&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;P0.15&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;sck-pin&lt;/span&gt;&lt;span&gt; = &amp;lt;19&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;MOSI&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Master Output, Slave Input. SPI serial data input.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;P.016&lt;/td&gt;
&lt;td&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;mosi-pin&lt;/span&gt;&lt;span&gt; = &amp;lt;18&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;MISO&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Master Input, Slave Output. SPI serial data output.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;P0.17&lt;/td&gt;
&lt;td&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;miso-pin&lt;/span&gt;&lt;span&gt; = &amp;lt;17&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;CS&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;SPI Chip Select, Active Low. Must be low during SPI communications.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;P0.18&lt;/td&gt;
&lt;td&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;cs-gpios&lt;/span&gt;&lt;span&gt; = &amp;lt;&amp;amp;&lt;/span&gt;&lt;span&gt;gpio0&lt;/span&gt;&lt;span&gt;&amp;nbsp;16&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;GPIO_ACTIVE_LOW&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;INT1&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Interrupt 1 Output. INT1 also serves as an input for external clocking.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;?&lt;/td&gt;
&lt;td&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;int1-gpios&lt;/span&gt;&lt;span&gt; = &amp;lt;&amp;amp;&lt;/span&gt;&lt;span&gt;gpio0&lt;/span&gt;&lt;span&gt;&amp;nbsp;15&lt;/span&gt;&lt;span&gt;&amp;nbsp;GPIO_ACTIVE_HIGH&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADXL362 with nRF9160 DK not working</title><link>https://devzone.nordicsemi.com/thread/344630?ContentTypeID=1</link><pubDate>Tue, 21 Dec 2021 14:22:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b60ec513-8ed9-478f-82e2-ce11b5b7d819</guid><dc:creator>Pritesh</dc:creator><description>&lt;p&gt;I am interfacing &lt;a href="https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/EVAL-ADXL362Z.html#eb-overview"&gt;ADXL362Z board &lt;/a&gt;with nRF91DK as seen in the image below. The same sensor board is returning correct Part ID &amp;lt;F2&amp;gt; when connected to Arduino board. I have shared logic analyzer captures for both Arduino and nRF91 DK in my previous posts.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/IMG_5F00_20211221_5F00_085255.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;The differences I can see between nRF91 DK SPI and Arduino board SPI waveform is that there is no delay between command and data output byte in Arduino but for nRF91 DK the delay is 16us for 1Mhz and 28us for 4Mhz. I am thinking this delay could be causing ADXL362 incorrect output.&lt;/p&gt;
&lt;p&gt;Can this delay be reduced or eliminated? Of is this inherent to SPI peripheral on SOC when SPI switch from write to read mode?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADXL362 with nRF9160 DK not working</title><link>https://devzone.nordicsemi.com/thread/344555?ContentTypeID=1</link><pubDate>Tue, 21 Dec 2021 10:43:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5da2e826-48ae-4b2c-a259-116849cbe2af</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;What device are you trying to interface? Are you sure this is the ADXL362?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADXL362 with nRF9160 DK not working</title><link>https://devzone.nordicsemi.com/thread/344448?ContentTypeID=1</link><pubDate>Mon, 20 Dec 2021 21:57:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee808097-bc63-4fb3-b0b7-1a4265721ad6</guid><dc:creator>Pritesh</dc:creator><description>&lt;p&gt;I sort of found the problem. The looked in to the adxl362 drivers provided in ncs v1.7.0 zephyr drivers and as per the &amp;quot;adxl362_init()&amp;quot; if sensor do not respond to Part ID read command &amp;lt;0B&amp;gt;&amp;lt;02&amp;gt; with &amp;lt;F2&amp;gt; then no further configuration is done on the sensor leaving sensor in standby mode. So further read of XYZ channels will not read any data. For some reason I am always getting &amp;lt;F0&amp;gt;&amp;nbsp; instead of &amp;lt;F2&amp;gt; for Part ID command. I dropped SPI clock rate top 1 MHZ and just in case signals has distortion at higher frequency. The sensor board is connected directly on the header of the nRF91DK board without any wires and signals are clean and square. But still Part ID read command is returning incorrect ID.&lt;/p&gt;
&lt;p&gt;I modified zephyr adxl362 driver (just for debugging) to by pass return on Part ID read error and let driver go ahead with sensor configuration. With that I am now able to read XYZ channels each time although channel data are noisy.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1640036187540v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;One thing I am finding very odd and not able to remove is the clock delay between command byte and data read byte. Delay is about 16us at 1Mhz SPI clock and 27us at 4Mhz SPI clock. I am not sure if this is causing the incorrect Part ID read, but I would like to minimize it if possible. It looks like delay of SPI peripheral in nRF91 when it switch write to read mode. Any idea how to reduce this delay?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADXL362 with nRF9160 DK not working</title><link>https://devzone.nordicsemi.com/thread/343773?ContentTypeID=1</link><pubDate>Wed, 15 Dec 2021 22:43:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd61ee51-5590-4a3d-ac29-2d180f7d900e</guid><dc:creator>Pritesh</dc:creator><description>&lt;p&gt;I do not want to change board controller firmware at this point, else I dont know what else will break. I changed my pin assignments to other pins that are not shared with board controller. But I am seeing the same SPI protocol waveform. The clock always stops&amp;nbsp; for about 30us after sending first 2 bytes (command).&lt;/p&gt;
&lt;p&gt;The other differences I can see between nRF91 DK SPI and Arduino board SPI waveform are:&lt;/p&gt;
&lt;p&gt;1. The MOSI io default state is low for nRF91 DK vs high for Arduino board.&lt;/p&gt;
&lt;p&gt;2. When master clocks to read 8 bytes out, the MOSI io stays high entire time in nRF91 DK vs stay low during bytes read and toggle between data bytes for Arduino board.&lt;/p&gt;
&lt;p&gt;3. The clocks for 8 data bytes read is contiguous without any break between each bytes read for nRF91 DK vs 1us idle between bytes reads for Arduino board.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It definitely looks like some kind of SPI configuration or SPI driver level issue. Need help urgently please.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1639607601115v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1639607532639v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADXL362 with nRF9160 DK not working</title><link>https://devzone.nordicsemi.com/thread/343611?ContentTypeID=1</link><pubDate>Wed, 15 Dec 2021 11:35:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20dd4253-18c1-4983-a587-3718d4a0660e</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Did you configure the board control to enable ext_mem_ctrl?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADXL362 with nRF9160 DK not working</title><link>https://devzone.nordicsemi.com/thread/343511?ContentTypeID=1</link><pubDate>Tue, 14 Dec 2021 22:05:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5158c127-7355-41cc-b0ca-1218e036e431</guid><dc:creator>Pritesh</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I resolved the sensor binding error. The device binding method used in the ADXL362 zephyr sensor sample code is not supported for ncs 1.7.0.&lt;/p&gt;
&lt;p&gt;I modified overlay file as below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1639518589994v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And the device binding method changed as below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1639518708289v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;With these changes, I am not getting binding error any more but sensor data read is not working. Looking at the SPI signal with a logic analyzer, the signals that master is outputting don&amp;#39;t seem to be correct for sensor to respond.&lt;/p&gt;
&lt;p&gt;This is the SPI trace with nRF9160 DK connected to ADXL362. The SPI clock stops several times while reading data.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1639519223700v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is the trace of the same sensor board connected to a arduino board:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1639519375783v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any suggestions where I can look for potential problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADXL362 with nRF9160 DK not working</title><link>https://devzone.nordicsemi.com/thread/343129?ContentTypeID=1</link><pubDate>Mon, 13 Dec 2021 11:17:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fd96c72-57df-4e2d-91ee-526e5a15a177</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf91_dk/UG/nrf91_DK/board_controller.html"&gt;verified that the board&amp;nbsp;controller is configured correctly&lt;/a&gt; as the pins configured are controlled by this device.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1639394081761v2.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1639394046574v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;More information about the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf9160.html#board-controller"&gt;board controller can be found here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>