cancel
Showing results for 
Search instead for 
Did you mean: 

IDW01M1 Wifi Sample Codes for STM32F411RE

Robert Kwan
Associate II
Posted on April 26, 2017 at 07:24

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-idw01m1
41 REPLIES 41
Posted on May 30, 2017 at 13:54

Hi Robert,

Are you getting all data through UART OK?

Is ring_buffer getting filled up with characters from the UART?

If not then there is some problem with UART (maybe driver etc.).

If yes, then then WIND:32 should be detected (which is the condition when it gets out of the wifi_reset() loop)

Regards,

Mridu

Robert Kwan
Associate II
Posted on May 30, 2017 at 16:22

Hi Mridu,

Thanks for the suggestion.

I will try to hook up Eclipse and OpenOCD to see if I can check the ring_buffer() then.

I think that it's pretty likely...

However, even if it is so, I still have no idea on how to go deeper down with the UART HAL driver then...

Anyway, I will try and update you later tomorrow...

Thanks & BR,

Robert

Robert Kwan
Associate II
Posted on May 31, 2017 at 02:44

Hello Mridu,

I just used the Eclipse & OpenOCD to see the ring_buffer info

and I can see that

0690X00000607CmQAI.png

The elements inside the wifi_instances.big_buff does have all the WIND:1:Poweron msg, etc..

So does it mean that somehow the UART path is broken due to mix build with mbed UART HAL driver and so those msgs cannot be popped up in the TeraTerm?!

Or as I suspect that my LinkerScript.ld cannot handle that correctly?!

(I sent that script.ld to your email last week.)

Thanks & Best Regards,

Robert

Robert Kwan
Associate II
Posted on May 31, 2017 at 11:51

Hi Mridu,

And I set more breakpoints to see when the ring buffer got to have the elements filled in

and I found that it's only when the program is running into the wifi_reset() but it would not come out of the wifi_reset() because it is trapped in the while() loop inside the wifi_reset().

Hope that you will have better idea on where to debug next...

Thanks & Best Regards,

Robert

Posted on May 31, 2017 at 14:35

Check if you have WIND:32 on the ring_buffer.

If yes, check if you hit the :

1. void Process_Wind_Indication(uint8_t *process_buff_ptr) in file wifi_module_uart_01.c

2. void Process_DeQed_Wind_Indication(wifi_event_TypeDef * L_DeQued_wifi_event) in file wifi_module.c

    case WiFi_Hardware_Started :

in both functions above.

You should hit 1. If not then soemthing strnage is happening. So will have to investigate this first.

Then you should hit 2. If not , check if timer is running. Else further investigate on this.

Robert Kwan
Associate II
Posted on May 31, 2017 at 17:19

Hi Mridu,

I set breakpoint inside the beginning of 1. Process_Wind_Indication(uint8_t *process_buff_ptr) in file wifi_module_uart_01.c

and it doesn't get hit at all.

Then, so is 2.!

So what strange point are you thinking of please?

Thanks & Best Regards,

Robert

Robert Kwan
Associate II
Posted on May 31, 2017 at 17:21

And I checked the .map file ok with these 2 functions:-

 .text.Process_Wind_Indication

                0x08004f34      0x324 Middlewares/ST/STM32_SPWF0xSy/wifi_module_uart_01.o

                0x08004f34                Process_Wind_Indication

.text.Process_DeQed_Wind_Indication

                0x08004564      0x284 Middlewares/ST/STM32_SPWF0xSy/wifi_module.o

                0x08004564                Process_DeQed_Wind_Indication

Thanks & BR,

Robert

Robert Kwan
Associate II
Posted on May 31, 2017 at 17:29

Surprisingly, if I set the breakpoints to one level higher of these 2 functions where they would be called,

1. Process_Buffer() would not be triggered with the breakpoint for Process_Wind_Indication()

2. Wifi_TIM_Handler() would be triggered even though the Process_DeQed_Wind_Indication() would not be triggered.

So it seems that timer itself may be ok but not the Process_Buffer()?!

Thanks & Best Regards,

Robert

Robert Kwan
Associate II
Posted on May 31, 2017 at 17:36

It seems that Wifi_SysTick_Isr() cannot be triggered and then so Process_Wifi() and then so Process_Buffer()

but I don't know why Wifi_SysTick_Isr() cannot be triggered though...

Thanks & BR,

Robert

Robert Kwan
Associate II
Posted on May 31, 2017 at 17:51

Looking a bit deeper, I found that it's related to the SysTick_Handler() in the startup_stm32f411xe.s of sample codes

but I am using the mbed one which would be generated differently as startup_stm32f411xe.o in the mbed folder.

And this startup_stm32f411xe.o would not cover the SysTick_Handler() at all!!

Not sure if I can replace this one from mbed one or not?!

Any idea please?

Thanks & BR,

Robert