Hello Team,
I am using the nrf54l15 custom board for development. I have configured the P1.06 as a normal GPIO as follows:
/ {
gpio_keys {
compatible = "gpio-leds";
ai1: ai1 {
gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH)>;
label = "AI1";
};
};
};
And using it as follows:
#define AI_NODE DT_NODELABEL(ai1)
static struct gpio_dt_spec ai_pin = GPIO_DT_SPEC_GET(AI_NODE, gpios);
ret = gpio_pin_configure_dt(&ai_pin, GPIO_OUTPUT);
uint8_t st;
void main(void)
{
while(1)
{
gpio_pin_set_dt(&ai_pin, 1);
k_sleep(K_SECONDS(1));
st = gpio_pin_get_dt(&ai_pin);
printf("TOGGLE,%d\r\n",st);
gpio_pin_set_dt(&ai_pin, 0);
k_sleep(K_SECONDS(1));
st = gpio_pin_get_dt(&ai_pin);
printf("TOGGLE,%d\r\n",st);
}
}
The pin status is always read as 0. I have also checked on the oscilloscope, and the pin always stays low.
I have added the following settings to the proj.conf file
CONFIG_BUILD_WITH_TFM=y CONFIG_TRUSTED_EXECUTION_NONSECURE=y
Am I missing any settings to configure P1.06 as a normal GPIO? Any help would be appreciated.
Thank you,
Payal