Hi, Thanks for your response and I agree with you. However, in the SDK I saw the following

so pin 1 in GPIO 1 is D typed

so IOCON type D says that reading bit number 6 and 12 to 31 is undefined (could be 0 or 1?).
so the following part of the code will be clearing the bits that is related to func_MASK and DIGIMODE_mask(first four bits and bit number and read the rest of the register bits value and leave it the same. this include reading bit 6, and 12 to 31( which could have a value of 1 becuse reading these bits is undefined).
((IOCON->PIO[1][1] &
/* Mask bits to zero which are setting */
(~(IOCON_PIO_FUNC_MASK | IOCON_PIO_DIGIMODE_MASK)))
after making or with the desired value for FUNC and DIGIMODE this new value will be writing to the
IOCON->PIO[1][1]
which include the read value for pin6, 12 to 31
my question what if any of the value we read for pin 6, 12 to 31 was 1(because the reading value is undefined). in this case we wrote 1 in bit 6, or 12 to31. and we should only write zero to theses bits according to data sheet.
is this a mistake in SDK, or in datasheet? or did I miss something?
Thank you !