I have a application using ATXMEGA32A4U-MH that is using internal 2MHz oscillator with PLL x 4 (8MHz controller speed) and USART connected to a serial Modbus.
The problem is as follows:
When temperature is below -20 deg. Celsius the 2M oscillator is so much off that when the board sends its replay on serial bus, a get bit synchronization issue since I uses the "USART empty" interrupt and then all bytes (up to about 40 bytes) sent have no space between. The receiver then fails after an unknown number of bytes received since the timing fault on the frozen board adds up for each char.
So I need a simple way to add a delay equal to maybe 1.2 char or so. I can use a timer to send chars with space between, but maybe there are some more easy way to do this, possibly something built into USART ? I believe this is a problem many have experienced. Any tip is welcome :)
Have a nice coding day :)