Parth Modi

Problem in uart of TWR-K20D72M EVM

Discussion created by Parth Modi on May 30, 2016

Hi,

I am evaluating TWR-K20D72M EVM board. In my scenario i want to interface the WiFi and GSM module this EVM.

So,I interfaced the GS2100MIE WiFi module with UART0 of this EVM and i send AT command sequence as per my application.

i am requesting to addressing my below listed queries,

-If i connect the WIFI module directly with uart port of TWR-K20D72M board than communication is not working.

-If i connect USB-to-UART dongle in between WIFI module and TWR-K20D72M EVM board than the communication is working fine.

I attached below code for your reference.

 

#################################################################################

#include "common.h"

#include "uart.h"

#include "isr.h"

#include "lptmr.h"

unsigned char data='a';

char RxCh;

static uint8 i=0;

/********************************************************************/

void uart_config(void)

{

       //uart0 intialized    

       PORTD_PCR6 = PORT_PCR_MUX(3);//rx

       PORTD_PCR7 = PORT_PCR_MUX(3);//tx

       //uart_init function for set bauard rate and clock

       uart_init(UART0_BASE_PTR,72000,9600);

}

void uart_app_init(void)

{

    enable_irq(INT_UART0_RX_TX-16);

    UART_C2_REG(UART0_BASE_PTR)|= UART_C2_RIE_MASK ;  //enable RDRF interrupt

void main (void)

{    

        uart_config();      

        uart_app_init();

      

        lptmr_init(0x01110,3);

        enable_irq(INT_LPTimer-16);

      

        uart_send_str("AT\r\n",UART0_BASE_PTR);

  while(1);     

}

void isr_uart0_tx_rx(void)

{

    while (!(UART_S1_REG(UART0_BASE_PTR) & UART_S1_RDRF_MASK));  // clear RDRF flag  

    RxCh = UART_D_REG(UART0_BASE_PTR);   // Return the 8-bit data from the receiver

    printf("%c",RxCh);

}

#############################################################################################

 

 

Please let me know if you need more information from our side.

 

Any help in this case will be appreciated ?

 

Thanks,

Parth

Outcomes