10 Replies Latest reply on Feb 25, 2015 7:02 AM by ogarcia

    WICED WLAN murata SN8200 SPI+DMA

      Hello,


      we are developing a WLAN-solution for one of our clients based on the murata SN8200 board. We want to use a DMA-based solution for higher bandwidth. According to the SNIC documentation a transfer rate of up to 18mbit/s is possible.  Is there a source code example for usage of SPI where the SN8200 is used as slave (preferrable using the wiced framework)?


        • 1. Re: WICED WLAN murata SN8200 SPI+DMA

          brean,

           

          the the ackme modules will support 14mbps if that is close enough for you.

           

          nick

          • 2. Re: WICED WLAN murata SN8200 SPI+DMA

            Hi Nick,

             

            We already decided to use the sn8200 board, all we need is some example

            that shows how we have to use the api. Reading the platform code I found

            some functionality for spi with dma, but I need the documentation how to

            use it properly.

             

            - Andreas

            Am 23.12.2014 18:27 schrieb "ndutton" <

            communities-list@community.broadcom.com>:

             

                   

            <http://community.broadcom.com/?et=watches.email.thread>     WICED WLAN

            murata SN8200 SPI+DMA

             

            reply from ndutton

            <http://community.broadcom.com/people/ndutton?et=watches.email.thread> in *WICED

            Wi-Fi Forums* - View the full discussion

            <http://community.broadcom.com/message/11092?et=watches.email.thread#11092>

             

            • 3. Re: WICED WLAN murata SN8200 SPI+DMA
              SeyhanA_31

              Hi,

               

              Wiced SDK already implements the SPI driver interface to BCM43362 and you do not need to do anything except define the SPI (SPI2) pin connections in "const platform_gpio_t wifi_spi_pins[]" .../platforms/<YourPlatform>/platform.c. Example could be found in .../platforms/BCM943362WCD4/platform.c file.

               

              In order to build the application using SPI to communicate to the BCM43362 add the "-SPI" on the Make Target command, default is SDIO.

               

              For example build the scan  application using SPI to communicate with BCM43362 on BCM943362WCD4 evaluation board following Make Target commands could be used:

                   snip.scan-BCM943362WCD4-FreeRTOS-LwIP-SPI download run -> Which uses FreeRTOS and LwIP with SPI

                   snip.scan-BCM943362WCD4-SPI download run -> Which uses ThreadX and NetXDuo with SPI

               

              If you like to interface your own peripherals via SPI, you may take a look at the "const platform_spi_t platform_spi_peripherals[]" setup for sample code in .../platforms/BCM943362WCD4/platform.c In this case the SPI1 is setup to interface peripherals.

               

              About Wiced SPI APIs for your own peripherals, API documentation could be found in .../doc/API.html and .../doc/API/group__spi.html

               

              Seyhan

              1 of 1 people found this helpful
              • 4. Re: WICED WLAN murata SN8200 SPI+DMA

                If I use the code at pastebin.com/PeEYSU8R I can receive data from the SPI interface, but if I change the mode from SPI_NO_DMA to SPI_USE_DMA I only get null bytes. I download my code using "snip.spi_test-SN8200x-FreeRTOS-LwIP-SPI download run" as target (It seems that -SPI does not make a difference). To make the SN8200x work as slave I changed the spi parameter:

                  spi_init.SPI_Mode = SPI_Mode_Slave;

                  spi_init.SPI_NSS = SPI_NSS_Hard;

                in the wiced_spi_init function.

                 

                Can you point me to a working example that uses SPI in DMA mode as slave?

                • 5. Re: WICED WLAN murata SN8200 SPI+DMA

                  Hi Brean,

                   

                  I have an EVB for the SN8000. In this board SPI is not working "as is" because SPI pins are not connected to the SN8000 chipset. I connected this pins myself and now the code is working with DMA... check connections on the SN8200 EVB (maybe you already did it... I hope this helps).

                   

                   

                  Best regards,

                   

                  Oscar.

                  • 6. Re: WICED WLAN murata SN8200 SPI+DMA

                    Hi Oscar,

                     

                    I am struggling to get the SN8000 EVK to work with SPI too.

                    SDIO samples are working fine but SPI samples wont work.

                    Which connections did you make on the EVB?

                    Which code changes are necessary to make the SPI samples work?

                     

                    Best regards,

                      David

                    • 7. Re: WICED WLAN murata SN8200 SPI+DMA
                      SeyhanA_31

                      Hi,

                       

                      Beside adding "-SPI" to make target to build using SPI interface of the BCM43362, SPI interface needs to be defined in the platform files.

                       

                      For reference you can take a look at the BCM943362WCD4 platform files.

                      /* Wi-Fi gSPI bus pins. Used by WICED/platform/STM32F2xx/WWD/wwd_SPI.c */
                      const platform_gpio_t wifi_spi_pins[] =
                      {
                          [WWD_PIN_SPI_IRQ ] = { GPIOC,  9 },
                          [WWD_PIN_SPI_CS  ] = { GPIOC, 11 },
                          [WWD_PIN_SPI_CLK ] = { GPIOB, 13 },
                          [WWD_PIN_SPI_MOSI] = { GPIOB, 15 },
                          [WWD_PIN_SPI_MISO] = { GPIOB, 14 },
                      };
                      

                       

                      The SPI/SDOI interface is selected by the GPIO_0 pin of the BCM43362. For BCM943362WCD4 it is connected to GPIOB_0 and it is defined in the wifi_control_pins[] of the platform file.

                      /* Wi-Fi control pins. Used by WICED/platform/MCU/wwd_platform_common.c
                       * SDIO: WWD_PIN_BOOTSTRAP[1:0] = b'00
                       * gSPI: WWD_PIN_BOOTSTRAP[1:0] = b'01
                       */
                      const platform_gpio_t wifi_control_pins[] =
                      {
                          [WWD_PIN_POWER      ] = { GPIOB,  2 },
                          [WWD_PIN_RESET      ] = { GPIOB,  5 },
                      #if defined ( WICED_USE_WIFI_32K_CLOCK_MCO )
                          [WWD_PIN_32K_CLK    ] = { GPIOA,  8 },
                      #else
                          [WWD_PIN_32K_CLK    ] = { GPIOA, 11 },
                      #endif
                          [WWD_PIN_BOOTSTRAP_0] = { GPIOB,  0 },
                          [WWD_PIN_BOOTSTRAP_1] = { GPIOB,  1 },
                      };
                      

                       

                      Seyhan

                      • 8. Re: WICED WLAN murata SN8200 SPI+DMA

                        Hi,

                         

                        I made the following connections in order to enable SPI on my SN8000 EVB:

                        -------------------------------------------------------------------------------

                        | ST MP PINOUT HEADER |     SN8000 SDIO CARD   |

                        -------------------------------------------------------------------------------

                             Pin 34                          |               CLK   

                             Pin 35                          |                D0

                             Pin 36                          |               CMD

                         

                         

                        Regards,

                         

                        Oscar

                        • 9. Re: WICED WLAN murata SN8200 SPI+DMA

                          Hi Oscar,

                           

                          thank you very much for your reply. Adding the connections to the SN8000 EVB enabled me to run the sample code using SPI.

                          No code changes were needed except for the murata patch for the SDK.

                           

                          Regards,

                            David

                          • 10. Re: WICED WLAN murata SN8200 SPI+DMA

                            Hi natwati,

                             

                            I'm happy to hear that!

                             

                            You are welcome!

                             

                            Regards,

                             

                            Oscar.