This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Uart baudrate is inaccurate

Hello

The Uart Baudrate is initiliazed at 115200 baud but i the  BLE nRF52833 is sending with  about 115900.

I try to switch to hf clock but the baudrate is to high.

    // Request and wait for it to be ready.
    err_code = sd_clock_hfclk_request();
    APP_ERROR_CHECK(err_code);

    uint32_t hfclk_is_running = 0;

    while (!hfclk_is_running)
    {
        APP_ERROR_CHECK(sd_clock_hfclk_is_running(&hfclk_is_running) );
    }    

Parents Reply Children
  • Hi Ralf,

    You are working on a custom board right? And are you seing this error on all boards or just one?

    In my previous answer I ment the carrier frequency accuracy. We measure the crystal accuracy by setting up a single TX carrier on the radio to then verify if the TX carrier is outside the accepted range. This is explained in the RF performance test and guidelines whitepaper. If working on a custom board you need to check the frequency accuracy and tune the crystal capacitors values accordingly.

    If the TX carrier frequency is outside of the accepted window there are two issues you should check:

    • Crystal accuracy specification.
    • Crystal load.

    So check the datasheet of the crystal you are using, check that it complies with the crystal specifications available in the nRF52833 product specification. Then check the crystals' load capacitance (CL) in the crystal datasheet. The load capacitance should be choose accordingly to this value and the formula:

    C1 = C2 = 2CL - C_pcb - C_pin

    Cl: Load capacitance of the crystal (found in the crystal datasheet)

    C_pcb + C_pin is approximately 4 pF.


    But these values should be adjusted depending on what you see on the scope when measuring the frequency accuracy.

    Let me know if my assumptions are perhaps incorrect. If you are for example testing on a nRF52833 DK the problem will not be on the hardware but probably on the software side...

    Best regards,

    Marjeris

Related