Hi Pietro,
I check your code which you past,
HW_PORT_GPCLR_WR( g_portBaseAddr[ GPIO_EXTRACT_PORT(kGpioEncMux2) ], mux_bits.val );
This is not correct, because HW_PORT_GPCLR_WR definition is like following in our KSDK:
| #define HW_PORT_GPCLR_ADDR(x) | ((uint32_t)(x) + 0x80U) |
| #define HW_PORT_GPCLR(x) | (*(__O hw_port_gpclr_t *) HW_PORT_GPCLR_ADDR(x)) |
| #define HW_PORT_GPCLR_RD(x) | (HW_PORT_GPCLR(x).U) |
#define HW_PORT_GPCLR_WR(x, v) (HW_PORT_GPCLR(x).U = (v))
x: is the base address of PORTC, it is 0x4004_B000. then x+0x80 =0x4004_B080

![]()
So, you should configure it like this :
HW_PORT_GPCLR_WR(PORTC_BASE,0X03800103 );
This will configure the PORTC_PCR7, PORTC_PCR8 and PORTC_PCR9.
I test it, it can works ok on my side with HW_PORT_GPCLR_WR(PORTC_BASE,0X03800103 );
Following are my test result:
(1)Before run :HW_PORT_GPCLR_WR(PORTC_BASE,0X03800103 );
![]()

(2) After run ::HW_PORT_GPCLR_WR(PORTC_BASE,0X03800103 );
![]()

So, please modify your code and test again.
Any question, please contact me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------