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.

cc2540 UART and USB clarification

Other Parts Discussed in Thread: CC2540

Hello all,

I'm implementing UART communication between MSP430 and CC2540.
The communication is planned to be using ISR for read and write.

Moreover, I plan to use the CC2540 as mess storage device over USB. 

Reading through the "Software Developer’s Guide" I can see under the "Symbols Mandatory for BLE Stack:" section that the definition HAL_UART_ISR is not to be used when planning on using the CC2540 as USB as it is written :

"HAL_UART_ISR – This symbol sets the CC2540/41 UART interface to use ISR mode, and

should be set to TRUE for builds that use the actual UART interface for the HCI, but not for
builds that use the USB (virtual UART) interface."

I was hoping you guys could share some light on how can I accomplish this two tasks.

Thanks in advance! 

  • Hi Omri,

    I might be mistaken, but I think the HAL_UART_ defines are only relevant for the 'real' UARTs and not for the virtual UART on the USB-port.

    Nonetheless, in your case I would give HAL_UART_DMA a try for MSP communication. UART via DMA worked fine. Just make sure you

    1. disable CLOCK_DIV_ON_HALT HCI_EXT_ClkDivOnHaltCmd(HCI_EXT_DISABLE_CLK_DIVIDE_ON_HALT); and
    2. you don't enter power save mode when waiting for incoming data osal_pwrmgr_device(PWRMGR_ALWAYS_ON);

    HTH

    Andre