2018-02-18 09:35 AM
Hi,
I get troubles to start with my new IDW01M1 module.
I use it with the NUCLEO-L053R8 board, but none of applications provided with the WiFi CubeExpansion package works with my hardware.
For example, I load the 'WiFi_VCOM' application to the main board. The application launches, but it cannot set the connection with WiFi module at start (message 'Error in baud-rate auto-detection...' on termnial).
Again, with the 'Client_socket' application: it starts, ask for identifiers, and freeze at WiFi module initialization.
It seems that there are no communications at all with the module.
I tried Resets on both boards, and Factory setting reset on WiFi module (set GPIO0 high at start), without success.
Jumpers are placed on JP3 and JP4, no jumpers on JP1/JP2
LED1 is on, LED2, LED3, LED4 are off.
Does I missed something obvious, or my hardware is broken ???
#x-cube-wifi #spwf01Solved! Go to Solution.
2018-03-03 05:23 AM
I found that the problem comes from side effect between sysctick and UART interrupt.
The Systick interrupt calls Process_WiFi() function (wifi_module.c). At begining, interruptions are disabled during pop_buffer_queue() call (wifi_module.c, line 1093). So UART reception is disabled during this time.
It seems that this critical section last too long compared to UART IRQ frequency. I found that memset() operation, used to initialize the poping buffer, takes too much time.
So, I silly reduced the size of buffer initialization (ring_buffer.c, line 188) :
memset(pop_buffer, 0x00 , MAX_BUFFER_GLOBAL); --> to : memset(pop_buffer, 0x00 , ELEMENT_SIZE);
And it works !!! I'm now able to connect to my AP and open socket.
Just note that this is a dirty workaround. I just tested a connection to AP . I dont know what happens when 'data chunk' is enabled.
I see this forum is not very active but i hope this will help someone who google it.
2018-02-23 04:33 AM
Hi,
I did further investigations and it appears that my example applications stucks in infinite loop at wifi module initialization :
In wifi_module.c:
while(IO_status_flag.WiFi_WIND_State.WiFiHWStarted != WIFI_TRUE)
{ __NOP(); //nothing to do }I found these threads
https://community.st.com/0D50X00009XkgFFSAZ
andhttps://community.st.com/0D50X00009XkXvmSAF
describing the same problem.So, I looked at ring_buffer content after wifi module reset, and I got WIND strings with some missing character :
ie:
\r\n+WND:1:peron ...
In the second thread I mention, it said that missing characters means 'issue on uart management' (
see Gerardo Gallucci post on May 2, 2017 10:20 AM)
But it remains unclear how to fix that problem. I tried to switch Timer and Uart IRQ priority but it has no effect.
Can you help me to resolve this.
Regards
Sylvain Basset
PS: my first port contains a mistake : LED 4 (orange) in ON on my module
2018-03-03 05:23 AM
I found that the problem comes from side effect between sysctick and UART interrupt.
The Systick interrupt calls Process_WiFi() function (wifi_module.c). At begining, interruptions are disabled during pop_buffer_queue() call (wifi_module.c, line 1093). So UART reception is disabled during this time.
It seems that this critical section last too long compared to UART IRQ frequency. I found that memset() operation, used to initialize the poping buffer, takes too much time.
So, I silly reduced the size of buffer initialization (ring_buffer.c, line 188) :
memset(pop_buffer, 0x00 , MAX_BUFFER_GLOBAL); --> to : memset(pop_buffer, 0x00 , ELEMENT_SIZE);
And it works !!! I'm now able to connect to my AP and open socket.
Just note that this is a dirty workaround. I just tested a connection to AP . I dont know what happens when 'data chunk' is enabled.
I see this forum is not very active but i hope this will help someone who google it.