2017-03-17 07:49 AM
i'm using the STM32L053R8 (nucleo_board) with SPWF01SC wifi expansion module. i run some examples from STM32CubeExpansion_WIFI1_V2.1.1 code but only using drag and drop file.bin on Nucleo drive. if i open project (Wifi_VCOM) with keil, compile/link is ok, load is ok but when i run, the program is locked in instruction:
printf('\r\n\n/********************************************************\n');
i tried to remove define USART_PRINT_MSG but locked again. I don't know what is the problem?
Thanks
#en.x-cube-wifi1_firmware-+-spwf01sc #spwf01sc2017-03-18 07:29 AM
Hi,
is printf retargeted to standard output function? Is 'int fputc(int ch, FILE *f)' implemented inside the project? There are examples inside 'Retarget.c' files, under 'Keil\ARM\Examples' install directory.
This is the idea: printf calls fputc, fputc calls uartSendChar, uartSendChar calls HAL_UART_Transmit, and in the end HAL_UART_Transmit calls STM32 low level driver for UART send byte.
Printf calls proper standard output function, based on compiler (__IAR_SYSTEMS_ICC__, __CC_ARM, __GNUC__).
2017-03-20 01:38 AM
hi,
thanks for your response but i didn't modify the code \en.x-cube-wifi1_firmware\STM32CubeExpansion_WIFI1_V2.1.1\Projects\Multi\Applications\WiFi_VCOM\MDK-ARM\STM32L053R8-Nucleo\. The binary \en.x-cube-wifi1_firmware\STM32CubeExpansion_WIFI1_V2.1.1\Projects\Multi\Applications\WiFi_VCOM\Binary\STM32L053R8-Nucleo\Project.bin works well (drag and drop Project.bin on Nucleo drive). Binary generated by Keil uVision toolchain doesn't work (drag and drop and in debug). I think it's a option to activate/disactivate in the toolchain or a define in the code ! Someone did try to test Application Wifi_VCOM in debug? Another solution? Thks
2017-03-22 04:15 AM
Hi,
xcube 'Retarget.c' file is called 'console.c' (in folder 'src'). Please add it to the project, compile again, and flash.
It contains low level putc retarget for stdio library (needed by printf).
2017-03-22 10:56 AM
hi,
It works. Thanks
2017-03-27 08:09 AM
XCUBE-WIFI1 v3.0.1 has been released.
It solves this issue, and it's also a starting point for SPWF04S new wifi module.