In general, what is the serial port baud rate variation range of Bluetooth?

When using AT command to send data, the baud rate is set to 9600, and the two modules are connected at different temperatures, and the data is sent through the serial debugging assistant, and the other serial debugging assistant window is observed to confirm whether the communication is normal or not, and the logic analyzer is used to collect the baud rate of TX at the same time. Our questions are:

1. In general, what is the  serial port baud rate variation range of Bluetooth?

2.What is the maximum range of variation?

3.What would be the factors when there is a change in baud rate? (such as temperature, etc.?)

Here are our test data:

Parents
  • Hello,

    Based on the variation you are observing I assume you are using HFINT as your HF clock source. This oscillator has a fairly low frequency tolerance to begin with. It will also have some variation across temperature and from chip to chip. The crystal oscillator is more accurate and stable (HFXO).

    You can make the baudrate generator use the HFXO by starting it at the beginning of main() like this:

    void main(void)
    {
    	NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
    	NRF_CLOCK->TASKS_HFCLKSTART = 1;
    	while(NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);
    	...

    Best regards,

    Vidar

Reply
  • Hello,

    Based on the variation you are observing I assume you are using HFINT as your HF clock source. This oscillator has a fairly low frequency tolerance to begin with. It will also have some variation across temperature and from chip to chip. The crystal oscillator is more accurate and stable (HFXO).

    You can make the baudrate generator use the HFXO by starting it at the beginning of main() like this:

    void main(void)
    {
    	NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
    	NRF_CLOCK->TASKS_HFCLKSTART = 1;
    	while(NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);
    	...

    Best regards,

    Vidar

Children
Related