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.

WL1837MOD: How should I do for modifing the baud rate of uart between wl1837mod and am3352?

Part Number: WL1837MOD
Other Parts Discussed in Thread: AM3352, WL1837

Dear

The hardware scheme we currently use is am3352 + wl1837mod, when I start bluetooth, the information is displayed as following:

★This prompt means baud rate = 3000000, right??

-------------------------------------------------------------------------------------

root@vmax:~# bb-wl18xx-bluetooth
Found a Texas Instruments' chip!
Firmware file : /lib/firmware/ti-connectivity/TIInit_11.8.32.bts
Loaded BTS script version 1
texas: changing baud rate to 3000000, flow control to 1
Device setup complete

-------------------------------------------------------------------------------------

★If it is right, the return value of stty as following is "speed 0"??

-------------------------------------------------------------------------------------

root@vmax:~# stty -a -F /dev/ttyS1
speed 0 baud;stty: /dev/ttyS1
line = 15;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

-------------------------------------------------------------------------------------

★Now I want to modify the baud rate of UART connecting Bluetooth communication between am3352 and wl1837mod. What should I do?

Thanks

  • Hi Yunxue,

    It looks like you are already modifying the UART baud rate to be 3 Mbps. By default, our WL1837MOD uses 115.2 Kbps when first communicating with the host. 

    The following solution assumes you are using BluetopiaPM: You can modify the UART baud rate by changing the TargetHCIDriverInformation.DriverInformation.COMMDriverInformation.BaudRate variable in the HCI_VS_InitializeAfterHCIReset() found in BTPSVEND.c. 

    The max Bluetooth UART baud rate on WL1837MOD is 4 Mbps. 

    Best,
    Jacob

  • Hi Jacob

    Thanks for your reply, I am confirming how to modify the baud rate through BlueopiaPM.

    In addition, I have another question. Our current Bluetooth environment is PC Left right arrow wl1837mod Left right arrow Am3352,

    wl1837mod and am3352 are linked via UART. I observed tx pin of wl1837mod with oscilloscope, I found that the interval between two consecutive packets of data is about 90ms, and the waveform is as follows:

    ★★I want to know whether the 90ms interval between two consecutive packets of data is internally configurable in wl1837mod, or is it caused by the PC sending it to wl1837mod?

    Thanks

  • What type of data are you sending in this instance? If you increase the UART baudrate from the WL1837MOD, I would expect that you see the interval change from the default.

    Do you notice a change in the interval after updating the baudrate?

    Best,
    Jacob

  • Hi Jacob

    Thanks for your reply.

    >What type of data are you sending in this instance?

    The PC side continuously sends file of data to wl1837. We have a file on the PC side. We want to send it to wl1837 through PC, and then transfer it to am3352 through UART.

    I don't know whether my expression is accurate. The concept of "what type of data" may be more accurate if you can give me several categories.

    >Do you notice a change in the interval after updating the baudrate?

    I am learning baudrate modified environment. It has not been modified successfully.

    ★★ I'm curious. Is this time interval achieved by modifying the internal configuration of wl1837 through messages when the host and wl1837 establish a connection? There is also a default configuration inside wl1837, which directly controls the time interval of communication data packets.

    Thanks

  • Hi Yunxue, 

    I realize my "what type of data" question did not make sense. I was curious what you were trying to accomplish when communicating between the WL1837 and AM3352. 

    Can you clarify what type of connections you have between these devices: PC <---> wl1837mod <---> Am3352? Are you using UART as the interface between all these devices, or is one of these connections Bluetooth? Communication between the WL1837MOD and AM3352 must be in the HCI format. 

    Best,
    Jacob

  • Hi Jacob

    Thanks for your reply.

    >PC <---> wl1837mod <---> Am3352? Are you using UART as the interface between all these devices, or is one of these connections Bluetooth?

    PC <---> wl1837mod : connect by Bluetooth

     wl1837mod <---> Am3352: HCI format(The physical link is UART)

    >Communication between the WL1837MOD and AM3352 must be in the HCI format. 

    Yes,  Now is HCI format.

    Best

    Yunxue Wang

  • Hi Yunxue,

    ★★I want to know whether the 90ms interval between two consecutive packets of data is internally configurable in wl1837mod, or is it caused by the PC sending it to wl1837mod?

    I believe this is caused by the PC sending it to the WL1837MOD. If you have another Bluetooth device capable of sending information, you can try measuring the time interval between data transmission again for comparison.

    ★★ I'm curious. Is this time interval achieved by modifying the internal configuration of wl1837 through messages when the host and wl1837 establish a connection? There is also a default configuration inside wl1837, which directly controls the time interval of communication data packets.

    The time interval is dependent upon the packet type established during connection. It is also dependent on the baud rate. 

    It sounds like you are using the Serial Port Profile (SPP) to send a file from the PC to the WL1837MOD via Bluetooth. Improving the SPP data rate is not straightforward as it depends on multiple factors including MTU size, negotiated packet over-the-air packet type, and UART buffer size. You can find some more information here

    For some realistic SPP data rates, please see this document: CC256x MSP430 TI's Bluetooth Stack Basic SPPDemo APP Improving throughput v14 - Texas Instruments Wiki.pdf

    Thanks,
    Jacob