nRF52832 Product Specification V1.4, page 344 lists predefined baud rates only.
Is it possible to use other values for custom baud rate, and if so, what is the relationship between the Value and the actual generated baud rate?
nRF52832 Product Specification V1.4, page 344 lists predefined baud rates only.
Is it possible to use other values for custom baud rate, and if so, what is the relationship between the Value and the actual generated baud rate?
Hi hmolesworth,
Thank you so much!
The equation :
CalculatedRegisterValue = (uint32_t)((((uint64_t)RequiredBaudRate << MagicScaler) + (SystemClock>>1) / SystemClock) + 0x800) & 0xFFFFF000;
should be modified as following in my SES IDE :
CalculatedRegisterValue = (uint32_t)(( ( ((uint64_t)RequiredBaudRate << MagicScaler) + (SystemClock>>1) )/ SystemClock) + 0x800) & 0xFFFFF000;
Good catch!
FYI: We've finished some loopback test, when buadrate is set to 2Mbps, no data can be received and no events can be triggered, however when baudrate is set to 2.5Mbps, some events can be triggered according to TX data, maybe we can use it to build a special full-duplex system.
I tested Tx up to a tad less than 8MHz (7.99999MHz) and Tx works fine, but the Rx probably uses /16 or /3 for voting on high/low for each bit; I posted the baud rates I tested on Tx here some years ago framing-error-and-noisy-data-when-using-uarte-at-high-baud-rate
Might be worth us doing a loopback test at all baud rates, maybe run overnight ..
We've finished more loopback tests. It shows 2.5Mbps with RX buffer length=1(>1 can't) can work well, 1.5Mbps(1.6Mbps can't) with RX buffer length=64(>64 should OK too) can work well. We guest there is some unknown factor causing the strange results. For our application, 2.5Mbps with RX buffer length=1 is OK. Thank you for your great contribution!