2016-12-13 10:57 PM
I'm using the STM32F411RE board with the IDW01M1 WiFi expansion module. I run some examples from en.x-cube-wifi1_firmware.zip lib.
However, all example code I run always fail during the wifi_init()--> wifi_reset() call where it just hangs in this while loop:
while(IO_status_flag.WiFi_WIND_State.WiFiHWStarted != WIFI_TRUE)
{ __NOP(); //nothing to do }but WiFiHWStarted never gets set to WIFI_TRUE.
Maybe i dismissed some wiring conncetions (the expantion connected via wires to eval board)?
I have JP3 set in the 1-2 position (which it is). I also have JP4 set in the 1-2 position. I have connceted 3.3v to CN7 pins 12&Thanks,
Note: this post was migrated and contained many threaded conversations, some content may be missing.2017-04-21 01:19 AM
Hi,
you can check the contents of the ring_buffer variable which should contain all the WINDs which have arrived. If there are no characters in the ring_buffer, it means either reset has not happened correctly or the UART is not receiving correctly.
For V3.0.1, please make sure you have enabled the correct macros in the file wifi_conf.h.
Thanks,
Mridu
2017-04-24 11:02 AM
hi,
after reset of wifi module, message on uart wifi module is:
WIND:1:Poweron (160129-c5bf5ce-SPWF01S)
+WIND:13:ST SPWF01SA1 IWM: Copyright (c) 2012-2015 STMicroelectronics, Inc. All rights Reserved.
+WIND:3:Watchdog Running
+WIND:0:Console active
+WIND:32:WiFi Hardware Started
+WIND:21:WiFi Scanning
+WIND:35:WiFi Scan Complete (0x0)
...
process_buffer_ptr of Process_Wind_Indicator() (in file wifi_module_uart_01.c) contains the first string: '\r\r\n+WIND:1weron (169....)
wind_No is 1 but the switch case doesn't manage the case Poweron (1) and i think the WiFi_Control_Variables struct (queu, event, and IO_status_flag struct are not refresh to jump to other wind event and catch the new message. I think it's the problem! i remember wifi_reset is lock in while and wait (IO_status_flag.WiFi_WIND_State != WiFiHWStarted).
What do you think?
Thks
Yoann
2017-04-24 11:29 AM
hi,
to complete, the uart doesn't catch all the character of the message. for example, the message +WIND:3:Watchdog Running is (in process_buffer_ptr) : 'WIND:Watchdog nning\r\n'. Pehaps a problem of interrupt or priority and clock sapmle, i don't know ... something see same problem?
2017-04-26 03:05 AM
Hi,
yes for the L0 board there seems to be an IRQ missing problem.
We will release in future a better way to manage the data from the UART, especially it seems the problem is more evident on L0 boards.
For the time being, you may try the following on your board:
IN function Process_buffer in the file wifi_module_uart_01.c, in the following lines:
&sharpif defined (USE_STM32L0XX_NUCLEO) || (USE_STM32F4XX_NUCLEO) || (USE_STM32L4XX_NUCLEO)
__disable_irq(); &sharpendif Process_Wind_Indication(&process_buffer[0]); &sharpif defined (USE_STM32L0XX_NUCLEO) || (USE_STM32F4XX_NUCLEO) || (USE_STM32L4XX_NUCLEO) __enable_irq();try removing the __disable_irq() and __enable_irq() function calls.e.g.
&sharpif defined (USE_STM32L0XX_NUCLEO) || (USE_STM32F4XX_NUCLEO) || (USE_STM32L4XX_NUCLEO)
//__disable_irq();
&sharpendif
Process_Wind_Indication(&process_buffer[0]);
&sharpif defined (USE_STM32L0XX_NUCLEO) || (USE_STM32F4XX_NUCLEO) || (USE_STM32L4XX_NUCLEO)
//__enable_irq();
2017-04-26 03:10 AM
hi,
ok i will test it tomorrow and go back with result quickly!
i look on web and i found this. I will try it also.
https://stm32f4-discovery.net/2015/06/how-to-properly-enabledisable-interrupts-in-arm-cortex-m/
thks for the support.
Yoann
2017-04-28 03:55 AM
hi,
tes is nok!
i removed __disable_irq() and __enable_irq() function calls like you said and i have sameproblem. But the first time i did, it works. ONLY when i power on the nucleo board and download firmwre with debugger. Next if i reset the board, i have same problem always lock in the while() loop (wait detection of message +WIND:32:WiFi Hardware Started) after wifi_reset();
2017-04-28 08:21 AM
Hi,
you are using the X-NUCLEO-IDW01M1?
this is really strange since L0 is supported on this board.
We will investigate this problem and see if everything is OK on the L0 again.
Since WIND32 is in the ring_buffer, it should be read from the timer IRQ (TIM_Handler). So it is really strange.
Unless there is some missing character in the +WIND:... string. Is there is any missing character?
If not it is really strange, which means the timer is probably not running.
But I will not know till I re-check. Hopefully I can check tomorrow.
regards,
Mridu
2017-05-04 01:24 AM
hi,
i will test.
Note that server_socket code (original V3.0.1) compiled this IAR seems work good. IAR Binary is different compared to Keil Binary.
Rgds
Yoann
2017-05-04 03:28 AM
hi,
yes i checked the MDK-Keil binary (STM32L053R8_Nucleo_keil_5.23) you sent me. no difference whis binary i generate.
The 2 binaries download (drag and drop) on Nucleo drive works fine (some time i must do a wifi hardware reset (SW1) to pass. In debug i don't have the same behavior, i stay in the wifi_reset()!
Is it possible to provide the .ioc (STM32CubeMX) of STM32L053R8 for SPWF0xSx?
When en.x-cube-wifi1_firmware will be available with STM32L053R8 compliant SPWF04Sx?
thks
yoann
2017-05-04 05:14 AM
Hi,
did you check the MDK-Keil binaries I had sent?
Did it make any difference?
regards