Hi,
We are using nRF52832,want to configure non standard baud rate 5787 as per our client request,
Is there formula to calculate the error and reg values please advice.
Thanks,
Venkatesan
Hi,
We are using nRF52832,want to configure non standard baud rate 5787 as per our client request,
Is there formula to calculate the error and reg values please advice.
Thanks,
Venkatesan
Hi,
You can find a simplified formula in this thread (link). Note that you need to account for clock source accuracy (HFINT vs HFXO) in addition to any division error on the baudrate generator. I'd suggest that you use a logic analyzer or oscilloscope to measure the actual baudrate.
As per the provided thread
The formula is: Baudrate = desired baudrate * 2^32 / 16000000
=5787*4294967296/16000000
=5787*268.435456
= 1553435.983872
Baudrate of 5787 should then be 15534356 decimal =0x ED0914
then how to roundoff the value??for proceed further??Please help
Try 0x17B000
Thank u for the immediate response.
can i know how did u get this value??
Also how about the error rate % ??
It was from some simulation values I had, but not sure what the division error is unfortunately. That is why wanted you to verify the baudrate by sampling the output signal and tune the baudrate register accordingly. Remember to start the HF crystal before measuring.
EDIT: It looks like the actual baudrate will become 5785 when you set the register to 0x17B000. I.e. a division error of ~0.04% percent. But please verify.
It was from some simulation values I had, but not sure what the division error is unfortunately. That is why wanted you to verify the baudrate by sampling the output signal and tune the baudrate register accordingly. Remember to start the HF crystal before measuring.
EDIT: It looks like the actual baudrate will become 5785 when you set the register to 0x17B000. I.e. a division error of ~0.04% percent. But please verify.
yea will try that.
Is there any tool to calculate the error??
Not that I'm aware of. You need to measure the pulse width/time period when data is transmitted to determine the actual baudrate.