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.

BLE speed increasing and Usart Problem

Other Parts Discussed in Thread: CC2540

Hi All.

I have used sample supported in link below to increase speed of bluetooth communication in my project.

"processors.wiki.ti.com/.../CC2540_Data_Throughput".

I used CC2540 as bluetooth module.

If DEFAULT_ENABLE_UPDATE_REQUEST = true,  usart communication between main cpu and cc2540 is unstable in my project.

I  used dma for transmitting and used interrupt for receiving on cc2540.

In this case usart receiving is often failure.

Many thanks.

  • Hello. Can you please supply some more information about your problem?

    How have you configured the USART / DMA?
    Note that there is serial-to-BLE-bridge example which would probably serve as a good example of USART-to-BLE high throughput communication:
    processors.wiki.ti.com/.../SerialBLEbridge

    What exactly is the failure case / stability issue? Perhaps a logic capture would help.
  • If too much data is coming in, then there is possibility data is being dropped because buffers get full. OTA it is fine, but app can get starved if too much is going on. Try compiling for speed, and if you have control over connection interval, try to keep it up over 20ms. If it's dropping connection, then that would be different issue.
  • Hi, Tim C.

    Thanks for your answer.

    In cc2540 uart transmit is implemented by dma mode and uart receiving is implemented by interrupt mode.
    In _hal_uart_dma.c file, part of uart rx is comment out at HalUARTInitDMA() and add URXxIE = 1 to HalUARTOpenDMA().
    To increase speed of ble communication , set DEFAULT_ENABLE_UPDATE_REQUEST as true in simpleBLEPeripheral.c
    By the way, uart and ble communication has been unstable and often has been failed.

    Now i modified my project as following.
    I modified uart rx by using dma.
    I comment HCI_EXT_ClkDivOnHaltCmd( HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT ) out at SimpleBLEPeripheral_Init of simpleBLEPeripheral.c

    HCI_EXT_ClkDivOnHaltCmd( HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT ) ;;; before modified
    //HCI_EXT_ClkDivOnHaltCmd( HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT ) ;;; after modified
    Therefore uart communication has been stable and ble communication is good.

    I want to know what effect HCI_EXT_ClkDivOnHaltCmd( HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT ) to uart/ble communication.

    Best Regards.

    Galaxy.