cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

Anonymous
Not applicable

Hi

I was using SDK 2.4.1 and was able to download the program to STM32F4 Discovery board using JTAG , (I used a simple LED blink program).

Now I have moved to SDK 3.1.0 and facing some issue while programming via JTAG ,finally followed seyhan's comment to add line reset_config trst_and_srst in /tools/OpenOCD/jlink.cfg , and I was able to download the program to STM32F4 .

But the code doesn't seems to be running.  THe LED's are not lighting

What might be causing the issue?

Regards

HpC

0 Likes
1 Solution
Anonymous
Not applicable

Finally got it working....

Since the LSE crystal was not present in the STM32F4 Discovery I had to use the LSI (Internal oscillator)

Changes

had to edit the function platform_mcu_powersave_init(),

/* Enable the LSE OSC */

RCC_LSEConfig(RCC_LSE_ON);

/* Wait till LSE is ready */

while(RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET)

{

}

to

RCC_LSICmd(ENABLE);

/* Wait till LSE is ready */

while(RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET)

{

}

View solution in original post

0 Likes
9 Replies
SeyhanA_31
Employee

Hi,

Are you using Segger Jlink JTAG debugger?

After downloading the program, did you try to reset the target board?

Seyhan

0 Likes
Anonymous
Not applicable

1. Yes I'm using Jlink Base from Segger.

2. I even tried power on resetting the target board , still no effect.

Is there anything else to add in jlink.cfg file ?

Please help ...

0 Likes
SeyhanA_31
Employee

I have used the Olimex to interface and test it.

I have not tested with Segger Jlink. I will give it a try.

Seyhan

0 Likes
Anonymous
Not applicable

Great thanks.... ,

I'm expecting the reply as fast as possible , as we are running out of schedule..

By the way which version of SDK are you using for STM32F4 DIscovery code flashing ?

I think the issue is more related on the configuration/platform initialization....

Update on Debugging: When I tried debugging , I could see that the program never reaches application_start(); , it gets looped in the the  while(RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET);

and the RCC_GetFlagStatus always return RESET ,This function is called in platform_result_t platform_mcu_powersave_init( void );


So On checking I found that LSE oscillator (32 Khz) is not fitted on the STM32F4 Discovery board.

So how did you managed to make the code work in the Discovery board ? Or Am I missing something?

Note : For Interfacing STM32Fx-Discovery with WICED using JTAG Debugger  (used jlink Segger ) I had to connect VTref pin to the Vdd of STM32F4 to make it working(for flashing the code),

0 Likes
Anonymous
Not applicable

Finally got it working....

Since the LSE crystal was not present in the STM32F4 Discovery I had to use the LSI (Internal oscillator)

Changes

had to edit the function platform_mcu_powersave_init(),

/* Enable the LSE OSC */

RCC_LSEConfig(RCC_LSE_ON);

/* Wait till LSE is ready */

while(RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET)

{

}

to

RCC_LSICmd(ENABLE);

/* Wait till LSE is ready */

while(RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET)

{

}

View solution in original post

0 Likes
SeyhanA_31
Employee

Hi,

Another option is to disable power save by defining WICED_DISABLE_MCU_POWERSAVE in the make file or in .../include/wiced_defaults.h

Seyhan

0 Likes
Anonymous
Not applicable

Thanks,

Just want to know why are we using platform_mcu_powersave_init() , what is the real advantage of using that function?

0 Likes
SeyhanA_31
Employee

Hi,

The platform_mcu_powersave_init() initializes the RTC which is used for MCU power save.

Please refer to .../doc/WICED-AN104-R-Powersave-App-Note.pdf for more information.

Seyhan

0 Likes
Anonymous
Not applicable

Hi I tried enabling

WICED_DISABLE_MCU_POWERSAVE in the make file or in .../include/wiced_defaults.h

but couldn't find another place where it is defined..

I'm getting these erros..

Building Bootloader

In file included from ././WICED/WWD/include/wwd_debug.h:14:0,

                 from ././WICED/WWD/include/wwd_assert.h:17,

                 from libraries/drivers/spi_flash/spi_flash.c:77:

./include/wiced_defaults.h:153:0: error: "WICED_DISABLE_MCU_POWERSAVE" redefined [-Werror]

#define WICED_DISABLE_MCU_POWERSAVE

^

<command-line>:0:0: note: this is the location of the previous definition

In file included from ././WICED/WWD/include/wwd_debug.h:14:0,

                 from ././WICED/WWD/include/wwd_assert.h:17,

                 from WICED/network/NoNS/WWD/wwd_buffer.c:14:

./include/wiced_defaults.h:153:0: error: "WICED_DISABLE_MCU_POWERSAVE" redefined [-Werror]

#define WICED_DISABLE_MCU_POWERSAVE

^

<command-line>:0:0: note: this is the location of the previous definition

In file included from ././WICED/WWD/include/wwd_debug.h:14:0,

                 from ././WICED/WWD/include/wwd_assert.h:17,

                 from WICED/WWD/internal/wwd_thread.c:31:

./include/wiced_defaults.h:153:0: error: "WICED_DISABLE_MCU_POWERSAVE" redefined [-Werror]

#define WICED_DISABLE_MCU_POWERSAVE

^

<command-line>:0:0: note: this is the location of the previous definition

cc1.exe: all warnings being treated as errors

make.exe[3]: *** [build/waf_bootloader-NoOS-NoNS-STDiscovery407_BCM43362-SDIO/Modules/./WICED/network/NoNS/WWD/wwd_buffer.o] Error 1

make.exe[3]: *** Waiting for unfinished jobs....

In file included from platforms/STDiscovery407_BCM43362/platform.c:21:0:

./include/wiced_defaults.h:153:0: warning: "WICED_DISABLE_MCU_POWERSAVE" redefined

#define WICED_DISABLE_MCU_POWERSAVE

^

<command-line>:0:0: note: this is the location of the previous definition

cc1.exe: all warnings being treated as errors

make.exe[3]: *** [build/waf_bootloader-NoOS-NoNS-STDiscovery407_BCM43362-SDIO/Modules/./WICED/WWD/internal/wwd_thread.o] Error 1

cc1.exe: all warnings being treated as errors

make.exe[3]: *** [build/waf_bootloader-NoOS-NoNS-STDiscovery407_BCM43362-SDIO/Modules/libraries/drivers/spi_flash/spi_flash.o] Error 1

make.exe[2]: *** [main_app] Error 2

make.exe[1]: *** [bootloader] Error 2

tools/makefiles/standard_platform_targets.mk:38: recipe for target 'bootloader' failed

make: *** [main_app] Error 2

Makefile:185: recipe for target 'main_app' failed

0 Likes