This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UART Receive not working

Other Parts Discussed in Thread: CC3200

I am able to send a char array via UART using Modbus protocol, but the response from the slave device is not being received. The program keeps running in the while loop of UARTCharGet function. I checked on the modbus slave simulator, that the response is being sent, but not received on CC3200.

My main function is as follows:

void main()
{

    //
    // Initailizing the board
    //

    //
    // Muxing for Enabling UART_TX and UART_RX.
    //
    PinMuxConfig();
    //
    // Initialising the Terminal.
    //
    InitTerm();
    //
    // Clearing the Terminal.
    //

    //LEDBlinkyRoutine();
    UARTEnable(UARTA0_BASE);
    UARTFIFOEnable(UARTA0_BASE);


    PutRoutine();

    GetRoutine();

}

GetRoutine :

void GetRoutine()
{
		for(j=0;j<5;j++)
		{
				response[j] = UARTCharGet(UARTA0_BASE);
		}

		
}

Pinmux:

void PinMuxConfig(void)
{


    //
    // Set unused pins to PIN_MODE_0 with the exception of JTAG pins 16,17,19,20
    //
    

    //
    // Enable Peripheral Clocks 
    //
    PRCMPeripheralClkEnable(PRCM_GPIOA1, PRCM_RUN_MODE_CLK);
    PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK);

    //
    // Configure PIN_64 for GPIO Output
    //
    PinTypeGPIO(PIN_64, PIN_MODE_0, false);
    GPIODirModeSet(GPIOA1_BASE, 0x2, GPIO_DIR_MODE_OUT);

    //
    // Configure PIN_01 for GPIO Output
    //
    PinTypeGPIO(PIN_01, PIN_MODE_0, false);
    GPIODirModeSet(GPIOA1_BASE, 0x4, GPIO_DIR_MODE_OUT);

    //
    // Configure PIN_02 for GPIO Output
    //
    PinTypeGPIO(PIN_02, PIN_MODE_0, false);
    GPIODirModeSet(GPIOA1_BASE, 0x8, GPIO_DIR_MODE_OUT);

    //
    // Configure PIN_03 for UART0 UART0_TX
    //
    PinTypeUART(PIN_03, PIN_MODE_7);

    //
    // Configure PIN_04 for UART0 UART0_RX
    //
    PinTypeUART(PIN_04, PIN_MODE_7);
}