Hello,
I'm stuck in developing an application with MSP430F5438A and PAN1326 that should be able to transmit around 150kbit/s as said to be possible in the sticky here in the forum.
Here is my configuration:
HCI: tried both 460800 and 921600
UART speed where data come from: 921600
Set both RFCOMM and HCI Buffers as suggested in Sticky
What I tried (application is based on SPPLEDemo):
- The ProcessCharacters Function, called from the scheduler every 5ms (at least it should be like that), reads 1 byte from UART (HAL_ConsoleRead) and immediately calls SPP_Data_Write with this single byte. However, this fails very quickly but if I respect this, exit the ProcessCharacters Function and wait for the buffer empty Event, this Event never happens. If I write 4 bytes and more in one call, the Event gets issued but also then I have the feeling that the outgoing SPP/BT path gets flooded.
- Remove both ProcessCharacters and IdleFunction from scheduler and enter a while(1) loop that reads 1 byte from UART, and then does something like do {_NOP() } while(SPP_not_sent). However, this try ended in the whole application being stuck, sometimes I received a few bytes before nothing but the UART Rx interrupt was running anymore.
How do I have to write my code in order to maximize throughput? Can SS1 provide an example, test setup etc. how they reached their nice datarates in the sticky?
Also I'm not sure about the Baudrate/Configuration of the SPP server port on the MSP; the SPP communication works but I don't have a clue how I can set those parameters, when connecting to a PC with putty I can enter a Baudrate but I'm not sure if this becomes effective. I never get the etPort_Query_Port_Information_Indication event and when I try to set the port parameters via SPP_Send_Port_Information after the port has been opened I get an error "Feature not supported".
Thank you in advance