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 Reply Children
  • 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. 

Related