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.

cc2538 UART Tx problem

Other Parts Discussed in Thread: CC3200, CC2538

I am trying to do UART communication between cc3200 and cc2538DK. I am using the UART pins available on P412 probe on EB.

I have done initialisations similar to done in MT. I am able to receive data in UART but i am not able to send the data.
I have connected the tx pin to oscilloscope and it is not showing any thing. When i tracked down, the UARTCharPutNonBlocking is returning false in Proctx ( which is called in  HalUARTWriteIsr) 
I can see no reason for UARTCharPutNonBlocking returning false on my first UARTWrite.
Also in
 
void HalUARTInitIsr(void)
{

   SysCtrlPeripheralEnable(HAL_UART_SYS_CTRL);

  /* Setup PB0 as UART_CTS, PD3 as UART_RTS  

   * PA1 as UART_TX and PA0 as UART_RX */ 

  IOCPinConfigPeriphOutput(GPIO_A_BASE, GPIO_PIN_1, IOC_MUX_OUT_SEL_UART1_TXD);

  IOCPinConfigPeriphInput(GPIO_A_BASE, GPIO_PIN_0, IOC_UARTRXD_UART1);

  GPIOPinTypeUARTInput(GPIO_A_BASE, GPIO_PIN_0);

  GPIOPinTypeUARTOutput(GPIO_A_BASE, GPIO_PIN_1);  

  recRst();

}

the pins are initialised as UART1 while the RX and TX are connected to UART0 in Evaluation Board.

Should i change it to UART0?

  • Hi Nirmala,

    The only possible reason why UARTCharPutNonBlocking() returns FALSE is that there is FIFO FULL error. Please check if the FIFO is already full and if FIFO is enabled. To enable the FIFO, please use UARTFIFOEnable().
    IO pin assignments on CC2538 are fully configurable. There is no dedicated pins for UART0. Please make sure that the UART base address(HAL_UART_PORT) is corrected set to UART1_BASE.

    Which version of software are you using as the baseline? What changes did you made regarding UART?

    - Cetri
  • Yes i have enabled the FIFO. Why do i need to set HAL_UART_PORT to UART1_BASE only if i want to use UART 0 ?

    In function HalUARTInitIsr all the peripherals are set to values for UART1.Also while opening Uart port in HalUARTOpenIsr the port value ( port which i want to open) is used just to close and rest of the setting are done using HAL_UART_PORT which is set to UART1_BASE. Am i missing something here or z stack is using UART port 1 by default ?

    I am using genericapp and added UART initializations from MT_UartInit to new function GenericUartInint
  • Thanks Cetri! i was able to do the commn. I was doing the initilisations twice as MT_task was already included in my generic app application.