nrf54l15 : How to Configure the same pin as UART RX and GPIO at the same time.

Hello, 

I want to Configure a UART RX pin as GPIO and use it as a Wake - up interrupt pin before going to sleep. Is this possible in nrf54l15? 

I tried to do so, but I was unable to wake up from sleep through this pin.  
I am also getting this warning in the dts file, but no build error : 

Pin 2 of &gpio2 already assigned to &uart00 • RX

CT100_v2_nrf54l15_cpuapp.dts(226, 14): Overlapping assignment
CT100_v2_nrf54l15_cpuapp.dts(227, 14): Overlapping assignment
I wanted to know how to do this configuration?
Parents Reply Children
  • Suspending the UART peripheral (using pm_device_action_run(cons1, PM_DEVICE_ACTION_SUSPEND)) will disable the UART hardware, but it does not automatically reconfigure the pin as a GPIO. After suspending the UART, you would need to explicitly reconfigure the pin as a GPIO in your application code to use it for wakeup via SENSE or GPIOTE. Only then can you use the pin as a wakeup source. After wakeup, if you need UART again, reconfigure the pin back to UART RX and resume the UART peripheral.

  • Hello,

    I tried the same, by configuring the Pin as GPIO interrupt after configuring suspending the pin as UART. But I was still not able to use it as a wake up interrupt. 

    Pin 2 of &gpio2 already assigned to &uart00

    After going through the data sheet, I came across the point that Port 2 pins cannot be used as GPIO interrupt pins for wake up. Can this be the reason, or is there any other method to achieve this configuration?

  • You are right Varsha, sorry for missing that.

    P2 is high speed port and does not have pin sense mechanism without which wakeup conditions cannot be detected.

    If you must keep RX on P2, best is to stay in System ON idle and let the UARTE interrupt wake the CPU, or mirror the signal to a P0 or P1 pad for wake purposes. if you want SystemOff, then use another port for wakeup source.

Related