Wi-Fi Combo Forum Discussions
Here is a surprising finding: With mutual TLS authentication enabled (i.e., certificate enabled on both Firefox client and WICED HTTPS server), the function ssl_receive_packet in the file wiced_tls.c has a propensity to hang the CPU unless I delay the function by 50ms if the len parameter is less than 5:
static int ssl_receive_packet( void *ctx, unsigned char **buf, size_t len )
{
wiced_result_t result;
wiced_tcp_socket_t* socket = ( wiced_tcp_socket_t* ) ctx;
uint16_t available_data_length = 0;
uint16_t length = 0;
WPRINT_SECURITY_DEBUG (("TLS library asked for [%d] bytes \n", len ));
// delay workaround to prevent from hanging the CPU
if (len <= 5)
device_wait_ms(50);
...
It used to hang almost immediately without the delay, but it seems to last longer with the delay. The reason I found that a delay improves things is that when I enabled the debug print statements, the problem became much less severe. Example debug print output that seemed to help (log level 0):
TLS library asked for [5] bytes
Received new TCP packet with length [427]
TLS library asked for [422] bytes
Skip [5] no of bytes from TCP received packet with length : [427]
check if multiple TLS records present in single TCP pkt
TLS library asked for [5] bytes
Skip [427] no of bytes from TCP received packet with length : [427]
wiced_packet_get_data failed with result : [4]
TLS library asked for [5] bytes
Received new TCP packet with length [395]
There must be a timing-related problem in the code.
Perhaps the dev team investigated this function in the past in this regard?
Show LessSorry forgot to add the board we are working with.
cyw94343wwcd1 on board initialization causes SPI pins reassigned to PWM(shared pins) to power on and off during init, how do I turn this off or /dev/null SPI so no action is taken on boot/init or reset?????
This would cause motors to turn on during initialization and reset that use these GPIO's which is not a good thing.
With the CYW94343WWD1 eval board, we are having an issue on boot with the WICED_PWM_# pins we are using. The issue is that they appear to be bound to the same GPIO pins like MICRO_SPI_MISO and others that during boot turn on and off. These Pins are all allocatable as PWM but on initiailization they turn on and off multiple times even after a reset on the dev board.This results in these GPIO pins that are used as PWM output pins being turned on and off as well during resets, when they should not be on at all.
CYPRESS GPIO 94343 to dev board and breakaway | ||||
WICED SDK | STM32f411 | BCM94343 | PIN# | Interface |
WICED_PWM_1 | WICED_GPIO_11 | MICRO_GPIO_0 | 21 | J7 |
WICED_PWM_2 | WICED_GPIO_26 | MICRO_GPIO_1 | 24 | J7 |
WICED_PWM_3 | WICED_GPIO_2 | MICRO_ADC_IN1 | 16 | J7 |
WICED_PWM_4 | WICED_GPIO_3 | MICRO_ADC_IN2 | 15 | J7 |
WICED_PWM_5 | WICED_GPIO_4 | MICRO_ADC_IN3 | 18 | J7 |
WICED_PWM_6 | WICED_GPIO_6 | MICRO_SPI_SCK | 20 | J7 |
WICED_PWM_7 | WICED_GPIO_7 | MICRO_SPI_MISO | 19 | J7 |
WICED_PWM_8 | WICED_GPIO_8 | MICRO_SPI_MOSI | 22 | J7 |
WICED_PWM_9 | WICED_GPIO_2 | MICRO_ADC_IN1 | 16 | J7 |
The questions we have from this are:
- Is there a way to disable signals being sent out of these GPIO pins during boot?
- If there is a way to stop it, how do we do that?
from a Prior forum question answered by Priyam_16
Using cyw94343 their are only 2 PWM GPIO's assigned need more??
This question has been Answered.
Gillian Hernandez Jun 15, 2019 1:14 PM
Hello all using cyw94343, cypress has only 2 PWM cpio's assigned with this model, I need to create a total of 4 - 6 to control motors, driven off this
device. Which libraries do i need to add to or duplicate from give me a total 4 or 6 assignment's of GPIO's to test this with. This being software driven are
their specific physical restrictions in re-using the existing non pwm GPIO's, and re-assigning them to PWM GPIO actions, it should be a library assignment and header .h
creation or duplication issue ??
Let me know if i'm off track here thanks ahead of time to y'all.

Hello,
You can use the WICED peripheral alias given in platform.c file of your platform.
The struct platform_pwm_peripherals[] contains configurations for different aliases provided by WICED. You can use the GPIOs mentioned in the struct as PWMs.
1 of 1 people found this helpfulSee the answer in context
- 52 Views
- Tags:
Correct Answer 1. Re: Using cyw94343 their are only 2 PWM GPIO's assigned need more??
PriyaM_16
Jun 21, 2019 4:14 AM (in response to Gillian Hernandez)
class="smz-translated loading"
THIS WAS THE STUCTURE OUTLINED Below, please note that the SPI structure is also using the same GPIO's:
/* PWM peripherals. Used by WICED/platform/MCU/wiced_platform_common.c */
const platform_pwm_t platform_pwm_peripherals[] =
{
[WICED_PWM_1] = {TIM3, 3, RCC_APB1Periph_TIM3, GPIO_AF_TIM3, &platform_gpio_pins[WICED_GPIO_11]},
[WICED_PWM_2] = {TIM10, 1, RCC_APB2Periph_TIM10, GPIO_AF_TIM10, &platform_gpio_pins[WICED_GPIO_26]},
[WICED_PWM_3] = {TIM2, 2, RCC_APB1Periph_TIM2, GPIO_AF_TIM2, &platform_gpio_pins[WICED_GPIO_2] }, /* or TIM5/Ch2 */
[WICED_PWM_4] = {TIM2, 3, RCC_APB1Periph_TIM2, GPIO_AF_TIM2, &platform_gpio_pins[WICED_GPIO_3] }, /* or TIM5/Ch3, TIM9/Ch1 */
[WICED_PWM_5] = {TIM2, 4, RCC_APB1Periph_TIM2, GPIO_AF_TIM2, &platform_gpio_pins[WICED_GPIO_4] }, /* or TIM5/Ch4, TIM9/Ch2 */
[WICED_PWM_6] = {TIM2, 1, RCC_APB1Periph_TIM2, GPIO_AF_TIM2, &platform_gpio_pins[WICED_GPIO_6] }, /* or TIM2_CH1_ETR, TIM8/Ch1N */
[WICED_PWM_7] = {TIM3, 1, RCC_APB1Periph_TIM3, GPIO_AF_TIM3, &platform_gpio_pins[WICED_GPIO_7] }, /* or TIM1_BKIN, TIM8_BKIN, TIM13/Ch1*/
[WICED_PWM_8] = {TIM3, 2, RCC_APB1Periph_TIM3, GPIO_AF_TIM3, &platform_gpio_pins[WICED_GPIO_8] }, /* or TIM8/Ch1N, TIM14/Ch1 */
[WICED_PWM_9] = {TIM5, 2, RCC_APB1Periph_TIM5, GPIO_AF_TIM5, &platform_gpio_pins[WICED_GPIO_2] }, /* or TIM2/Ch2 */
};
/* PWM peripherals. Used by WICED/platform/MCU/wiced_platform_common.c */
const platform_spi_t platform_spi_peripherals[] =
{
[WICED_SPI_1] =
{
.port = SPI1,
.gpio_af = GPIO_AF_SPI1,
.peripheral_clock_reg = RCC_APB2Periph_SPI1,
.peripheral_clock_func = RCC_APB2PeriphClockCmd,
.pin_mosi = &platform_gpio_pins[WICED_GPIO_8],
.pin_miso = &platform_gpio_pins[WICED_GPIO_7],
.pin_clock = &platform_gpio_pins[WICED_GPIO_6],
.tx_dma =
{
.controller = DMA2,
.stream = DMA2_Stream5,
.channel = DMA_Channel_3,
.irq_vector = DMA2_Stream5_IRQn,
.complete_flags = DMA_HISR_TCIF5,
.error_flags = ( DMA_HISR_TEIF5 | DMA_HISR_FEIF5 | DMA_HISR_DMEIF5 ),
},
.rx_dma =
{
.controller = DMA2,
.stream = DMA2_Stream0,
.channel = DMA_Channel_3,
.irq_vector = DMA2_Stream0_IRQn,
.complete_flags = DMA_LISR_TCIF0,
.error_flags = ( DMA_LISR_TEIF0 | DMA_LISR_FEIF0 | DMA_LISR_DMEIF0 ),
},
}
};
Show LessI have a stock wiced studio 6.4 . I have two cybt-353027 boards. I am trying to run the app.beacon snip. I believe the device is getting programmed correctly as I can scan and see the beacons, however no debug info is coming out of the puart.
demo.beacon-CYBT_353027_EVAL PORT=COM11 download
if I program this
demo.hello_sensor-CYBT_353027_EVAL PORT=COM11 download
I see degug info out the puart.
Again this is all stock. I know the swtiches are set right and I am seeing data on com8 at 115200 with hello sensor just not with beacon.
both make files have
C_FLAGS += -DWICED_BT_TRACE_ENABLE
is there a problem with the beacon project?
Show LessHi Sir,
Can either CYW43907 and CYW54907 support software AP mode?
Please see comments below..How do you start ?
https://community.cypress.com/message/147384#147384
https://community.cypress.com/message/189276#189276
https://community.cypress.com/message/149926#149926
https://community.cypress.com/message/169278#169278
Show LessFor our project, our requirement is that the client (CYW43907 Evaluation Kit) needs to switch the frequency/channel of the wifi radio while being associated/on-the-fly. I have tried using wwd_wifi_set_channel. For example, wwd_wifi_set_channel( WWD_STA_INTERFACE, 9 ), in order to switch the radio for tx/rx the packets using channel 9. However, after switching the channel, when I check the channel using wwd_wifi_get_channel(), it still shows the original channel, which means that the channel was not switched to 9.
use case:
- The client (CYW43907 Evaluation Kit) associates with AP on channel 5.
- Every 5 seconds the client switches the channel from 5 to 9 and back to 5 from 9. Basically, it alternates between channel 5 and 9 every 5 seconds without disassociation and reassociation.
Can someone please explain the basic working of wwd_wifi_set_channel function, or how the channel switch assignment is performed on WICED platforms.
Show LessCould not find anything in the datasheet that clearly states if WL_REG_ON and BT_REG_ON use VDDIO or VBAT logic levels. Anyone have an answer and is there a datasheet or appnote that states this?
Show LessWe have developed devices whiches include CYW43340 modules for the Bluetooth and Wi-Fi communications.
Now we try to obtain Wi-Fi and Bluetooth FCC SAR certifications for our devices.
The reference certification test laboratory that we have contacted for the test has required us to prepare software test for the Wi-Fi and Bluteooth.
How could we get specific tools that let us to prepare this tests on CYW43340?
Thanks for your attention.
Show Less