Wi-Fi Combo Forum Discussions
text.format{('custom.tabs.no.results')}
Dear all,
I am trying to port the WHD to STM32F769NI-Discovery board. I have been following the guide from Wi-Fi Host Driver (WHD): Main Page . Sofar, I have implemented CY RTOS API, Buffer Interface API, and Network Interface API. But now I have many difficulties and questions about porting the CY HAL SDIO Bus API.
This is the cyhal_sdio_irq_enable() inside cyhal_sdhc.c. SDMMC2 is the SDIO interface from the STM discovery board.
void cyhal_sdio_irq_enable(cyhal_sdio_t *obj, cyhal_sdio_irq_event_t event, bool enable)
{
obj->base = SDMMC2;
uint32_t interruptEnable = Cy_SD_Host_GetNormalInterruptEnable(obj->base);
uint32_t interruptMask = Cy_SD_Host_GetNormalInterruptMask(obj->base);
if (enable)
{
interruptEnable |= event;
interruptMask |= event;
obj->irq_cause |= event;
}
else
{
interruptEnable &= ~(event);
interruptMask &= ~(event);
obj->irq_cause &= ~event;
}
Cy_SD_Host_SetNormalInterruptMask(obj->base, interruptMask);
Cy_SD_Host_SetNormalInterruptEnable(obj->base, interruptEnable);
}
SDMMC2 is defined in the stm32f769xx.h as following:
#define SDMMC2 ((SDMMC_TypeDef *) SDMMC2_BASE)
in the cyhal_hw_types.h, i have defined like this
typedef struct
{
#if defined(STM32F769xx)
SDMMC_TypeDef *base;
#else
void *empty;
#endif /* defined(STM32F769xx) */
} cyhal_sdio_t;
My 1st question is: Is the way I implement the obj->base (pointing to SDMMC2) correct?
My 2nd question is how to map the events defined in cyhal_sdio.h to the events in STM32F7? I will both the events in the WHD and in STMF7 below.
This is the definition cyhal_sdio_irq_event_t
typedef enum
{
CYHAL_SDIO_CMD_COMPLETE = 0x0001, //!> Command Complete
CYHAL_SDIO_XFER_COMPLETE = 0x0002, //!> Host read/write transfer is complete
CYHAL_SDIO_BGAP_EVENT = 0x0004, //!> This bit is set when both read/write transaction is stopped
CYHAL_SDIO_DMA_INTERRUPT = 0x0008, //!> Host controller detects an SDMA Buffer Boundary during transfer
CYHAL_SDIO_BUF_WR_READY = 0x0010, //!> This bit is set if the Buffer Write Enable changes from 0 to 1
CYHAL_SDIO_BUF_RD_READY = 0x0020, //!> This bit is set if the Buffer Read Enable changes from 0 to 1
CYHAL_SDIO_CARD_INSERTION = 0x0040, //!> This bit is set if the Card Inserted in the Present State
CYHAL_SDIO_CARD_REMOVAL = 0x0080, //!> This bit is set if the Card Inserted in the Present State
CYHAL_SDIO_CARD_INTERRUPT = 0x0100, //!> The synchronized value of the DAT[1] interrupt input for SD mode
CYHAL_SDIO_INT_A = 0x0200, //!> Reserved: set to 0
CYHAL_SDIO_INT_B = 0x0400, //!> Reserved: set to 0
CYHAL_SDIO_INT_C = 0x0800, //!> Reserved: set to 0,
CYHAL_SDIO_RE_TUNE_EVENT = 0x1000, //!> Reserved: set to 0,
CYHAL_SDIO_FX_EVENT = 0x2000, //!> This status is set when R[14] of response register is set to 1
CYHAL_SDIO_CQE_EVENT = 0x4000, //!> This status is set if Command Queuing/Crypto event has occurred
CYHAL_SDIO_ERR_INTERRUPT = 0x8000, //!> If any of the bits in the Error Interrupt Status register are set
CYHAL_SDIO_ALL_INTERRUPTS = 0xE1FF, //!> Is used to enable/disable all interrupts
} cyhal_sdio_irq_event_t;
This is SDMMC_MASK in stm32
* @brief Enable the SDMMC device interrupt.
* @param __INSTANCE__ : Pointer to SDMMC register base
* @param __INTERRUPT__ : specifies the SDMMC interrupt sources to be enabled.
* This parameter can be one or a combination of the following values:
* @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
* @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
* @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
* @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
* @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
* @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
* @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
* @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
* @arg SDMMC_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
* @arg SDMMC_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
* @arg SDMMC_IT_CMDACT: Command transfer in progress interrupt
* @arg SDMMC_IT_TXACT: Data transmit in progress interrupt
* @arg SDMMC_IT_RXACT: Data receive in progress interrupt
* @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
* @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt
* @arg SDMMC_IT_TXFIFOF: Transmit FIFO full interrupt
* @arg SDMMC_IT_RXFIFOF: Receive FIFO full interrupt
* @arg SDMMC_IT_TXFIFOE: Transmit FIFO empty interrupt
* @arg SDMMC_IT_RXFIFOE: Receive FIFO empty interrupt
* @arg SDMMC_IT_TXDAVL: Data available in transmit FIFO interrupt
* @arg SDMMC_IT_RXDAVL: Data available in receive FIFO interrupt
* @arg SDMMC_IT_SDIOIT: SDIO interrupt received interrupt
* @retval None
*/
#define __SDMMC_ENABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->MASK |= (__INTERRUPT__))
I am trying to fetch UDP data over Ethernet and send it using WiFi. i am able to either fetch UDP data from Ethernet (by using WICED_NETWORK_UP) or send UDP data over WiFi (by using WICED_NETWORK_UP_DEFAULT) individually.
But my current application demands setting up both network simultaneously. Do let me know if any further information is required on the same from my side.
Show LessWould you be able to confirm what version of BLE runs on the CYW4343W please? The datasheet says 4.1, but third party modules that use it say anything from 4.2 to 5.1!
Normally I'd assume the manufacturer of the chip was right, but this is Cypress we're talking about here.;-)
Currently, we can't send any characteristic over 20 bytes, so I'm willing to bet it is 4.1.
Show LessHi, I am César Alcayde, an engineer from Bright Machines. Currently, we are working with Philips on the development of one of its products.
We are having some problems programing the wiced board "WM-AN-BM-23" using a J-LINK SEGGER, and hope that you could help us.
- How can we transfer a ".elf" file to the wiced, using the J-Flash program?
- We weren´t capable of erasing the wiced chip, as shown in the image below. What are we doing wrong?
Thank you for your help
Show LessHello,
My app connects to AWS over WiFi intermittently.
Please advise if the following sequence is correct-
- wiced_network_up()
- wiced_aws_init()
- wiced_aws_create_endpoint()
- wiced_aws_connect()
- bunch of wiced_aws_subscribe()
- bunch of wiced_aws_publish()
- wiced_aws_disconnect()
- wiced_aws_deinit()
- wicefd_network_down()
- After X minutes goto 1
Is it possible to shorten reconnection time described above by calling wiced_aws_init()/wiced_aws_create_endpoint() once upon the first connection, or does it have to be called on every (re)connection
Also,
There seem to be a memory leak when calling wiced_aws_disconnect().
At the end of the function there's a call to "free(aws)".
However the parameter aws that was dynamically allocated in wiced_aws_create_endpoint(), has an internal dynamic allocation (aws->mqtt.base) taking place in aws_internal_mqtt_init() that is not freed when its parent object (aws) is being freed !
Also(2),
Was this reported memory leak handled in the latest SDK? Should I follow the suggested solution in the post?
Your guidelines on how to deal with this use case are highly valuable and appreciated
Thanks
Hello,
I'm following the Sterling-EWB Development Kit - Software guide. https://connectivity-staging.s3.us-east-2.amazonaws.com/2019-07/CS-GUIDE-EWB_DevBd-SW%20v1_0_0.pdf
I tried to build the section 5 Sterling-EWB Sensor Demo but getting the following errors. So does the libalgobsec.a need to be built with softfp?
Making laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO.elf
c:/users/irtsshre/documents/wiced-studio-6.4/43xxx_wi-fi/tools/arm_gnu/win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: ./apps/laird/demo/sensor/libalgobsec.a(bsec_interface.o) uses VFP register arguments, build/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO/binary/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO.elf does not
c:/users/irtsshre/documents/wiced-studio-6.4/43xxx_wi-fi/tools/arm_gnu/win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file ./apps/laird/demo/sensor/libalgobsec.a(bsec_interface.o)
c:/users/irtsshre/documents/wiced-studio-6.4/43xxx_wi-fi/tools/arm_gnu/win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: ./apps/laird/demo/sensor/libalgobsec.a(bsec_codegen_do_steps.o) uses VFP register arguments, build/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO/binary/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO.elf does not
c:/users/irtsshre/documents/wiced-studio-6.4/43xxx_wi-fi/tools/arm_gnu/win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file ./apps/laird/demo/sensor/libalgobsec.a(bsec_codegen_do_steps.o)
c:/users/irtsshre/documents/wiced-studio-6.4/43xxx_wi-fi/tools/arm_gnu/win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: ./apps/laird/demo/sensor/libalgobsec.a(bsec_codegen_get_configuration.o) uses VFP register arguments, build/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO/binary/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO.elf does not
c:/users/irtsshre/documents/wiced-studio-6.4/43xxx_wi-fi/tools/arm_gnu/win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file ./apps/laird/demo/sensor/libalgobsec.a(bsec_codegen_get_configuration.o)
c:/users/irtsshre/documents/wiced-studio-6.4/43xxx_wi-fi/tools/arm_gnu/win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: ./apps/laird/demo/sensor/libalgobsec.a(bsec_codegen_get_state.o) uses VFP register arguments, build/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO/binary/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO.elf does not
.
.
.
. Shaun- Skipping similar erros to reduce the post size.
build/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO/libraries/Sterling_Wifi_BLE_Demo.a(wifi_config_profile.o): In function `wifi_scan_result_handler':
C:\Users\irtsshre\Documents\WICED-Studio-6.4\43xxx_Wi-Fi/apps/laird/demo/ble/profiles/wifi_config_profile.c:224: undefined reference to `WPRINT_BT_APP_INFO'
C:\Users\irtsshre\Documents\WICED-Studio-6.4\43xxx_Wi-Fi/apps/laird/demo/ble/profiles/wifi_config_profile.c:239: undefined reference to `WPRINT_BT_APP_INFO'
build/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO/libraries/Sterling_Wifi_BLE_Demo.a(wifi_config_profile.o): In function `wifi_config_confirmation_handler':
C:\Users\irtsshre\Documents\WICED-Studio-6.4\43xxx_Wi-Fi/apps/laird/demo/ble/profiles/wifi_config_profile.c:184: undefined reference to `WPRINT_BT_APP_INFO'
C:\Users\irtsshre\Documents\WICED-Studio-6.4\43xxx_Wi-Fi/apps/laird/demo/ble/profiles/wifi_config_profile.c:189: undefined reference to `WPRINT_BT_APP_INFO'
build/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO/libraries/Sterling_Wifi_BLE_Demo.a(wifi_config_profile.o): In function `wifi_config_send_message':
C:\Users\irtsshre\Documents\WICED-Studio-6.4\43xxx_Wi-Fi/apps/laird/demo/ble/profiles/wifi_config_profile.c:144: undefined reference to `WPRINT_BT_APP_INFO'
build/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO/libraries/Sterling_Wifi_BLE_Demo.a(wifi_config_profile.o):C:\Users\irtsshre\Documents\WICED-Studio-6.4\43xxx_Wi-Fi/apps/laird/demo/ble/profiles/wifi_config_profile.c:262: more undefined references to `WPRINT_BT_APP_INFO' follow
collect2.exe: error: ld returned 1 exit status
make.exe[1]: *** [build/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO/binary/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO.elf] Error 1
tools/makefiles/wiced_elf.mk:315: recipe for target 'build/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO/binary/laird.demo-LAIRD_EWB-ThreadX-NetX-SDIO.elf' failed
Makefile:351: recipe for target 'main_app' failed
make: *** [main_app] Error 2
19:57:49 Build Finished (took 4m:20s.41ms)
Show LessHello
I have recently purchased the CYW943907AEVAL1F for my project purpose. I was able to download it fine on my Linux Ubuntu 20.04 system.
However, When I tried to load the program that was already configured in "Make Target" section, I got the below error:
********************************************************************************************************************************************
04:45:25 **** Build of configuration Default for project 43xxx_Wi-Fi ****
/home/gaurav/cypress/SDK/WICED-Studio-6.4/43xxx_Wi-Fi/make snip.scan-CYW943907AEVAL1F download run
MAKEFILE MAKECMDGOALS=snip.scan-CYW943907AEVAL1F download run 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.scan-CYW943907AEVAL1F download run OTA2_SUPPORT is disabled
Building Bootloader waf.bootloader-NoOS-NoNS-CYW943907AEVAL1F-P103-SoC.43909
Building Tiny Bootloader waf.tiny_bootloader-NoOS-NoNS-CYW943907AEVAL1F-P103-SoC.43909
Building Serial Flash Loader App
Finished Building Serial Flash Loader App
prgm hdr cnt=3
total_size = 15904, entry_point = 0x696000
Loadsegment_offset = 0xA0 segment_size = 15668, segment_pad = 0
Loadsegment_offset = 0x3DE0 segment_size = 32, segment_pad = 0
Loadsegment_offset = 0x3E04 segment_size = 204, segment_pad = 0
Finished Building Bootloader
Processing resources
Creating security credentials
Making DCT image
Compiling App_Scan
Compiling Platform_CYW943907AEVAL1F_P103_B1
Compiling WICED
Finished Building Tiny Bootloader
Compiling Lib_adc_MAX11615_driver
Compiling Lib_spdif_driver
Compiling WWD_ThreadX_Interface
Compiling WICED_ThreadX_Interface
Compiling WWD_for_SoC.43909_ThreadX
Compiling Supplicant_BESL
Compiling Lib_DNS
Compiling Lib_wifi_utils
Compiling NetX_Duo
Compiling Lib_Wiced_RO_FS
Compiling MCU_BCM4390x
Compiling Lib_TLV
Compiling Lib_base64
Compiling Lib_Linked_List
Compiling Lib_mbedTLS
Compiling Lib_micro_ecc
Compiling WWD_NetX_Duo_Interface
Compiling WICED_NetX_Duo_Interface
Compiling Lib_crc
Compiling Lib_GPIO_button
Compiling common_GCC
Compiling 43909_Peripheral_Drivers
Compiling Lib_Ring_Buffer
Compiling Lib_DHCP_Server
Compiling Lib_Mini_Printf
Compiling SPI_Flash_43909_Library_CYW943907AEVAL1F
Compiling Uart_43909_Library_CYW943907AEVAL1F
Compiling Peripherals_Shared_43909_Library_CYW943907AEVAL1F
Compiling Tiny_Crypto_43909_Library_CYW943907AEVAL1F
Compiling Ethernet_43909_Library_CYW943907AEVAL1F
Making build/snip.scan-CYW943907AEVAL1F/libraries/App_Scan.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Platform_CYW943907AEVAL1F_P103_B1.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/WICED.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_adc_MAX11615_driver.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_spdif_driver.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/WWD_ThreadX_Interface.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/WICED_ThreadX_Interface.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/WWD_for_SoC.43909_ThreadX.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Supplicant_BESL.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_DNS.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_wifi_utils.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/NetX_Duo.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_Wiced_RO_FS.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/MCU_BCM4390x.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_TLV.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_base64.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_Linked_List.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_mbedTLS.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_micro_ecc.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/WWD_NetX_Duo_Interface.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/WICED_NetX_Duo_Interface.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_crc.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_GPIO_button.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/common_GCC.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/43909_Peripheral_Drivers.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_Ring_Buffer.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_DHCP_Server.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Lib_Mini_Printf.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/SPI_Flash_43909_Library_CYW943907AEVAL1F.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Uart_43909_Library_CYW943907AEVAL1F.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Peripherals_Shared_43909_Library_CYW943907AEVAL1F.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Tiny_Crypto_43909_Library_CYW943907AEVAL1F.a
Making build/snip.scan-CYW943907AEVAL1F/libraries/Ethernet_43909_Library_CYW943907AEVAL1F.a
Making snip.scan-CYW943907AEVAL1F.elf
Making snip.scan-CYW943907AEVAL1F.bin
snip.scan-CYW943907AEVAL1F
----------------------------------|---------|---------|
| | Static |
Module | Flash | RAM |
----------------------------------+---------+---------|
App | 0 | 474 |
crc | 0 | 1060 |
Interrupt Vectors | 0 | 292 |
libc | 0 | 36287 |
Networking | 0 | 15633 |
NetX-Duo - Interfaces & Stacks | 0 | 16 |
NVRam | 0 | 2210 |
Other | 0 | 59661 |
Packet Buffers | 0 | 71659 |
platform | 0 | 616 |
RAM Initialisation | 32 | 0 |
resources | 0 | 32 |
Ring_Buffer | 0 | 132 |
Startup Stack & Link Script fill | 0 | 179 |
ThreadX | 0 | 12136 |
TLV | 0 | 28 |
WICED | 0 | 5427 |
Wiced_RO_FS | 0 | 566 |
WWD | 0 | 1551 |
----------------------------------+---------+---------|
TOTAL (bytes) | 0 | 207959 |
----------------------------------|---------|---------|
Creating Filesystem BCM94390x_targets.mk ...
Downloading DCT ... build/snip.scan-CYW943907AEVAL1F/DCT.bin @ SFLASH_DCT_LOC=0x00008000
./tools/common/Linux64/mk_wicedfs32 build/snip.scan-CYW943907AEVAL1F/filesystem.bin build/snip.scan-CYW943907AEVAL1F/resources/Staging/
Creating Filesystem Done
make[1]: *** [download_dct] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [main_app] Error 2
***************************************************************************************************************
I am not sure why I am getting this error.
Any lead on this issue will be very much appreciated.
Thanks
- Gaurav
Show LessHello,
The goal is to make a Wi-Fi mesh network based on IBSS or IEEE 802.11s.
1. Do Cypress Wi-Fi modules and their drivers support IBSS or IEEE 802.11s?
I plan to connect a Wi-Fi module to Raspberry PI 3.
2. So, are Cypress drivers supported in Linux 4.19 (Raspbian 10) or later kernel versions?
Show Less