Receive only UART2? Freeing up PA2!

Hey Dat,
On a SC13048Q …

Can I open UART2 in receive-only mode?
Thereby freeing up pin 12 (PA2) to use as a GPIO/wake-up pin?

I see that I can implement my own UartController, but not sure how to do that.

Don

I like how you are pushing the system to the limits. You are using some real advanced features! I want to see what your area making if you can share. If not here, send an email please.

Hey Gus,
Nice to meet you !
I’ll send an email to support@ghielectronics.com
Don

Hi, I think yes, there are few ways:

  1. Open UART2 as normal and no need to do anything. Just call Shutdown. In native firmware, we switch PA2 to wakeup mode automatically, and don’t care what current mode is. This is simple way and should work. Of course you shoud not connect this RX pin to TX pin of other device. Any noise will wake the device up. Just connect this pin to wakeup source only and recommend external pull down.

  2. You can open UART2 as normal, using marshal to update the gpio register, change PA2 alternat function.

  3. You can open UART2 as normal, use GPIO low level to change this pin:

General Purpose Input Output (GPIO) (ghielectronics.com)

To me, 1) is the best, easy and should work.

Well … how about that !
Nice solution.