cancel
Showing results for 
Search instead for 
Did you mean: 

SPWF04SA SPI interface

daniele2399
Associate II
Posted on May 12, 2017 at 11:11

Hi all,

I'm trying to use the SPWF04SA module in SPI mode. So far I've managed to put it in such a mode either with the AT commands or just by pulling high the IRQ line, however it seems to be stuck without any response and only very few times it recovers by starting to blink the LEDs and toggling the IRQ line. Which is the correct configuration and startup procedure?

Here are mine:

- SPI CLK polarity low, first edge triggered. NO PULL on this line.

- No pull on both MISO and MOSI.

- Pull-up on IRQ line and CS from the very beginning.

- Startup: 3.15V supply goes high, RST goes low for 100 ms, then goes back high.

After startup is done, the IRQ is triggered by the module at least once, but then it remains low most of the time with no LEDs blinking. Sometimes it recovers after a while with LEDs blinking and IRQ toggling.

I would really appreaciate any help, for the documentation is really lacking of details about this.

Thank you,

Daniele

#spwf04sa

Note: this post was migrated and contained many threaded conversations, some content may be missing.
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on June 10, 2017 at 12:04

Hi John,

issue with project compile has been solved. If will be part of next

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fembedded-software%2Fmcus-embedded-software%2Fstm32-embedded-software%2Fstm32cube-expansion-software%2Fx-cube-wifi1.html

package (FW3.0.2), very soon on the web.

EDIT:just released today

View solution in original post

11 REPLIES 11
Posted on May 12, 2017 at 12:07

Ciao Daniele,

can you please refer to this topic?

https://community.st.com/0D50X00009XkXswSAF

Some figures into datasheet are wrong...

Let me know if helps

jerry

daniele2399
Associate II
Posted on May 12, 2017 at 14:59

Hi Gerardo,

thank you for the reply. I already checked it out and configuration corresponds. As soon as the interrupt latches, I try to read out the 5 bytes header but cannot find the 0x02 sync word anywhere. Then the interrupt stops latching because probably I've not read out all the data in the pipeline. Is there any particular startup precedure to follow?

Thanks,

Daniele

Posted on May 12, 2017 at 18:23

afaik, nothing special.

A couple info:

- are you using

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-expansion-software/x-cube-wifi1.html

 package? It contains a good (I hope) reference to start working with SPI.

- are you using

X-NUCLEO-IDW04A1 board?

Other on HW:

- GPIO9, IRQ, pullup. trigger on falling edge

- chip select, pullup, trigger on falling edge

- clock polarity, low - sampling on rising edge (CPOL=0, CPHA=0)

Errata Corrige on pictures:

- on SPWF04S datasheet, pag 16, figures 5 & 6 are wrong on IRQ idle (fig5), and MISO CTRL byte (fig6)

- on IDW04A1 user manual, pag 6, figures 3 & 4 are inverted

j

John Ray
Associate II
Posted on May 18, 2017 at 11:47

Hello Gerardo,

ST has any good example using for SPI in SPWF04SA wifi module ? In

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fembedded-software%2Fmcus-embedded-software%2Fstm32-embedded-software%2Fstm32cube-expansion-software%2Fx-cube-wifi1.html

is used UART to communication with module, for SPI is only one file 'wifi_module_spi.c' with strange comments like: '// ???' or '//line is low does not mean that there is no more data' .

Thanks for help,

John R.

Posted on May 18, 2017 at 11:52

 ,

 ,

Hi John,

commenting ' ♯ define CONSOLE_UART_ENABLED' inside 'wifi_conf.h', you should be able to ,force STM32-Nucleo ,to use SPI interface. Recompile without that ♯ define.

Let me know if it works (I expect it works!)

Ciao

jerry

Posted on May 18, 2017 at 12:45

No it not working

:(

 

I have error:

make: *** No rule to make target `clean'. Stop. STM32L4xx-Nucleo-Client_Socket C/C++ Problem

 Thanks for help,

John R. 

Posted on May 18, 2017 at 13:33

Hi John,

your configuration in the file wifi_conf.h in Inc folder of the App (Client_Socket) should be like this:

&sharpifdef USE_STM32L4XX_NUCLEO

//&sharpdefine CONSOLE_UART_ENABLED

//&sharpdefine SPWF01

&sharpdefine SPWF04

&sharpendif

Do you confirm this is the configuration?

Which build tool are you using?

regards,

Mridu

Posted on May 18, 2017 at 13:37

Yea, I have the same configuration like you. I'm using System Workbench for STM32. 

Posted on May 18, 2017 at 14:13

Hi John,

the error '

make: *** No rule to make target `clean'. Stop. STM32L4xx-Nucleo-Client_Socket C/C++ Problem

' seems to be some settings/system related issue on your system workbench setup.

you cannot build any of the projects in system workbench?

regards,

Mridu