nRF54L15 - Button on P0.03

Hello,

I am having an issue using GPIO P0.03 as a button input in my design. Unfortunately, I did not notice that this pin is marked as a dedicated pin for the GRTC peripheral and it seems I may need to revise the routing for my button input to another GPIO. Before I do so, I would like to confirm that there is no possibility of using P0.03 as a regular GPIO pin.


After a little more research I see that the nrf54dk uses P0.04 as an input for a button, so I am not so sure about my dedicated pin theory since this is also marked as dedicated to grtc.

I am using the zephyr/samples/basic/button application to verify my buttons operation. The output of the program displays the correct pins for the button and LED but I get no response when the button is pressed. I’ve verified that the button does close to ground when pressed.

Button config:

buttons { compatible = "gpio-keys"; button0: button0 { gpios = <&gpio0 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; label = "User Button"; zephyr,code = <INPUT_KEY_0>; };


Thanks for the help,

Patrick

Parents
  • Hello,

    using GPIO P0.03 as a button input in my design

    So you have a custom board, but I guess you are still building for the nRF54L15 DK?

    If you look on the backside of the nRF54L15 DK, you will see some pins and their default use. The P0.03 is by default used for CTS0, which is one of the flow control pins for the UART used for logging. This means that if you build your application with logging over UART enabled (which it is by default), then this pin will be used by the UART. 

    Try to disable logging, or at least serial logging by adding:

    CONFIG_LOG=n (you may set this to y if you use RTT logging)

    CONFIG_SERIAL=n

    And see if that helps. 

    CTS is an input pin, which means that if you have started a debug session, the debugger may pull that pin low or high (don't remember whether it is default high or low). In that case, make sure to power cycle your DK, and don't start a UART terminal after it is powered back on, so that the debugger doesn't try to control the P0.03.

    Don't worry about the GRTC things. That is not enabled by default, so as long as you don't use it for UART, it should act as a normal GPIO.

    Best regards,

    Edvin

  • After trying your recommendations, I decided to assemble a second board and now have an operational button. Thank you for the assistance Edvin.

Reply Children
No Data
Related