Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Wi-Fi Combo Forum Discussions

Anonymous
Not applicable

I have a question regarding with STM32F4DIS-WIFI Module(Murata SN8200). I need to connect the RTS\CTS pins to make the handshaking between the module and the Microprocessor board. Any idea about how to do that using the WICED, and how can I download the code on the module or embed it in the firmware?

0 Likes
12 Replies
SeyhanA_31
Employee
Employee
100 likes received 50 likes received 25 likes received

Hi,

Moved your question to Murata's space.

Seyhan

0 Likes
Anonymous
Not applicable

I couldn't find the answer for my question!

0 Likes

Hi,

This blog How to Enable UART2 on BCM943341 EVB show how to setup another UART (UART2) for different MCU but setup is similar for your MCU as well.

For each UART setup CTS and RTS signals could be defined as well. Replace the following null definitions for CTS and RTS

.cts_pin = NULL,

.rts_pin = NULL,

with mapped CTS and RTS pin definitions in "const platform_uart_t platform_uart_peripherals[] =" located in your platform file, \platforms\SN8200x\platform.c.

Below is the example of CTS and RTS definitions for BCM43341 for UART2:

.cts_pin = &platform_gpio_pins[WICED_GPIO_15],

.rts_pin = &platform_gpio_pins[WICED_GPIO_16],

Seyhan

0 Likes
Anonymous
Not applicable

Hi seyhan,

I am Using BCM-943362 Board. Simple Rx and Tx is working fine.
I wanted the flow control for the UART (RTS/CTS).

How do I Defined it. ?

0 Likes
SeyhanA_31
Employee
Employee
100 likes received 50 likes received 25 likes received

Hi,

Try adding following to "const platform_uart_t platform_uart_peripherals[]=" definition in platforms/BCM943362WCD4/platform.c platform definition file.

[WICED_UART_2] =

{

    .port              = USART2,

    .tx_pin            = &platform_gpio_pins[WICED_GPIO_3],

    .rx_pin            = &platform_gpio_pins[WICED_GPIO_4],

    .cts_pin            = &platform_gpio_pins[WICED_GPIO_1],

    .rts_pin            = &platform_gpio_pins[WICED_GPIO_2],

    .tx_dma_config =

    {

        .controller    = DMA1,

        .stream        = DMA1_Stream6,

        .channel        = DMA_Channel_4,

        .irq_vector    = DMA1_Stream6_IRQn,

        .complete_flags = DMA_HISR_TCIF6,

        .error_flags    = ( DMA_HISR_TEIF6 | DMA_HISR_FEIF6 ),

    },

    .rx_dma_config =

    {

        .controller    = DMA1,

        .stream        = DMA1_Stream5,

        .channel        = DMA_Channel_4,

        .irq_vector    = DMA1_Stream5_IRQn,

        .complete_flags = DMA_HISR_TCIF5,

        .error_flags    = ( DMA_HISR_TEIF5 | DMA_HISR_FEIF5 | DMA_HISR_DMEIF5 ),

    },

},

USART2 pins on the BCM943362WCD4 EVB are routed to J7 header.

PA0 CTS -> J7-9

PA1 RTS -> J7-3

PA2 Tx -> J7-4

PA3 Rx -> J7-5

Seyhan

0 Likes
Anonymous
Not applicable

seyhan
In my code for UART I am doin as below.
char startCmd2[20] = {0x02,0x01,0x02,0x08,0x08,0x02,0x02,0x56,0x65,0x15,0x45,0x65,0x98,0x12,0x32,0x45,0x12,0x46,0x23,0x32};//0x02,0x01,0x02,0x08,0x08};

0 Likes
Anonymous
Not applicable

Hi seyhan.

In my code for UART I am doin as below.

char startCmd2[20] = {0x02,0x01,0x02,0x08,0x08,0x02,0x02,0x56,0x65,0x15,0x45,0x65,0x98,0x12,0x32,0x45,0x12,0x46,0x23,0x32};//0x02,0x01,0x02,0x08,0x08};

char recvData[20];
memset(recvData,0, (sizeof(recvData)/sizeof(recvData[0])));

wiced_init();

      wiced_gpio_output_high( WICED_LED1 );

     // checking the UART for REsult

     wiced_result_t result;

    /* Initialise ring buffer */

    ring_buffer_init(&rx_buffer, rx_data, RX_BUFFER_SIZE );

    /* Initialise UART. A ring buffer is used to hold received characters */

    wiced_uart_init( STDIO_UART, &uart_config, &rx_buffer );

    /* Send a test string to the terminal */

    wiced_uart_transmit_bytes( STDIO_UART, TEST_STR, sizeof( TEST_STR ) - 1 );

for(loopCnt=0; loopCnt<=(sizeof(startBleCmd2)/sizeof(startBleCmd2[0])); loopCnt++)

    {

       wiced_uart_transmit_bytes( STDIO_UART, &startBleCmd2[loopCnt], 1);

    }

      memset(startBleCmd2,0, (sizeof(startBleCmd2)/sizeof(startBleCmd2[20])));

   while(1)

    {

    

     if(wiced_uart_receive_bytes(STDIO_UART, recvData, sizeof(recvData), WICED_NEVER_TIMEOUT ) == WICED_SUCCESS )

   

          

    /* De-Initialization of UART*/

   wiced_uart_deinit(STDIO_UART);

}

My question is , I am Able to send the data over UART to another Controller. But when I check There its showing garbage values there.

As In my buffer if i am sending 0x02 as first byte, On another Controller it's showing garbage.
Need guidance In this issue.

0 Likes

Adding the Murata team: skerr hhyogo yfang@murata.com keith

0 Likes

Moving back to the WICED Wi-Fi Forums​ per Murata.

Adding seyhan​ back to the thread.

0 Likes
Anonymous
Not applicable

Have you disabled STDIO?


You are using the same UART so you need to make sure that STDIO is disabled in the makefile 

0 Likes
Anonymous
Not applicable

And make sure that you have enabled RTS_CTS flow control in the uart configuration parameter 


Look at the BCM94343WWCD1 platform files on how to do this 

0 Likes
Anonymous
Not applicable
0 Likes