case about nRF54L15 NFC PIN P1.02 & PWM

Hi,

1. Does the P1.02 (NFC port) on the nRF54L15 support PWM?
2. If it does, please provide the overlay configuration method and sample code.

Best regards,

Peter.Min

Parents
  • Hi,

    Yes, P1.02 can be used for PWM on nRF54L15 but only after you disable the NFC function and turn it into a normal GPIO. P1.02 is on port 1 and by default P1.02/P1.03 are NFC pins, so it won’t behave like normal GPIO (and therefore can’t output PWM) until NFC is disabled.

    On nRF54L15, NFC pins can be changed to GPIO via UICR by adding following configuration in the overlay: 

    /* Make NFC pins behave as GPIOs */
    &uicr {
    	nfct-pins-as-gpios;
    };

    Then you can assign P1.02 to any PWM channel in the overlay and make sure you enable it in prj.conf aswell through CONFIG_PWM=y. If you want a complete PWM sample code, you can check the following exercise and adapt to P1.02:

    PWM servo example

    Kind Regards,
    Syed Maysum

Reply
  • Hi,

    Yes, P1.02 can be used for PWM on nRF54L15 but only after you disable the NFC function and turn it into a normal GPIO. P1.02 is on port 1 and by default P1.02/P1.03 are NFC pins, so it won’t behave like normal GPIO (and therefore can’t output PWM) until NFC is disabled.

    On nRF54L15, NFC pins can be changed to GPIO via UICR by adding following configuration in the overlay: 

    /* Make NFC pins behave as GPIOs */
    &uicr {
    	nfct-pins-as-gpios;
    };

    Then you can assign P1.02 to any PWM channel in the overlay and make sure you enable it in prj.conf aswell through CONFIG_PWM=y. If you want a complete PWM sample code, you can check the following exercise and adapt to P1.02:

    PWM servo example

    Kind Regards,
    Syed Maysum

Children
No Data
Related