Wi-Fi Combo Forum Discussions
Hi.
I have a 1ms timed event that is supposed to poll a GPIO input every time it runs.
However, after boot up the timed event only runs once.
If I change the time period to 5 ms, the timed event seems to run the function quite regularly.
/******************************************************
* Constants
******************************************************/
#define SAMPLING_PERIOD (1 * MILLISECONDS)
#define BUTTON (WICED_GPIO_26) //Pin 30
#define RELAY_CTRL_OUTPUT (WICED_GPIO_23)
#define BUTTON_STATE_PERSISTENCE_WAIT_TIME (100)
/******************************************************
* Static Function Declarations
******************************************************/
static wiced_result_t sampling_thread(void* arg);
/******************************************************
* Variable Definitions
******************************************************/
static wiced_timed_event_t button_sampling_timed_event;
/* relay */
static wiced_bool_t g_relay_state = WICED_FALSE;
void application_start( )
{
/* Initialise the WICED device */
wiced_init();
/* initialize the button input */
/* button input */
if( wiced_gpio_init( BUTTON, INPUT_HIGH_IMPEDANCE ) == WICED_SUCCESS ) {
printf("Success: Button is set as GPIO i/p with high impedance\n");
} else {
printf("Failure: Button is set as GPIO i/p with high impedance\n");
}
/* initialize the relay to open */
g_relay_state = WICED_FALSE;
wiced_gpio_output_low(RELAY_CTRL_OUTPUT);
/* Setup a timed event that will toggle RGB leds */
wiced_rtos_register_timed_event( &button_sampling_timed_event, WICED_HARDWARE_IO_WORKER_THREAD, sampling_thread, SAMPLING_PERIOD, 0 );
}
static wiced_result_t sampling_thread(void* arg)
{
UNUSED_PARAMETER( arg );
current_button_state = wiced_gpio_input_get( BUTTON ) ? WICED_TRUE : WICED_FALSE;
printf("current_button_state = %u\n", current_button_state);
return WICED_SUCCESS;
}
This is on Inventek's ISM43341_M4G_L44 platform.
Show LessHi community members,
After installation of the IDE (WICED SDK 3.7.0 IDE Installer) I realized that some of .pfd documentations are missing. I cannot find the following documents (list from "WICED™ v3.7.0 - API Reference Guide" start page):
- WICED Quickstart Guide
- WICED Evaluation Board User Guide
- WICED Application Framework Overview
- WICED SDK Software Stack
- WICED Powersave Application Note
- WICED Wi-Fi Easy Setup Overview
- WICED Wi-Fi Easy Setup - Cooee Application Note
- WICED Factory Programming Application Note
- WICED Manufacturing Test User Guide
These links point to non-existing files, and I was not able to find these files manually in "<WICED-SDK>/Doc" and WICED Wi-Fi Documents & Downloads .
Can somebody provide me these files or fix the installer/SDK archive.
Thank you,
Show LessDear Tech team
Thank you for your support.
Our customer will make the sport camera system that use the BCM4330FKBGT.
So they want to get the reference schematics and H/W design guide documents.
Please check and reply.
Thank you
Best Regards,
Kevin.
Show LessHi,
Seems that for POS terminals certification BLE4.1 is not allowed. Is it possible to disble the BLE part in the module using a software patch in the bin file while loading the driver ? Is suppose it's not possible due to hardware to update the software to BLE4.2.
Thanks
Show LessVery often when trying to connect to a device, I get after several second a BTM_ENABLED_EVT with the status code 0x2 (timeout) and then a connection UP. What is really happening and how to prevent this ? It really slows down the connection time.
Show LessWould please help me to set up the mqtt server ?
Where do I start?
I am able to upgrade the binaries on BCM94343W_AVN using ota_fr app.
We have a controller, which has STM32 controller with BCM wifi/BLE chip and 4 mb spi flash. We are able to program via WICED IDE.
But, when i run the ota_fr app, it is successfully written the binaries on external spi flash and reboot with old binaries (ota_fr).
How can i debug this ?
Would anyone help us ?
Show LessPlatform : BCM94343W (SPIL N08 module)
I tried to port our project to SDK-3.7.0 by copying platform folder we used for SDK-3.5.2.
With "drivers/bluetooth_le" in <project>.mk replaced by "drivers/bluetooth/low_energy", it builds and download successfully.
And then when running I see the weird messages when initiating BLE peripheral :
00:00:01.043464 GKI_create_task func=0x801de0d id=1 name=BTU stack=0x0 stackSize=6144
00:00:01.051464 GKI_create_task func=0x801f325 id=0 name=HCISU stack=0x0 stackSize=4096
00:00:01.028392 GKI_exception(): Task State Table
00:00:01.032392 GKI_exception 65527 getbuf: Size is too big
00:00:05.028392 GKI_exception(): Task State Table
00:00:05.032392 GKI_exception 65527 getbuf: Size is too big
00:00:09.028392 GKI_exception(): Task State Table
00:00:09.032392 GKI_exception 65527 getbuf: Size is too big
I guess they are printed by BT firmware and I don't know what do they mean.
By Google I found this link src/gki/common/gki_buffer.c - platform/external/libnfc-nci - Git at Google .
I guess it is related to some sort of buffer size problem related to BT stack.
But with increased size & number for the const wiced_bt_cfg_buf_pool_t structure defined in <project>_bt_cfg.c, no luck.
What does this exception mean?
How do I fix this ?
Show Less12:01:12 **** Build of configuration Default for project WICED-SDK ****
"E:\\WICED_WIFI_3_7_0\\WICED-SDK-3.7.0\\WICED-SDK\\make.exe" snip.ota_fr-BCMUSI22 download download_apps
MAKEFILE MAKECMDGOALS=snip.ota_fr-BCMUSI22 download download_apps OTA2_SUPPORT is disabled
Making config file for first time
+-----------------------------------------------------------------------------------------------------+
| IMPORTANT NOTES |
+-----------------------------------------------------------------------------------------------------+
| Wi-Fi MAC Address |
| The target Wi-Fi MAC address is defined in <WICED-SDK>/generated_mac_address.txt |
| Ensure each target device has a unique address. |
+-----------------------------------------------------------------------------------------------------+
| MCU & Wi-Fi Power Save |
| It is *critical* that applications using WICED Powersave API functions connect an accurate 32kHz |
| reference clock to the sleep clock input pin of the WLAN chip. Please read the WICED Powersave |
| Application Note located in the documentation directory if you plan to use powersave features. |
+-----------------------------------------------------------------------------------------------------+
MAKEFILE MAKECMDGOALS=snip.ota_fr-BCMUSI22 download download_apps OTA2_SUPPORT is disabled
Building Bootloader
Building Serial Flash Loader App
MAKEFILE MAKECMDGOALS=waf.sflash_write-NoOS-BCMUSI22-SDIO OTA2_SUPPORT is disabled
Making config file for first time
+-----------------------------------------------------------------------------------------------------+
| IMPORTANT NOTES |
+-----------------------------------------------------------------------------------------------------+
| Wi-Fi MAC Address |
| The target Wi-Fi MAC address is defined in <WICED-SDK>/generated_mac_address.txt |
| Ensure each target device has a unique address. |
+-----------------------------------------------------------------------------------------------------+
| MCU & Wi-Fi Power Save |
| It is *critical* that applications using WICED Powersave API functions connect an accurate 32kHz |
| reference clock to the sleep clock input pin of the WLAN chip. Please read the WICED Powersave |
| Application Note located in the documentation directory if you plan to use powersave features. |
+-----------------------------------------------------------------------------------------------------+
MAKEFILE MAKECMDGOALS=waf.sflash_write-NoOS-BCMUSI22-SDIO OTA2_SUPPORT is disabled
WICED/platform/MCU/STM32F4xx/peripherals/platform_watchdog.c:55:0: warning: "DBG_WATCHDOG_TIMEOUT_MULTIPLIER" redefined
#define DBG_WATCHDOG_TIMEOUT_MULTIPLIER (3600)
^
In file included from ././WICED/platform/MCU/STM32F4xx/../platform_stdio.h:11:0,
from WICED/platform/MCU/STM32F4xx/peripherals/platform_watchdog.c:30:
./platforms/BCMUSI22/./platform_config.h:29:0: note: this is the location of the previous definition
#define DBG_WATCHDOG_TIMEOUT_MULTIPLIER ( 1875 )
^
WICED/platform/MCU/STM32F4xx/peripherals/platform_watchdog.c:55:0: warning: "DBG_WATCHDOG_TIMEOUT_MULTIPLIER" redefined
#define DBG_WATCHDOG_TIMEOUT_MULTIPLIER (3600)
^
In file included from ././WICED/platform/MCU/STM32F4xx/../platform_stdio.h:11:0,
from WICED/platform/MCU/STM32F4xx/peripherals/platform_watchdog.c:30:
./platforms/BCMUSI22/./platform_config.h:29:0: note: this is the location of the previous definition
#define DBG_WATCHDOG_TIMEOUT_MULTIPLIER ( 1875 )
^
Compiling App_SFlash_write
Compiling Platform_BCMUSI22
Compiling WICED
Compiling WWD_NoOS_Interface
Compiling Lib_SPI_Flash_Library_BCMUSI22
Compiling Lib_GPIO_button
Finished Building Bootloader
Compiling Lib_Wiced_RO_FS
Processing resources
Creating security credentials
Compiling STM32F4xx
Making DCT image
Compiling common_GCC
Compiling STM32F4xx_Peripheral_Drivers
Compiling Lib_Ring_Buffer
Compiling Lib_crc
Compiling STM32F4xx_Peripheral_Libraries
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/App_SFlash_write.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/Platform_BCMUSI22.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/WICED.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/WWD_NoOS_Interface.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/Lib_SPI_Flash_Library_BCMUSI22.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/Lib_GPIO_button.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/Lib_Wiced_RO_FS.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/STM32F4xx.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/common_GCC.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/STM32F4xx_Peripheral_Drivers.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/Lib_Ring_Buffer.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/Lib_crc.a
Making build/waf.sflash_write-NoOS-BCMUSI22-SDIO/libraries/STM32F4xx_Peripheral_Libraries.a
Making waf.sflash_write-NoOS-BCMUSI22-SDIO.elf
Making waf.sflash_write-NoOS-BCMUSI22-SDIO.bin
waf.sflash_write-NoOS-BCMUSI22-SDIO
----------------------------------|---------|---------|
| | Static |
Module | Flash | RAM |
----------------------------------+---------+---------|
App | 0 | 21126 |
Host MCU-family library | 0 | 11340 |
Interrupt Vectors | 0 | 388 |
libc | 0 | 548 |
platform | 0 | 1156 |
Ring_Buffer | 0 | 40 |
SPI_Flash_Library_BCMUSI22 | 0 | 908 |
Startup Stack & Link Script fill | 0 | 486 |
WWD | 0 | 176 |
----------------------------------+---------+---------|
TOTAL (bytes) | 0 | 36168 |
----------------------------------|---------|---------|
Build complete
Finished Building Serial Flash Loader App
Compiling App_OTA_fr_run
Compiling Platform_BCMUSI22
Compiling WICED
Compiling Lib_OTA_Server
Compiling Lib_SPI_Flash_Library_BCMUSI22
Compiling Lib_GPIO_button
Compiling WWD_ThreadX_Interface
Compiling WICED_ThreadX_Interface
Compiling WWD_for_SDIO_ThreadX
Compiling Supplicant_BESL
Compiling Lib_DNS
Compiling NetX_Duo
Compiling Lib_Wiced_RO_FS
Compiling STM32F4xx
Compiling Lib_TLV
Compiling Lib_base64
Compiling Lib_Linked_List
Compiling Lib_crypto_open
Compiling Lib_micro_ecc
Compiling WWD_NetX_Duo_Interface
Compiling WICED_NetX_Duo_Interface
Compiling common_GCC
Compiling STM32F4xx_Peripheral_Drivers
WICED/platform/MCU/STM32F4xx/peripherals/platform_watchdog.c:55:0: warning: "DBG_WATCHDOG_TIMEOUT_MULTIPLIER" redefined
#define DBG_WATCHDOG_TIMEOUT_MULTIPLIER (3600)
^
In file included from ././WICED/platform/MCU/STM32F4xx/../platform_stdio.h:11:0,
from WICED/platform/MCU/STM32F4xx/peripherals/platform_watchdog.c:30:
./platforms/BCMUSI22/./platform_config.h:29:0: note: this is the location of the previous definition
#define DBG_WATCHDOG_TIMEOUT_MULTIPLIER ( 1875 )
^
Compiling Lib_Ring_Buffer
Compiling Lib_crc
Compiling Lib_DHCP_Server
Compiling STM32F4xx_Peripheral_Libraries
Making build/snip.ota_fr-BCMUSI22/libraries/App_OTA_fr_run.a
Making build/snip.ota_fr-BCMUSI22/libraries/Platform_BCMUSI22.a
Making build/snip.ota_fr-BCMUSI22/libraries/WICED.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_OTA_Server.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_SPI_Flash_Library_BCMUSI22.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_GPIO_button.a
Making build/snip.ota_fr-BCMUSI22/libraries/WWD_ThreadX_Interface.a
Making build/snip.ota_fr-BCMUSI22/libraries/WICED_ThreadX_Interface.a
Making build/snip.ota_fr-BCMUSI22/libraries/WWD_for_SDIO_ThreadX.a
Making build/snip.ota_fr-BCMUSI22/libraries/Supplicant_BESL.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_DNS.a
Making build/snip.ota_fr-BCMUSI22/libraries/NetX_Duo.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_Wiced_RO_FS.a
Making build/snip.ota_fr-BCMUSI22/libraries/STM32F4xx.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_TLV.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_base64.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_Linked_List.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_crypto_open.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_micro_ecc.a
Making build/snip.ota_fr-BCMUSI22/libraries/WWD_NetX_Duo_Interface.a
Making build/snip.ota_fr-BCMUSI22/libraries/WICED_NetX_Duo_Interface.a
Making build/snip.ota_fr-BCMUSI22/libraries/common_GCC.a
Making build/snip.ota_fr-BCMUSI22/libraries/STM32F4xx_Peripheral_Drivers.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_Ring_Buffer.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_crc.a
Making build/snip.ota_fr-BCMUSI22/libraries/Lib_DHCP_Server.a
Making build/snip.ota_fr-BCMUSI22/libraries/STM32F4xx_Peripheral_Libraries.a
Making snip.ota_fr-BCMUSI22.elf
Making snip.ota_fr-BCMUSI22.bin
snip.ota_fr-BCMUSI22
----------------------------------|---------|---------|
| | Static |
Module | Flash | RAM |
----------------------------------+---------+---------|
App | 293 | 0 |
base64 | 521 | 0 |
crc | 1060 | 0 |
crypto_open | 41125 | 1 |
DHCP_Server | 1476 | 132 |
DNS | 68 | 44 |
Host MCU-family library | 14611 | 2481 |
Interrupt Vectors | 388 | 0 |
libc | 33826 | 3136 |
micro_ecc | 6212 | 0 |
Networking | 4880 | 13276 |
NetX-Duo - Interfaces & Stacks | 0 | 16 |
OTA_Server | 8239 | 696 |
Other | 45436 | 535 |
Packet Buffers | 0 | 23086 |
platform | 1260 | 252 |
RAM Initialisation | 2492 | 0 |
resources | 16 | 0 |
Ring_Buffer | 112 | 0 |
SPI_Flash_Library_BCMUSI22 | 856 | 0 |
Startup Stack & Link Script fill | 54 | 7 |
Supplicant - BESL | 23355 | 615 |
ThreadX | 8596 | 396 |
Wi-Fi Firmware | 363808 | 0 |
WICED | 3445 | 960 |
WWD | 14679 | 3039 |
----------------------------------+---------+---------|
TOTAL (bytes) | 574316 | 48672 |
----------------------------------|---------|---------|
Downloading Bootloader ...
Building apps lookup table
Download complete
Downloading DCT ...
Download complete
Downloading Application ...
Download complete
Downloading FR_APP build/snip.ota_fr-BCMUSI22/binary/snip.ota_fr-BCMUSI22.stripped.elf at sector 1 address 4096...
make.exe[1]: *** [FR_APP_DOWNLOAD] Error 1
tools/makefiles/wiced_apps.mk:227: recipe for target 'FR_APP_DOWNLOAD' failed
make: *** [main_app] Error 2
Makefile:286: recipe for target 'main_app' failed
I test on FreeRTOS+LwIP build and test using google chrome browser.
Initially the browser can connect to the https server.
Reload or press F5 to send request for a few times.
Then the https server no longer response anymore.
I add a debug print, the error is "Error starting TLS connection",
the wiced_tcp_start_tls() return 19.
(Sometimes I also got wiced_tcp_start_tls result = 5018/5003/5030/17/2,
I have no idea why so many different error code.)
Show Less