<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.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>Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/products/devtools/stm32f4-discovery-expansion-boards/f/forum/47551/discover-wi-fi-module-spi-communication</link><description>I&amp;#39;ve been messing around for days and have been unable to get the SPI communication with the Wi-Fi module to work, it would never respond at all. I couldn&amp;#39;t get the demo UART code to respond either, but I need SPI for the increased bandwidth anyways.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><lastBuildDate>Wed, 18 Feb 2015 22:08:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://community.element14.com/products/devtools/stm32f4-discovery-expansion-boards/f/forum/47551/discover-wi-fi-module-spi-communication" /><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/181055?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2015 22:08:23 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:4022d3b2-6cce-4bcf-9738-cab394cec2f4</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;For my latest adventure I&amp;#39;m trying to implement the ACK bit in the protocol. It appears that the checksum is calculated differently when that bit is set and the response that I&amp;#39;m seeing is not well formed. I expect 02 80 80 FF FF 04. Instead I see 80 80 FF FF 04. Following the mal-formed ACK there is a normally formed sn8200 reply.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;I&amp;#39;ve attached sample code that demonstrates this (as well as using DMA) with some instructions on how to run it in the README.txt. (and a git repo with code committed before I made any changes.) On my PC this is in C:\STM32Cube_FW_F4_V1.4.0\Projects\STM32F429I-Discovery\Examples\SPI.&lt;/p&gt;
&lt;div class="migration-injected-attachments"&gt;&lt;div style="font-weight:bold;margin:15px 0 5px 0;"&gt;Attachments:&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;table style="border:0;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;span class="_se_attachment" id="attid_https://www.element14.com/community/api/core/v3/attachments/166636"&gt;&lt;a href="https://community.element14.com/cfs-file/__key/communityserver-discussions-components-files/85/SPI_5F00_FullDuplex_5F00_ComDMAsmplMurata.zip"&gt;community.element14.com/.../SPI_5F00_FullDuplex_5F00_ComDMAsmplMurata.zip&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/181054?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2015 16:58:12 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a5737a5e-ccca-447c-aca8-15fa159bad07</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;Hi Clem,&lt;/p&gt;&lt;p style="margin:0;"&gt;Thanks for the info and the help. That describes programming the EVB. That&amp;#39;s not what we want to do. Our plan is to use the sn8200 (sn8205 actually) as to provide a way for another processor to communicate with a host PC via WiFi. We don&amp;#39;t plan to program our application on the sn8200 itself. We thought we could do this by using the published APIs for the sn8200. I have not been entirely successful getting that to work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/181053?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2015 16:51:33 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:435e569b-aac9-40d1-a2e4-498b5e6d3772</guid><dc:creator>clem57</dc:creator><description>&lt;p style="margin:0;"&gt;Found it! &lt;a class="jive-link-external-small" href="http://wireless.murata.com/RFM/data/wiced_application_development_with_sn82xx_evk.pdf" rel="nofollow ugc noopener" target="_blank" title="http://wireless.murata.com/RFM/data/wiced_application_development_with_sn82xx_evk.pdf"&gt;http://wireless.murata.com/RFM/data/wiced_application_development_with_sn82xx_evk.pdf&lt;/a&gt; This PDF shows how to use WICED with the SN8200 board. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/181052?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2015 16:42:09 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:ac0d5760-7383-48fe-a276-1925507154fe</guid><dc:creator>clem57</dc:creator><description>&lt;p style="margin:0;"&gt;Hi Hank,&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From what I can tell Broadcom sold the chip to Murata about 1-2 years ago. So if the firmware should be based on Broadcom then it could already be WICED capable without firmware changes. I do not have this, so you would need to try. I would be interested in the results which ever way you decide to go.&lt;/p&gt;&lt;p style="margin:0;"&gt;Hope this helps,&lt;/p&gt;&lt;p style="margin:0;"&gt;Clem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/162411?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2015 16:32:44 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8617ac43-4335-4156-a5e9-7d6648adbb07</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;Hi Clem,&lt;/p&gt;&lt;p style="margin:0;"&gt;From the discussions I&amp;#39;d seen about WICED I had the impression that it was intended to customize the firmware on the SN8200. Our desire is to use the SN8200 as a peripheral for another system and using the factory firmware on the sn8200 itself. Are you suggesting that WICED can be used to develop S/W to run on another processor (such as a Discovery board) and interface with the sn8200?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/162409?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2015 16:20:26 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d6e45918-fdea-451f-898b-b0906fc827f3</guid><dc:creator>clem57</dc:creator><description>&lt;p style="margin:0;"&gt;This &lt;a class="jive-link-message-small" href="https://www.element14.com/community/message/95583/l/wifi-sn8200#95583" title="http://www.element14.com/community/message/95583/l/wifi-sn8200#95583"&gt;http://www.element14.com/community/message/95583/l/wifi-sn8200#95583&lt;/a&gt; led me to the link btw&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/162408?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2015 16:19:26 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:4c1b26fd-a8fe-4527-9009-0fbf47230511</guid><dc:creator>clem57</dc:creator><description>&lt;p style="margin:0;"&gt;Not sure of your host, but this seems like a possibility based on gcc toolchain &lt;a class="jive-link-external-small" href="http://www.broadcom.com/products/wiced/wifi/" rel="nofollow ugc noopener" target="_blank" title="http://www.broadcom.com/products/wiced/wifi/"&gt;http://www.broadcom.com/products/wiced/wifi/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/66233?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2015 15:27:06 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:e922cbed-61b3-44e4-aead-59d940ce7755</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;Not that I am aware of.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;The package which can be downloaded from Element14 includes sample code for the UART version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/66225?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2015 15:18:24 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:188f6532-6ee9-4aca-bb70-b5eabcb85740</guid><dc:creator>clem57</dc:creator><description>&lt;p style="margin:0;"&gt;@&lt;a class="jive-link-external-small" href="http://www.element14.com/community/people/hankb" target="_blank" title="http://www.element14.com/community/people/hankb"&gt;hankb&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp; This document looks like a very low level guide to writing TCP/IP at the socket layer or UDP. Is there another interface that is more high level? &lt;/p&gt;&lt;p style="margin:0;"&gt;Clem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/66212?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2015 12:42:48 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:55806a72-092e-45b1-b4db-13b523c09c13</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;Combing through the &amp;quot;SNIC Serial Interface Specification&amp;quot; v2.6&lt;span style="font-size:10pt;"&gt; I find a message that the host must send to the SN8200 in response to the WIFI_NETWORK_STATUS_IND message with the SCID &lt;/span&gt;&lt;span style="font-size:10pt;"&gt;WIFI_NETWORK_STATUS_CFM. The value for this SCID is not documented in the file nor can I find it used in any of the example code. It must be important otherwise it &lt;/span&gt;would&lt;span style="font-size:10pt;"&gt; not be described. &lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;font-size:13.3333330154419px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;font-size:13.3333330154419px;"&gt;What is the correct value for this? Can I guess it is the same as WIFI_NETWORK_STATUS_IND? Maybe WIFI_NETWORK_STATUS_IND|0x80?&lt;/p&gt;&lt;p style="margin:0;padding:0px;font-size:13.3333330154419px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;font-size:13.3333330154419px;"&gt;thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/66137?ContentTypeID=1</link><pubDate>Mon, 16 Feb 2015 19:41:29 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:79f40dce-3b1d-4756-87c1-36b47438a6c7</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;Hi Michael,&lt;/p&gt;&lt;p style="margin:0;"&gt;Thank you for your insight into SPI communication. I implemented that, driving a GPIO but with S/W and asserting prior to read/write and de-asserting when complete and it has improved communication considerably. The sn8200 still seems a little wonky. If I disconnect form the AP it seems to have a *lot* of difficulty reconnecting. Once connected however, it reports a good connection about 1 1/2 s following reset. I&amp;#39;ve recoded the S/W that manages this to not disconnect - just shutdown when not needed. The sn8200 stores connection information in NVM and uses that on the next restart. (I need to see if it stores the shutdown too. Parhaps the code should just pull power or assert reset when WiFi is not needed.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;thanks,&lt;/p&gt;&lt;p style="margin:0;"&gt;hank&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/66080?ContentTypeID=1</link><pubDate>Sun, 15 Feb 2015 16:00:38 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:0b9922bc-35a0-411c-ba8e-228ff4928de8</guid><dc:creator>michaelkellett</dc:creator><description>&lt;p style="margin:0;"&gt;Unless you know exactly how the logic inside the Murata chip is implemented then some of your questions can&amp;#39;t be answered, for example&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;quot;NSS won&amp;#39;t be high for very long, no? In that case it might as well be held low continuously.&amp;quot;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;For all you or I know there is some edge triggered thing inside the Murata chip which has to be operated for it to work correctly - I&amp;#39;ve certainly designed FPGA SPI ports where the rising edge on NSS clears some internal error states in the SPI peripheral - I understand that this is common.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;So you need to do exactly what the data sheet says as far as possible.&lt;/p&gt;&lt;p style="margin:0;"&gt;It is not clear if yout should raise/lower NSS after each byte or not - you&amp;#39;ll need to test. &lt;/p&gt;&lt;p style="margin:0;"&gt;But this section from the serial interface manual is clear enough:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;em&gt;When the SN8200 module has data, it indicates to&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;em&gt;the host by asserting a dedicated GPIO line (ALRT/). The signal transitions from high to low to signal the&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;em&gt;event, and returns to the high state prior to the completion of the current data transfer. If the host connects&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;em&gt;this signal to an interrupt line, then upon receiving the GPIO interrupt, the host may assert NSS and start&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;em&gt;clock to initiate data transfer from the module. In the case when the GPIO interrupt pin is not available on&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;em&gt;the host, it may assert NSS and send clock periodically to poll data from the module&lt;/em&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;They obviously expect NSS to be asserted at the start of each read out operation so by implication it must be de-asserted at the end of each.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;With regard to timing, while they show MISO from the ls bit persisting until just after NSS goes high they do NOT show this for MOSI, there should be no problem using any reasonable (ST is included) SPI interface.&lt;/p&gt;&lt;p style="margin:0;"&gt;I would not be using DMA until it was working properly without.&lt;/p&gt;&lt;p style="margin:0;"&gt;Since Murata don&amp;#39;t spec the gap between NSS rising and NSS falling I suggest you play it safe and give it several PCLK times. And make sure you observe tsu(nss) and th(nss)&amp;nbsp; - which requires you to know the clock speed of the Murata chip.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;MK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187244?ContentTypeID=1</link><pubDate>Sat, 14 Feb 2015 00:15:23 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:71c9572c-f7d9-4b24-b25c-41ebdbe696f4</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;&amp;quot;&lt;span style="color:#333333;font-family:Verdana;font-size:12px;"&gt;I&amp;#39;m baffled that both you and Hank are having problems but haven&amp;#39;t tried cranking NSS exactly as Murata show it in the timing diagram. (Perhaps Hank has, I can&amp;#39;t quite tell from his reply).&lt;/span&gt;&amp;quot;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;I suppose I have a deeply held belief that holding NSS low the entire time should work. And if it didn&amp;#39;t work, it would not work 100% of the time. I see something that seems to be in the vicinity of 50% success rate getting messages back from the sn8200.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;But if you have detailed knowledge of this, please share! The diagram shows NSS going low before the first bit is sent and going high before the last bit. Is that the last bit of each byte? The last bit of the entire transmission? I&amp;#39;m not sure I could even accomplish the former w/out bit-banging. (heh, I learned a new term. &lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/16x16/__key/communityserver-discussions-components-files/85/2620.contentimage_5F00_3.png"&gt;&lt;img alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/discussions/components/files/85/2620.contentimage_3.png-16x16.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=wPv0Tg2ittZwl1kAc%2BT9xOaKjin%2BaLjcLemL6cB0PRM%3D&amp;amp;se=2026-08-22T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=dTVpkup5yoe1It0VY5CD3A==" style="max-height: 16px;max-width: 16px;" /&gt;&lt;/a&gt;&lt;/span&gt; ) I could do the latter. In that case what is the minimum time between when NSS goes high and low? If I&amp;#39;m running back to back DMA reads and issue the next read as soon as the previous completes, NSS won&amp;#39;t be high for very long, no? In that case it might as well be held low continuously.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187240?ContentTypeID=1</link><pubDate>Thu, 12 Feb 2015 12:53:25 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cb38c380-8d38-4713-aa18-91d6b5d2fb1c</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;To clarify:&lt;/p&gt;&lt;p style="margin:0;"&gt;(My first effort working in depth with SPI. Other times I&amp;#39;ve used it with no difficulty.)&lt;/p&gt;&lt;p style="margin:0;"&gt;I&amp;#39;m using the STM32Cube libraries (*) and started with a SPI/DMA example for the processor board (STM32F429I-Discovery) I copied the example message from the SPI SNIC manual and sent that to the SN8200 and watched for the reply. Eventually got that working by connecting NSS to ground - we will only have one device on this SPI bus anyway. I also found that reducing the baud rate seemed to help. With communication more or less working I can finally work out the logic in my app and perhaps try some other things.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;From working with canned messages I moved to code that builds and exchanges &amp;quot;real&amp;quot; messages.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;I have access to a Beagle protocol analyzer and may hook that up to see if the &amp;#39;missing messages&amp;#39; are truly missing or if the host app is somehow just not seeing them.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;(*) I&amp;#39;m using the libraries because I have no in depth knowledge about SPI configuration. That&amp;#39;s why I refer questions about this to the libraries.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187239?ContentTypeID=1</link><pubDate>Thu, 12 Feb 2015 08:10:45 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:7af45a27-8a41-483e-9059-4559e35e73c2</guid><dc:creator>michaelkellett</dc:creator><description>&lt;p style="margin:0;"&gt;What were you sending on MOSI while receiving ?&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;The way that SPI works is that for every byte received one is sent and vice versa.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;It is very common that you have to deliberately set the contents of the &amp;quot;dummy&amp;quot; byte sent out by the master while you clock in replies.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;I&amp;#39;m baffled that both you and Hank are having problems but haven&amp;#39;t tried cranking NSS exactly as Murata show it in the timing diagram. (Perhaps Hank has, I can&amp;#39;t quite tell from his reply).&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;MK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187237?ContentTypeID=1</link><pubDate>Thu, 12 Feb 2015 05:06:31 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:10965b8e-890d-41c2-88ab-b30999d3765c</guid><dc:creator>clem57</dc:creator><description>&lt;p style="margin:0;"&gt;Ouch! So SPI is defined as &lt;strong&gt;possibly&lt;/strong&gt; full duplex, but &amp;quot;&lt;span style="color:#333333;font-family:Verdana;font-size:12px;background-color:#f6f6f6;"&gt;the device actually &lt;strong&gt;only&lt;/strong&gt; does half-duplex&amp;quot;. This makes sense because WiFi is a half duplex protocol at present!&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#333333;font-family:Verdana;font-size:12px;background-color:#f6f6f6;"&gt;Clem&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187233?ContentTypeID=1</link><pubDate>Thu, 12 Feb 2015 04:35:50 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:3b2dcab3-db34-433f-b10a-dee1a5e838fc</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;Found some new info from a discussion on the Broadcom website (&lt;a class="jive-link-external-small" href="http://community.broadcom.com/message/12100" rel="nofollow ugc noopener" target="_blank" title="http://community.broadcom.com/message/12100"&gt;SN8200 SPI message format | Broadcom Community&lt;/a&gt;). Apparently the device actually only does half-duplex, and will corrupt replies unless you send 0xFF on MOSI while receiving. I haven&amp;#39;t tested this yet though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187232?ContentTypeID=1</link><pubDate>Wed, 11 Feb 2015 21:53:27 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:c635b40b-ddb0-402f-9369-ff1465cc66c2</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;So then I&amp;#39;m not the only one having issues with the device being inconsistent. Good to know. I actually already drive the reset line low then high, though I didn&amp;#39;t know about the &lt;span style="color:#333333;font-family:Verdana;font-size:12px;"&gt;GEN_PWR_UP_IND_RSP, I just coded a delay.&lt;/span&gt; As for lowering the baud rate, the problem with that is I need the high baud rate as I intend on transferring data at several Mbps. According to the docs, the device is supposed to be able to go up to 18.4 Mbps on the SPI interface, so I&amp;#39;m not entirely sure what is going on here. On another note, I found out why the UART interface didn&amp;#39;t work. The send code in the UART interface example is botched up so it didn&amp;#39;t wait for one byte to finish before sending the next, therefore it lost most of the data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187231?ContentTypeID=1</link><pubDate>Wed, 11 Feb 2015 21:32:16 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:85c51189-ab41-439d-a99a-dda3074db1d4</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;I&amp;#39;ll reiterate that I have NSS grounded and that seems not to be causing any difficulty.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Here are a couple other things I&amp;#39;ve done.&lt;/p&gt;&lt;p style="margin:0;"&gt;1) This app will only turn on the SN8200 when needed so the first step in the sequence is to drive the reset line and release it (low then high.) The code then waits for the GEN_PWR_UP_IND_RSP, When this comes it copies the sequence number from the incoming message and sets the outbound sequence to be 1+ that. This message comes in about 840 msec or it does not come at all. If it does not arrive (presently 10s timeout), the app goes through the reset process again.&lt;/p&gt;&lt;p style="margin:0;"&gt;2) I have increased the SPI baud rate prescaler to 32. That seems to cause the SN8200 to respond to some messages that previously got no response. I may slow it down further.&lt;/p&gt;&lt;p style="margin:0;"&gt;3) I have coded back to back receives that only get interrupted when there is something to send at which time the code ussues a send/receive. Hopefully no incoming messages will be lost.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;At present the device seems to be inconsistent. I am surprised that the host does not receive power up message 100% of the time following reset.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;I tried using the /ALRT input and it seems to be low all the time. (I have not scoped it, just looking at it with a voltmeter.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187230?ContentTypeID=1</link><pubDate>Wed, 11 Feb 2015 21:27:32 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:275261d0-5748-476d-9765-603f99eb3273</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;The ALRT pin never seems to go low anymore, so I can&amp;#39;t make it clock out only when it&amp;#39;s ready. I&amp;#39;m not going to be able to debug this for a while, as it turns out that logic analyzer I linked to previously ships from China, and it&amp;#39;s going to cost so much to ship it that I&amp;#39;d probably be better off just getting a Saleae logic analyzer. Unfourtunately, I don&amp;#39;t have the money to spend on either right now, so there&amp;#39;s not much I can do. Might look into going to a hackerspace later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187229?ContentTypeID=1</link><pubDate>Wed, 11 Feb 2015 11:25:58 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:7fc932a4-07ec-4f46-b740-b05a7f520625</guid><dc:creator>michaelkellett</dc:creator><description>&lt;p style="margin:0;"&gt;Before you spend your money why not at least try to code it so that your waveforms look exactly like those on the data sheet ?&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;And try clocking data out only when it&amp;#39;s ready.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;These things might not make any difference but they won&amp;#39;t cost you anything either.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;MK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187228?ContentTypeID=1</link><pubDate>Wed, 11 Feb 2015 09:35:57 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:83adbae6-c2a1-4d4c-a0ee-e4747531d020</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;The documentation (text, not diagrams) actually seems to suggest that NSS is just a slave select, not a framing signal. It also indicates that using ALRT is optional, and it&amp;#39;s fine to just clock data out of the module at any time. I don&amp;#39;t see any reason for it to work fine at low baud rates but not high baud rates. I&amp;#39;ve also verified that the data in the reply is correct... except when it isn&amp;#39;t, due to some sort of random data corruption (probably also caused by whatever is making it not work at high baud rates). I think I might be stuck with no choice but to buy a logic analyzer, and look at what exactly is happening on the pins.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187227?ContentTypeID=1</link><pubDate>Wed, 11 Feb 2015 09:04:13 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d061f97f-c7ad-4ddc-a1b1-821998aab944</guid><dc:creator>michaelkellett</dc:creator><description>&lt;p style="margin:0;"&gt;Some thoughts which may help:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;SPI is not implemented in a standard way so the Murata module may or may not take note of NSS or SS.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;However it is normal to use NSS as a framing signal, it is much more than just a chip select for multiple slaves.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;The SyChip document &amp;quot;Serial Interface Specification&amp;quot;, page 13 shows that NSS is used as a framing signal for each byte.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;On page 23 of &amp;#39;SN820X Wi-Fi Network Controller Module Family Data Sheet Version 2.2 February 28, 2014&amp;#39; there is a detailed SPI timing diagram which bothers to specify NSS setup and hold times and a whole load of other stuff. Your first check when things don&amp;#39;t work quite right is that you are meeting ALL these limits. Some of them may not matter but you have no way of knowing which ones.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;You should send a command, check the state of ALRT/ and clock the data out of the SN82xx chip only when it has asserted ALRT/.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;There seem to be plenty of ways to upset the chip by protocol errors -&amp;nbsp; are you using&amp;nbsp; ACK ?&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;MK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/187226?ContentTypeID=1</link><pubDate>Tue, 10 Feb 2015 23:40:12 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:3967f81c-74b0-4d32-9100-7e83ef6fcc4d</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;No, I&amp;#39;m currently not bit banging. NSS has nothing to do with this, considering plenty of other people have just tied it to ground and it worked. Like I said, I&amp;#39;m getting replies but not reliably at high baud rates. NSS only matters when controlling multiple slaves from a single master, and in this case I only have one slave.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discover Wi-Fi Module SPI Communication</title><link>https://community.element14.com/thread/181023?ContentTypeID=1</link><pubDate>Tue, 10 Feb 2015 23:34:50 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:f46c9fec-0291-441c-aa13-b327b19ccbc2</guid><dc:creator>clem57</dc:creator><description>&lt;p style="margin:0;"&gt;If you look at the datasheet on this board, they may give a diagram that says when the CS is high or low in relationship to the clock. The timing of when these change is important. Are you bit banging?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>