Reply
Posts: 13
Registered: ‎10-31-2013

Using PRS on EFM32GG to route GPIO input to UART RX input

Hi,

 

I am reusing a PCB card with EFM32GG on it and I have a GPIO input on which I will send UART data coming from a PC UART TX source.

I am using this GPIO instead of an integrated EFM32 UART RX pin because I don't have other alternative.

 

If I had basic microcontroller I would need to use GPIO as input here to sample it and write a SW UART receiver to decode the bytes PC sent over a basic UART wire .... but maybe we could be smarter with an EFM32  ...

 

So I read the PRS examples and PRS chapter in  EFM32GG spec.

 

It seems we can connect any of the GPIO x input to one of PRS channels as a "producer" and then use the selected PRS channel to UART RX line as "consumer", in level mode (not edge detection mode)

 

So my question is :

==> Is it really possible to use this PRS configuration and then use the connected LEUART RX to operate in a real UART receiver using connection from GPIO x input ?

Thanks to PRS connection, the goal for me is to avoid writing a SW UART receiver ....

 

So to sum up what would be my PRS config for this scenario with LEUART0:

============================================================

PRS0 channel for example, EDSEL=0 (level mode),

                                             SOURCESEL = GPIOL

                                             SIGSEL = GPIOPIN5 (for PC 5 used as GPIO input in my case),

Then in GPIO regs, enable INSENSE PRS and in EXTIPSELL register, EXTIPSEL5 programmed on PORT C 5

Then in LEUART0 config, I program to use PRS RX input on PRS CH0 as LEUART RX input

 

 

Posts: 240
Registered: ‎08-16-2012

Re: Using PRS on EFM32GG to route GPIO input to UART RX input

Hi,

 

It is possible and your summary is correct.

 

Best regards,

Amen Leung

 

My views are my own and do not necessarily represent the views of Silicon Labs
Highlighted
Posts: 13
Registered: ‎10-31-2013

Re: Using PRS on EFM32GG to route GPIO input to UART RX input

Hi,

 

Thanks for confirmation, hence I will have a try ...

 

Regards

David