Pin State during Reboot

Hello, on my nrf54l10 I observed a pin (GPIO 1.03) being actively driven low for ~20 ms during a reboot (e.g. Resetting after SystemOff Mode). I need this pin to stay high during this time. I already use an external pull-up which I thought should be sufficient as the pin should be at a high impedance state during startup. However, even with the pull-up connected I can cleary see the pin being driven low. Any Ideas what the root cause could be and how to avoid this?

I usually use this pin as a pwm but even when not actively configuring it, it goes down during start-up. 

Thank you,

Vito

Parents
  • Hi Vito,

    Please note that P1.02, P1.03 are NFC pins and there are extra rules that apply to them, please have a look at below link to see if that explains the behavior:
    https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/nfct.html#ariaid-title4

    Also please check the general behavior of GPIOs when REST pin is asserted:
    GPIO — General purpose input/output

    Best regards,
    Ressa

  • I see the same behavior also for pin 2.05 and 2.06 (I did not check all the pins, yet). The data sheet sais that the pins should retain their state or switch to high impedance during reset, but I definitely see them set LOW for a short time during start up.

  • I think I found the reason. I am using CONFIG_PWM and CONFIG_LED in my proj.conf and they seem to create these default low values at startup. I also saw this in my blinky sample for the pins used as LED or PWM (defined in my overlay).

    However, I think I need at least CONFIG_PWM as I want to use pwm in my project. Maybe this helps to reproduce the issue and show me a way to avoid it.

  • Were you able to reproduce the situation with the information provided above? Do you have an idea how to avoid it? Otherwise we need to add an additional transistor to block the signal.

  • Can you try to reproduce it on a DK with the config options that you think is causing the issue, so that I can test it here on my DK ? 

  • Okay, I did a minimal sample which runs on a nrf54l15dk based on the standard zephyr blinky sample. Attached I have my .overlay File, my Proj.conf and my main.c file. Basically I just add a PWM to pin 1.8. I added an external pull-up to pin 1.8, so that it is high if the board does nothing. Now, when I start the program I can see that the pin is pulled low for about 10 ms before the pwm starts. If I a do not add any pwm configuration at all in my main.c function pin 1.8 is even constantly pulled low.

    /*
     * Copyright (c) 2016 Intel Corporation
     *
     * SPDX-License-Identifier: Apache-2.0
     */
    
    #include <stdio.h>
    #include <zephyr/kernel.h>
    #include <zephyr/drivers/gpio.h>
    
    #include <zephyr/drivers/pwm.h>
    
    /* 1000 msec = 1 sec */
    #define SLEEP_TIME_MS   1000
    
    /* The devicetree node identifier for the "led0" alias. */
    #define LED0_NODE DT_ALIAS(led0)
    
    /*
     * A build error on this line means your board is unsupported.
     * See the sample documentation for information on how to fix this.
     */
    static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
    
    static const struct pwm_dt_spec pwm_Nacht_LED1 =	PWM_DT_SPEC_GET(DT_ALIAS(pwm_nacht_led1));
    
    int main(void)
    {
    
    	if (!pwm_is_ready_dt(&pwm_Nacht_LED1)) 	{	printk("Error: PWM device (Nacht LED1) %s is not ready\n", pwm_Nacht_LED1.dev->name); }
    	else									{	if (pwm_set_pulse_dt(&pwm_Nacht_LED1, 10000U))  printk("Error pwm_Nacht_LED1: failed to set pulse width\n"); }
    
    	int ret;
    	bool led_state = true;
    
    	if (!gpio_is_ready_dt(&led)) {
    		return 0;
    	}
    
    	ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
    	if (ret < 0) {
    		return 0;
    	}
    
    	while (1) {
    		ret = gpio_pin_toggle_dt(&led);
    		if (ret < 0) {
    			return 0;
    		}
    
    		led_state = !led_state;
    		printf("LED state: %s\n", led_state ? "ON" : "OFF");
    		k_msleep(SLEEP_TIME_MS);
    	}
    	return 0;
    }
    

    nrf54l15dk_nrf54l10_cpuapp.overlay322387.prj.conf

  • Hello, I found a solution. If I add "nordic,invert" to my pincrtl definition the default state gets high. 

Reply Children
No Data
Related