High speed UART experiences on internal oscillator?

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just curious what other's experiences are with higher speed UART rates on the Xmega's internal oscillator. How fast have you been able to go? I've been using 460,800 on a Xmega8E5 and its seems pretty stable using the following clock config:

    
OSC.CTRL |= OSC_RC32MEN_bm | OSC_RC32KEN_bm;
while(!(OSC.STATUS & OSC_RC32KRDY_bm));
while(!(OSC.STATUS & OSC_RC32MRDY_bm));
DFLLRC32M.CTRL = DFLL_ENABLE_bm;
CCP = CCP_IOREG_gc;
CLK.CTRL = CLK_SCLKSEL_RC32M_gc;
OSC.CTRL &= ~OSC_RC2MEN_bm;
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It depends on a lot of factors.

How tolerant is the other device? The spec says a 2% variation in baud rate is acceptable, but some devices are better/worse than that.

How stable is the XMEGA clock? Even with DFLL it varies based on temperature.

Once you start getting up to higher baud rates you need to start looking at high speed layout and design for your circuit. In particular look at terminating lines and slew rate limiting. With proper termination I was able to get 1M baud over a 3m USB cable using two USARTs on an E5 (i.e. talking to itself) reliably, but that has little to do with the clock rate. I'm just saying that above 500k baud these things could be limiting you.