1 Reply Latest reply on Mar 1, 2016 2:25 AM by MichelleC_Intel

    UART Baudrate values for D2000

    ByteMaster

      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

        • 1. Re: UART Baudrate values for D2000
          MichelleC_Intel

          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.

          baud rate.png

          1 of 1 people found this helpful