2017-04-25 10:24 PM
Hello!
I recently bought the IDW01M1 WiFi expansion board
and I am trying to have it working with the STM32F411RE.
However, from the examples in en.x-cube-wifi1_firmware.zip,
I can find the .bin file for STM32F401RE-Nucleo only
and so I tried to flash this WiFi_VCOM .bin to the STM32F411RE board.
I can see LED1 is green, so power is ok.
No other LED On, so module is ok?!
When I use Tera Term, I don't see any output and when I send 'AT', no 'OK' either.
So my question is that F401RE .bin image cannot work directly on F411RE board please?!
Since I am still a newbie to this WiFi module, I am not sure if it will be easy to recompile the sample application for F411RE then?!
Any suggestion / comment is welcome.
Thanks & Best Regards,
Robert
#stm32f411re-wifi-idw01m12017-05-01 09:15 PM
Photos would be far more effective at higher resolution, the new iteration of the forum is not limited to 100KB images, 2-3MB JPEGs will work much better, and the forum can scale.
2017-05-02 12:01 AM
Thanks for the update, Mridu!
Unfortunately, I don't have any other board except all the F411RE here.
However, I don't understand why the hw flow control would be the issue if it works for your F411RE there then?!
Anyway, I just sent you my email address too.
Thanks & Best Regards,
Robert
2017-05-02 01:22 AM
Hi Robert,
we are actually using an older version of IAR (v7.4). But honestly I don't think that is the issue.
What I do think could be an issue is the hw flow control which is not set on the module.
Do you happen to have any supported boards like Nucleo-F401RE/L476 with you which you can use to run the VCOM example and set the hw flow control on the module and see if that makes any difference?
The LED status you have mentioned while running the mbed example is correct and similar behaviour should happen while running the x-cube examples.
Note: mbed library does not use the flow control and hence you are able to run it correctly.
regards,
Mridu
2017-05-02 01:49 AM
to share bin image, can you send me your email address to
mailto:mridupawan.das@st.com
2017-05-02 10:23 AM
Hi Mridu,
Due to time zone difference I think,
Sorry that I just tried it
And unfortunately, it is still not working with the .bin image you gave.
That seems to match more with what I thought of either compiler tool version or hardware version difference?!
Thanks & Best Regards,
Robert
2017-05-25 02:41 PM
After having some more suggestions from Mridu and trying out different things,
I can finally merge our internal mbed based codes with the IDW01M1 Server Socket Sample codes and build ok after some twists here and there.
However, it would still trap in wifi_reset() without passing through successfully!
Therefore, I would really appreciate if anyone can give some more suggestion please.
And from the main.c, I take out the initialization code to my main.cpp to start with, i.e.
int main(void)
{
WiFi_Status_t status = WiFi_MODULE_SUCCESS;
char *protocol = 't';
uint32_t portnumber = 32000;
__GPIOA_CLK_ENABLE();
HAL_Init();
/* Configure the system clock to 64 MHz */
SystemClock_Config();
/* configure the timers */
Timer_Config( );
UART_Configuration(115200);
#ifdef USART_PRINT_MSG
UART_Msg_Gpio_Init();
USART_PRINT_MSG_Configuration(&UART_MsgHandle,115200);
#endif
config.power=wifi_active;
config.power_level=high;
config.dhcp=on;//use DHCP IP address
Set_UartMsgHandle(&UART_MsgHandle);
wifi_state = wifi_state_idle;
status = wifi_get_AP_settings();
if(status!=WiFi_MODULE_SUCCESS)
{
printf('\r\nError in AP Settings');
return 0;
}
printf('\r\nInitializing the wifi module...\r\n');
/* Init the wi-fi module */
status = wifi_init(&config);
if(status!=WiFi_MODULE_SUCCESS)
{
printf('Error in Config');
return 0;
}
printf('\r\nInitializing complete.\r\n');
Or if it would be even worse if it is due to any mix-up of HAL_xxx drivers please?!
Any suggestion please?
Thanks & Best Regards,
Robert
P.S. The board is working fine if I just run the sample Server_Socket application 'as-is' without any code modification but I can't use it this way because our internal code is based on mbed HAL driver and .cpp codes!
2017-05-27 04:48 AM
Hi Robert,
I suggest to refer to
https://community.st.com/wifimodules
. Did you already take a look in there?What's the content of
wifi_reset() function?
Regards
jerry
2017-05-30 03:08 AM
Thanks, Jerry.
However, I think that you did not get my point from my previous post.
The sample reference code would work on the HW already, so nothing wrong with the HW, I believe.
It is more on the combination on using mbed HAL driver vs the different driver implementation of the sample reference code here...
And I have no clue on how to fix that as I cannot tell where the problem may be in which driver component?!
Or it may be the linkerScript.ld difference between the sample code implementation and mbed HAL implementation, I suspect... but again, I don't know how to deal with that.
Any other suggestion please?
Thanks & BR,
Robert
2017-05-30 04:35 AM
,
,
Thanks, Jerry!
So do you mean that I should repost it to the wifi forum please?!
Here is the wifi_reset():
void wifi_reset(void)
,
{,
, RESET_WAKEUP_GPIO_CLK_ENABLE(),,
, __GPIOA_CLK_ENABLE(),, wifi_instances.GPIO_InitStruct.Pin , , , , , , = WiFi_RESET_GPIO_PIN,
,
, wifi_instances.GPIO_InitStruct.Mode , , , , , = GPIO_MODE_OUTPUT_PP,,
, wifi_instances.GPIO_InitStruct.Pull , , , , , = GPIO_PULLUP,,
, wifi_instances.GPIO_InitStruct.Speed , , , , = GPIO_SPEED_HIGH,, HAL_GPIO_Init(WiFi_RESET_GPIO_PORT, &,wifi_instances.GPIO_InitStruct),
// , IO_status_flag.WiFi_WIND_State.WiFiHWStarted = WIFI_FALSE,
,
, wifi_connected = 0, //reset wifi_connected to get user callback,
// , memset((void*)&,IO_status_flag.WiFi_WIND_State,0x00,sizeof(IO_status_flag.WiFi_WIND_State)), /*reset the WIND State?*/,
, IO_status_flag.WiFi_WIND_State = Undefine_state,, /* === , , RESET PIN - PC12 , , ===*/
,
, HAL_GPIO_WritePin(WiFi_RESET_GPIO_PORT, WiFi_RESET_GPIO_PIN, GPIO_PIN_RESET),,
, HAL_Delay(200),,
, /* === , , SET PIN - PC12 , , ===*/,
, HAL_GPIO_WritePin(WiFi_RESET_GPIO_PORT, WiFi_RESET_GPIO_PIN, GPIO_PIN_SET),,
, HAL_Delay(50),,
, HAL_GPIO_DeInit(WiFi_RESET_GPIO_PORT, WiFi_RESET_GPIO_PIN),, printf('\r\nOK point 1.5\r\n'),
♯ ifndef WIFI_USE_VCOM
,
, while(IO_status_flag.WiFi_WIND_State != WiFiHWStarted),
, , , {,
, , , , , __NOP(), //nothing to do,
, , , },
♯ endif,
}And the problem is no response for the while() loop above to come out of.
Thanks &, Best Regards,
Robert
2017-05-30 04:49 AM
If (WiFi_WIND_State != WiFiHWStarted) forever, means SPWF01S was rebooted after a radio off & save (AT+S.WIFI=0 + AT&W + reboot), or SPWF01S was rebooted but it's transmitting to a different baudrate un UART (default is 115200), or SPWF01S was NOT rebooted (is reset jumper closed in the right position?), or other cases...
I suggest to restore SPWF01S to factory configuration via HW (GPIO0 set to 2.5V at boot), check the reset jumper, then try again the init sequence.
Please note the behavior of LEDs on IDW board. Toggling, on, off, ...
jerry