Dears, what is the minimum baud rate of nrf52832? Can I achieve 1200 or 600 bps? if so, how this can be set up?
Dears, what is the minimum baud rate of nrf52832? Can I achieve 1200 or 600 bps? if so, how this can be set up?
I disagree; many baud rates are possible, try playing with this:
// Baudrate generator for the UART is the top 20 bits of a 32-bit field; add in rounding 0.5 ls bit uint32_t RequiredBaudRate = 600; // whatever .. uint32_t CalculatedRegisterValue; uint64_t SystemClock = 16000000ULL; // Typically 16MHz uint64_t MagicScaler = 32; // Preserves bits on divisions, shift 32 bits CalculatedRegisterValue = (uint32_t)(((((uint64_t)RequiredBaudRate << MagicScaler) + (SystemClock>>1)) / SystemClock) + 0x800) & 0xFFFFF000;
Did you know that with a screened twisted-pair cable using RS485 (easy on nRF52) it is possible to transmit a distance of 4 miles at 1200 baud or less? Don't ask, once I had to do just that ...
Hello, may I ask where you saw this calculation method? I couldn't find any relevant information in the data sheet of nRF52832.
There is no documented information as far as I am aware; I deduced the calculation from hands-on testing of the hardware. The implication is that this is not an official Nordic-supported feature; it works though.
Edit: iosonata by Hoang Nguyen has some further information on testing the calculation here: iosonata - uart_nrfx.cpp