<?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>How to make communication between nordic and msp430 by spi interfaces?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81694/how-to-make-communication-between-nordic-and-msp430-by-spi-interfaces</link><description>Hi Team, 
 I am working on a project. It requires nordic chips (slaves) to communicate with msp430 (master). I use the nordic example SPIS as the initial code of the nordic part. And use the example SPI code as the initial code on msp430. I observe they</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Nov 2021 10:20:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81694/how-to-make-communication-between-nordic-and-msp430-by-spi-interfaces" /><item><title>RE: How to make communication between nordic and msp430 by spi interfaces?</title><link>https://devzone.nordicsemi.com/thread/340003?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 10:20:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e08149c-1f8b-49af-b082-41fa08c5caa8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Please try to analyze the data using a logic analyzer. What does the data over the SPI look like? Are you sure the 0x03 isn&amp;#39;t there as well?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make communication between nordic and msp430 by spi interfaces?</title><link>https://devzone.nordicsemi.com/thread/339760?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 08:29:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3074ebf-5b70-410c-9833-c63caa69b428</guid><dc:creator>lgs</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Now I can receive the data from the spi. But one problem is in the first character is 0x03 always.&lt;/p&gt;
&lt;p&gt;Do you know what&amp;#39;s the root cause? and how to solve it?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Gaosheng&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/pastedimage1637310489366v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make communication between nordic and msp430 by spi interfaces?</title><link>https://devzone.nordicsemi.com/thread/339573?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2021 08:59:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f2d8c4b-141d-4a6e-9a4d-b9ed4ae5ad44</guid><dc:creator>lgs</dc:creator><description>&lt;p&gt;Dear Edvin,&lt;/p&gt;
&lt;p&gt;The output value is &amp;quot;0x10001304: FFFFFFFF&amp;nbsp;&amp;quot;. I try again. If I have further questions, I will let you know.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Gaosheng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make communication between nordic and msp430 by spi interfaces?</title><link>https://devzone.nordicsemi.com/thread/339562?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2021 08:21:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3ce406e-ce42-4685-b744-0023c462ea06</guid><dc:creator>Edvin</dc:creator><description>[quote user="lgs"]In my project, the master&amp;#39;s frequency is 16 MHz or 1 MHz.[/quote]
&lt;p&gt;Out of those two, I would try 1MHz first, and if you get it working, then you can test 16MHz.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What voltage is the SPI master using on the GPIOs? And what voltage output is your nRF52840 using on the GPIOs? You can check using the nRF Command Line Tools command:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;nrfjprog --memrd 0x10001304&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The value should correspond to something from &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/uicr.html?cp=4_0_0_3_4_0_7#register.REGOUT0"&gt;this array&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Does it say FFFFFFFF? If so, your GPIOs are running on 1.8V. If you want to try to increase the GPIO voltage to 3.3v, try setting this manually using:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;nrfjprog --memwr 0x10001304 --val 0xFFFFFFFD&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;and see if that helps. If it does, we can look into doing this from the application.&amp;nbsp;&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: How to make communication between nordic and msp430 by spi interfaces?</title><link>https://devzone.nordicsemi.com/thread/339529?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 22:24:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be0c5732-bfed-4466-b8c5-0de9cba40872</guid><dc:creator>lgs</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;I am trying all methods, it still cannot work.&amp;nbsp; Could you help me?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Gaosheng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make communication between nordic and msp430 by spi interfaces?</title><link>https://devzone.nordicsemi.com/thread/339527?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 21:25:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9131a47d-f8b2-4910-8ea9-216be2c7bfcc</guid><dc:creator>lgs</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;I tried all modes, they all failed. In my project, the master&amp;#39;s frequency is 16 MHz or 1 MHz.&lt;/p&gt;
&lt;p&gt;So, what&amp;#39;s your advice?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Gaosheng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make communication between nordic and msp430 by spi interfaces?</title><link>https://devzone.nordicsemi.com/thread/338949?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 09:21:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8308045a-1292-437f-8082-160a8d08d30d</guid><dc:creator>lgs</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Thank you! As your reply, I have something to clear.&lt;/p&gt;
&lt;p&gt;1. I using nRF SDK 17.0.2, actually it integrates with nRF Mesh5.0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. I will try based on the examples you mentioned on 17.0.2 firstly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best wishes,&lt;/p&gt;
&lt;p&gt;Gaosheng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make communication between nordic and msp430 by spi interfaces?</title><link>https://devzone.nordicsemi.com/thread/338939?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 09:02:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74cd4df6-2230-4cae-93e3-3db795e0a52f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What SDK (nRF5 SDK or nRF Connect SDK) are you using, and what version?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Since you didn&amp;#39;t mention it, I&amp;#39;ll take a guess, and you can correct me if you are using something else.&lt;/p&gt;
&lt;p&gt;I assume you are using the nRF5 SDK v17.1.0. Did you check out the SPIS example from SDK\examples\peripheral\spis\pca10056\blank\&amp;lt;your IDE&amp;gt;?&lt;/p&gt;
&lt;p&gt;in main(), where it initalizes the spis:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    nrf_drv_spis_config_t spis_config = NRF_DRV_SPIS_DEFAULT_CONFIG;
    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;
		spis_config.mode = 

    APP_ERROR_CHECK(nrf_drv_spis_init(&amp;amp;spis, &amp;amp;spis_config, spis_event_handler));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;the nrf_drv_spis_config_t&amp;nbsp; struct has a parameter called &amp;quot;nrf_spis_mode_t mode&amp;quot;. Try the different modes to see whether your master is using a different mode than the default mode used by the nRF (NRF_SPIS_MODE_0) by testing these:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;typedef enum
{
    NRF_SPIS_MODE_0, ///&amp;lt; SCK active high, sample on leading edge of clock.
    NRF_SPIS_MODE_1, ///&amp;lt; SCK active high, sample on trailing edge of clock.
    NRF_SPIS_MODE_2, ///&amp;lt; SCK active low, sample on leading edge of clock.
    NRF_SPIS_MODE_3  ///&amp;lt; SCK active low, sample on trailing edge of clock.
} nrf_spis_mode_t;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t work, what frequency is the SPI from your master using?&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></channel></rss>