2016-07-21 06:59 AM
Hello everyone,
I just bought aSTEVAL-IDW001V1 interface board and aSTM32F0DISCOVERY (STM32F051R8 MCU) in order to test theSPWF01SA WiFi module for my very simple access point + webserver application. I followed the documentation attached in thehttp://www.st.com/content/st_com/en/products/embedded-software/evaluation-tool-software/stsw-idwhtml
firmware package but was unable to make it work. I can compile and download the project just fine using the IAR for M0 IDE, but all I can see is the LED2 of the interface board turned on. Debugging the software, I had to comment the following section of the example#if 1
while (GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_1) == 0);
while (GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_1) == 1);
TURNONLD3;
TURNOFFLD4;
while (GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_1) == 0); // Wait for WPA Handshake Complete
TURNOFFLD3;
TURNONLD4;
while (GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_1) == 1); // Wait for WiFi Up
TURNONLD3; // green
TURNONLD4; // blue
#endif
otherwise I would stay stuck in the second while loop (as GPIOC Pin 1 seems to be always High)
This leads me to stay stuck in another section of the code:
while(1) {
pch = strchr((const char*) CharBuffer, PAD);
if (((pch != NULL) && (pch - CharBuffer > 0)) || (pch == NULL)){
..........
}
}
as pch is always equal to CharBuffer.
As far as I understand there are 2 USART:
- USART1 which uses PA9 and PA10 as tx and rx pins and is used to transmit debug strings;
- USART2 which uses the same DMA channell of USART1, but is used to send AT Commands.
I tried setting the module as AP without password sending AT commands over USART2:
char
AP_SECURITY_MODE[] =
''AT+S.SCFG=wifi_priv_mode,0\r\n''
;
char
AP_MODE[] =
''AT+S.SCFG=wifi_mode,3\r\n''
;
char
AP_SSID[] =
''AT+S.SSIDTXT=PROVAST\r\n''
;
with no success as I'm not able to find with my phone the newly created wifi network.
What am I missing?
Links to the documentation
/public/STe2ecommunities/interface/Lists/WiFi%20Modules/Attachments/10/SPWF01Sx%20and%20STM32F0-Discovery.pdf
. Thank you, Alan EDIT: I also noticed that if the interface board is pushed all the way down onto the mother board, the LED2 on the interface board will not turn on and the communication with the discovery board is impossible (even with the ST-LINK Utility) #stm32f0 #idw001v1