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 overrun CC2564B + MSP430F5438A

Other Parts Discussed in Thread: MSP430F5438A

Hi,

we are developing an application consisting on connecting one or more (up to seven) Bluetooth modules (based on CC2564B) with a smartphone or tablet with Android O.S.

Each bluetooth module (Sensor Unit) should transmit data at 64 kbps (at least) organized in packets of 256 bytes that are sent each 64 ms.

Data are sampled by two channels of the ADC12_A into the MSP430F5438A at 2 kHz.

At this time we are able to discover, connect and start sending data from one sensor unit to the server device (Samsung Galaxy Tab3) but the bluetooth device hangs up after the a period of time between few seconds to 2 or 3 minutes.....

After some days of investigation we can conclude that the cause of the problem is an UART overrun between CC2564B and MSP430.

Furthermore, it was observed that the system hangs up also id SPP_Data_Write() return a value less than the packet dimension (256 bytes).

No etPort_Buffer_Empty_Indication event occurs probably  due the the uart overrun cited above.

How can I solve this problem? how can I reach the desired throughput  withouth resetting the transmitting module?

Some other details are:

Bluetooth evaluation board used: CC256xQFNEM

MSP430F5438A evaluation board used:  MSP-EXP430F5438

Server device used: Samsung Galaxy Tab3


UART buffer size: 1024 bytes (Input) 384 (Output)

Configuration parameters: 329 987 2303 as suggested in "CC256x MSP430 TI's Bluetooth Stack Basic SPPDemo APP Improving throughput v14" guide

baudrate: 115200 (higher baudrate correspond to worse performance)

Bluetopia stack: v1.5 R2

The application firmware side is based on the SPPLEDemo example included in the stack documentation.

Thanks in advance!

  • Hi,

    If SPP_Data_Write returns a value less than what you are trying to write, that means the outgoing path is full and the application should wait to write until more buffers are available, as mentioned in the "CC256x MSP430 TI's Bluetooth Stack Basic SPPDemo APP Improving throughput v14" guide.
    Also there parameters that effects the throughput (TP), 1) ConfigParams, 2) BaudRate, 3) UART Buffer Sizes and 4)environment. It looks like you have only changed the ConfigParams?

    It looks to me like you are using BLE and not BT, right? If so please mind that the TP values mentioned in the Wiki are for BR/EDR and not for BLE.

    What is the Service pack (SP) you are using? could you please try using the latest SP version 1.1?
    Do you have any logs that you can share?
  • Hi,

    1) when SPP_Data_Write returns a value less than what I'm trying to write, i don't reveive any etPort_Buffer_Empty_Indication so i can't send other data to the Tablet.....

    2)I changed not only the ConfigParams but also UART buffer size like indicated in the previous post. I don't change the datarate because the application crash when i set an higher datarate (460800 bps or 921800 bps) probably due to an UART overrun.

    3)I'm quite sure that I'm using BT and not BLE because I'm using a function similar to the CBSend command that is used only in BR/EDR mode.
    How can I know if I'm usign BT or BLE? There is some command in the SPPLEDemo example?

    4) What is the service pack that you mentioned? i know only that I'm using Bluetopia v1.5R2.... How can i know the service pack version?????

    I attach a log of what happens: note that the data sampling & transmission starts when it is received an SPP_Open_Remote_Port event.

    the "?" character indicates when a UART overrun happens

    Thanks

    LOG:

    OpenStack().
    Bluetooth Stack ID: 1.
    Device Chipset: 4.1.
    BD_ADDR: 0xD03972CD834C

    ******************************************************************
    * Command Options: Server, Client, Help *
    ******************************************************************

    SPP+LE>

    ******************************************************************
    * Command Options General: Help, GetLocalAddress, SetBaudRate *
    * Quit, *
    * Command Options BR/EDR: Inquiry, DisplayInquiryList, Pair, *
    * EndPairing, PINCodeResponse, *
    * PassKeyResponse, *
    * UserConfirmationResponse, *
    * SetDiscoverabilityMode, *
    * SetConnectabilityMode, *
    * SetPairabilityMode, *
    * ChangeSimplePairingParameters, *
    * GetLocalName, SetLocalName, *
    * GetClassOfDevice, SetClassOfDevice, *
    * GetRemoteName, SniffMode, *
    * ExitSniffMode, Open, Close, Read, *
    * Write, GetConfigParams, *
    * SetConfigParams, GetQueueParams, *
    * DisplayRawModeData, AutomaticReadMode,*
    * SetQueueParams, Loopback, *
    * CBSend. *
    * Command Options GAPLE: SetDiscoverabilityMode, *
    * SetConnectabilityMode, *
    * SetPairabilityMode, *
    * ChangePairingParameters, *
    * AdvertiseLE, StartScanning, *
    * StopScanning, ConnectLE, *
    * DisconnectLE, PairLE, *
    * LEPasskeyResponse, *
    * QueryEncryptionMode, SetPasskey, *
    * DiscoverGAPS, GetLocalName, *
    * SetLocalName, GetLERemoteName, *
    * SetLocalAppearance, *
    * GetLocalAppearance, *
    * GetRemoteAppearance, *
    * Command Options SPPLE: DiscoverSPPLE, RegisterSPPLE, LESend, *
    * ConfigureSPPLE, LERead, Loopback, *
    * DisplayRawModeData, AutomaticReadMode *
    ******************************************************************

    SPP+LE>setconfigparams 329 987 2303
    SPP_Set_Configuration_Parameters(): Success
    MaximumFrameSize : 329 (0x149)
    TransmitBufferSize : 987 (0x3DB)
    ReceiveBufferSize : 2303 (0x8FF)

    SPP+LE>inquiry

    SPP+LE>
    Inquiry Entry: 0x1CAF05F7C4C4.

    SPP+LE>
    Result: 1,0x1CAF05F7C4C4.

    SPP+LE>open 1 5
    SPP_Open_Remote_Port success, Serial Port ID = 1.

    SPP+LE>
    SPP Open Confirmation, ID: 0x0001, Status 0x0000.

    SPP+LE>??Wrote: 219.

    after a period of time between few seconds to 2 or 3 minutes i receive "Wrote: 219." message and the application hangs up....

  • Hi,

    This is not the default demo, as the user interface does not look like this.

    anyway have you enabled the below patch in your code ? processors.wiki.ti.com/.../CC256x_MSP430_TI's_Bluetooth_Stack_Basic_Demo_APPS#CC256XB_Information

    If not, please do add it and see if there is a difference.

    If yes, you can get the latest SP from here processors.wiki.ti.com/.../CC256x_Downloads and convert it to array format and add it to your code as mentioned in the wiki

  • Hi,

    1)I confirm that this is the default demo....the different look is due to the copy & paste operation in this forum
    the only thing that i have been modified is to implement sampling from ADC12 every 500 us, organize a 256 byte packet and send it via bluetooth SPP. The sampling operation starts when I receive the SPP_Open_Remote_Port event after "open" command.

    2)I had already applied the patch that you mentioned.

    3)I just update the service pack but nothing change respect to the previous post.

    How can i solve this problem?

    Thanks!
  • Hi,

    Do you mean sampling operation is started after you get the "etPort_Open_Confirmation" ? If so could please share some logs (sniffer)