2017-05-12 02:11 AM
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.Solved! Go to Solution.
2017-06-10 05:04 AM
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
2017-05-12 03:07 AM
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
2017-05-12 05:59 AM
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
2017-05-12 11:23 AM
afaik, nothing special.
A couple info:
- are you using
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
2017-05-18 02:47 AM
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.
2017-05-18 04:52 AM
,
,
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
2017-05-18 05:45 AM
No it not working
:(
I have error:
make: *** No rule to make target `clean'. Stop. STM32L4xx-Nucleo-Client_Socket C/C++ ProblemThanks for help,
John R.
2017-05-18 06:33 AM
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&sharpendifDo you confirm this is the configuration?
Which build tool are you using?
regards,
Mridu
2017-05-18 06:37 AM
Yea, I have the same configuration like you. I'm using System Workbench for STM32.
2017-05-18 07:13 AM
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