sdk 17.0.2
IDE - segger embedded studio
For the below given code, "pin" is not updating when GPIO goes high when optimization level is kept "Level 3 for more speed". upto "level 2" , "pin" is updating properly.
Could you please let me know why the update is not happening for Level3 optimization ? I added "volatile" qualifier for variable "pin", but still not working
bool pin;
nrf_gpio_cfg_watcher(PIN12);
pin= nrf_gpio_pin_read(PIN12);