Dear,
I am trying to manually toggle GPIO0_2 by writing into the GPIO register, 0x50842504[bit 2]. The output of GPIO0_2 was always static in either high or low.
If I used to toggle GPIO0_7 with the same GPIO configuration shown below, I was successfully able to control the bit.
With the test code below, I saw clearly that 0x50842504 value was changed between 0x190000 and 0x190004, which [bit 2] representing for GPIO0_2 was changed. However, when I probed the GPIO0_2 pin with a logic analyzer, the signal was always static.
Other GPIOs worked well but only GPIO0_2 was not toggled.
Why is GPIO0_2 so different than other GPIOs? Did I miss in GPIO register configuration below?
< Environment >
OS : Zephyr 2.5
H/W : Customized PCBA with nRF5340
< Test Code to toggle >
while(1)
{
gpio_pin_set(ctx->gpio_reset, pin_num, 0);
printk("0x50842504 = %x\n", *(volatile uint32_t *)0x50842504);
k_msleep(5);
gpio_pin_set(ctx->gpio_reset, pin_num, 1);
printk("0x50842504 = %x\n", *(volatile uint32_t *)0x50842504);
k_msleep(5);
}
< GPIO Reigster setup before toggling GPIO0_2 >
00> 0x50842500 = 0
00> 0x50842504 = 190004
00> 0x50842508 = 190004
00> 0x5084250C = 190004
00> 0x50842510 = 314c00
00> 0x50842514 = c1900d4
00> 0x50842518 = c1900d4
00> 0x5084251C = c1900d4
00> 0x50842520 = 0
00> 0x50842524 = 0
00> 0x50842528 = 0
00> 0x50842700 = 30000002
00> 0x50842704 = 30000002
00> 0x50842708 = f
00> 0x5084270C = 2
00> 0x5084271C = 3
00> 0x50842720 = 2
Thank you for any comments or ideas in advance!!.
Thanks.