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.

Problems with UART Implementation in CC2540

Other Parts Discussed in Thread: CC2540

Hi,

I am working with the HostTestRelease CC2540USB Master code that Texas provides for the USB Dongle of the CC2540 Mini Development Kit. I am trying to modify this code in order to send some characters through UART (USART0 UART Alt.1). I have already changed and added some code and although I can see these characters filling the txBuf buffer of isrCfg structure, I can not see the corresponding signal on pin P0_3 with an oscilloscope. I have listed the changes I made to the code.

Thanks!

Lara

1- In hal_board_cfg.h file

    Define:
    HAL_UART_ISR 1
    HAL_UART_USB 0

    Add:
    #if ((HAL_UART_DMA == 1) || (HAL_UART_ISR == 1))
      #define HAL_UART_PRIPO             0x00
    #else
      #define HAL_UART_PRIPO             0x40
    #endif

2- Add _hal_uart_isr.c  file to "Texas Instruments\BLE-CC2540\Components\hal\target\CC2540USB" directory

3- Add this code to osal_start_system() function at the beginning

    uint16 i=1;
    unsigned char str1='a';
    unsigned char * pstr1;
    pstr1= & (str1);
    uint16 luzera1= sizeof(str1);
 
    while (i<256)
    {
       HalUARTWrite(HAL_UART_PORT_0,pstr1,luzera1);
       i++;
    }