Hello Valli,
Could you please first test a simple project ,for example only read the a simple pin.
I test on my side with TWR-KV31 board, configre PTC6 pin as input, high, then read it ,
work well:

And please pay attention to that , enable the gpio interrupt , otherwise it won't update:

About " <optimized value>." , where shows this ?
Hope it helps
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------