Reply
Posts: 3
Registered: ‎08-24-2017
Accepted Solution

LEUART RX at 9600 Baud bit errors

On 9 out of ~35  EFM32GG390 Chips the data available via the LEUART contains in over 90% of the received bytes invalid data. I already made sure to check if the signal on the pin is valid using an oscilloscope and the uart of a devkit.

I managed to read the data correctly by writing a uart rx software module using the TIMER module and trigger the startbit using an interrupt on the falling edge.

 

Used clock: LFRCO at 32768 Hz

Baud: 9600

Databits: 8

Stopbit: 1

parity: none

 

Actual received as Hex:

24 47 4E 15 45 C5 82 31 2C 8A 62 30 31 A9 BD C9 65 20 17 2B B9 20 4C 82 20 66 72 58 AB 81 65 2E AE 4B CD B1 20 55 50 2A 15 92 61 20 57 CD 81 64 1A AE 89 6C 19 96 E9 82 0D 21 D2 39 52 53 28 89 C9 C5 62 2C 89 62 62 2C 89 72 A9 34 54 48 24 94 CA 45 75 F1 2C 2C 89 89 62 2C C9 4A 92 45 43 21 D2 39 1D 07 50 C9 62 62 2C 09 22 30 62 39 4E 29 CA 2C 89 22 2C 49 A9 B2 0D 21 D2 39 47 AA B1 01 29 62 2C 2C 89 89 22 2C 89 89 22 2C 0E 72 CA 39 29 CA 72 39 4E 29 CA 2E 4E 52 92 45 43 21 D2 39 1D 53 50 29 B1 31 89 89 62 2C 89 22 2C 89 89 62 39 4E 29 CA 2C 4E 72 CA 39 29 CA 72 39 4E 25 2A 35 0A 24 14 75 4D 56 29 62 8A 2C 30 52 BA 39 0D 21 D2 14 EA 4D 59 2C 31 29 62 30 30 25 53 53 48 24 94 EA 31 31 B1 2C 2C 89 89 C9 C5 72 A9 37 50 48 F8

Should like as Hex:

24 47 4E 52 4D 43 2C 2C 56 2C 2C 2C 2C 2C 2C 2C 2C 2C 2C 4E 2A 34 44 0D 0A 24 47 4E 56 54 47 2C 2C 2C 2C 2C 2C 2C 2C 2C 4E 2A 32 45 0D 0A 24 47 4E 47 47 41 2C 2C 2C 2C 2C 2C 30 2C 30 30 2C 39 39 2E 39 39 2C 2C 2C 2C 2C 2C 2A 35 36 0D 0A 24 47 4E 47 53 41 2C 41 2C 31 2C 2C 2C 2C 2C 2C 2C 2C 2C 2C 2C 2C 2C 39 39 2E 39 39 2C 39 39 2E 39 39 2C 39 39 2E 39 39 2A 32 45 0D 0A 24 47 4E 47 53 41 2C 41 2C 31 2C 2C 2C 2C 2C 2C 2C 2C 2C 2C 2C 2C 2C 39 39 2E 39 39 2C 39 39 2E 39 39 2C 39 39 2E 39 39 2A 32 45 0D 0A 24 47 50 47 53 56 2C 31 2C 31 2C 30 30 2A 37 39 0D 0A 24 47 4C 47 53 56 2C 31 2C 31 2C 30 30 2A 36 35 0D 0A 24 47 4E 47 4C 4C 2C 2C 2C 2C 2C 2C 56 2C 4E 2A 37 41 0D 0A

 

Posts: 75
Registered: ‎09-03-2015

Re: LEUART RX at 9600 Baud bit errors

Hi @pagdot

 

In order to test this further you could try to check the actual frequency of the LFRCO by sending the LFRCO out on a pin and measuring it with an oscilloscope.

 

You could also repeate the test by using other oscillators like LFXO or HFCORECLKLEDIV2 to see if there is something with the LFRCO accuracy which is triggering the test failures.

Highlighted
Posts: 3,100
Registered: ‎02-07-2002

Re: LEUART RX at 9600 Baud bit errors

[ Edited ]

I'd start by reading the datasheet and check the LFRCO accuracy. You will probably find that it reacts substantially on temperature and heavily on supply voltage.

 

Is it stable enough to give a maximum error of 2.5% as a UART requires for proper operation?

Posts: 561
Registered: ‎09-18-2015

Re: LEUART RX at 9600 Baud bit errors

Hi @pagdot,

 

I'd start by reading the datasheet and check the LFRCO accuracy. You will probably find that it reacts substantially on temperature and heavily on supply voltage.

 

@vanmierlo is 100% correct. While we do not provide a voltage/temperature coefficient for the LFRCO, it is highly sensitive to temperature and voltage.

 

Just looking at the typical frequency should be enough to confirm that the frequency tolerance just isn't there for use as a UART clock:

 

lfrco.png

 

That's about ±4.5% at room temperature. Have you calibrated the LFRCO against a more accurate oscillator like the HFXO? That would get you better performance, but you'd also have to perform periodic recalibration to account for temperature or voltage changes.

 

John

Posts: 3
Registered: ‎08-24-2017

Re: LEUART RX at 9600 Baud bit errors

Thanks for your response

I measured the LFRCO frequency.

It is 32.35 - 32.45 Hz, which should be precise enough to read the UART at 9600 baud

Posts: 3
Registered: ‎08-24-2017

Re: LEUART RX at 9600 Baud bit errors

I calibrated it and it works now. Thanks for the help of all of you

Posts: 3,100
Registered: ‎02-07-2002

Re: LEUART RX at 9600 Baud bit errors


JohnB wrote:

While we do not provide a voltage/temperature coefficient for the LFRCO, it is highly sensitive to temperature and voltage.

 


The EFM32GG390 datasheet has them in Figure 3.10. Calibrated LFRCO Frequency vs Temperature and Supply Voltage. So though they are not provided in a table as a single number, they sure are there.

Posts: 561
Registered: ‎09-18-2015

Re: LEUART RX at 9600 Baud bit errors

Hi @vanmierlo,

 

The EFM32GG390 datasheet has them in Figure 3.10. Calibrated LFRCO Frequency vs Temperature and Supply Voltage. So though they are not provided in a table as a single number, they sure are there.

 

That's what I get by having Acrobat Reader default to zoom to page width. I didn't even see the curves when I snapped the frequency spec Smiley Embarassed

 

John