Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9880 Discussions

UART Baudrate values for D2000

BMist2
Novice
998 Views

Hi,

I would like to know what are the value of QM_UART_CFG_BAUD_DL_PACK(0, 17, 6) for different Baudrate (i.e. 9600, 19200, 39400,57600 and 230400)?

/* UART configuration */

qm_uart_config_t cfg;

/* Set divisors to yield 115200bps baud rate. */

cfg.baud_divisor = QM_UART_CFG_BAUD_DL_PACK(0, 17, 6);

cfg.line_control = QM_UART_LC_8N1; /* 8 data bits, no parity, 1 stop bit */

cfg.hw_fc = false;

FYI, I have already read "Intel® Quark™ Microcontroller Software Interface 1.0" and "Quark D2000 datasheet: Document Number: 333577-002EN"

Thanks

0 Kudos
1 Reply
Michelle_C_Intel
Employee
129 Views

Hi ByteMaster

The baud rates for the UARTs are generated from the base frequency (Fbase) indicated in table below by programming the DLH and DLL registers as divisor. The

hexadecimal value of the divisor is (IER_DLH[7:0]<<8) | RBR_THR_DLL[7:0]. The output baud rate is equal to the base frequency divided by sixteen times the value of

the divisor, as follows: baud rate = (Fbase) / (16 * divisor). The UART also supports fractional dividers of 1/16 of the divisor by programming the DLF[3:0] register.

baud rate = (Fbase) / (16 * (divisor+(fdivisor/16))

So for example for Clock Frequency of 32Mz & Baudrate 9600 set QM_UART_CFG_BAUD_DL_PACK(0, 208, 5);

regards,

Michelle.

Reply