I tried it on FRDM-KL25Z this afternoon.
J10 of FRDM-KL25Z has B[0..3]. I measured them, they are all floating and get about 0.7V DC.
After reset, I enable PORTB_PCRx [ MUX = 1 ] (0x00000105), then I read it from GPIOB_PDIR, I got 0x00000000.
Then I enable pull up PORTB_PCR0 [MUX=1,PE=1,PS=1] (0x00000107), suddenly, I got GPIOB_PDIR as 0x0000000F. If I ground one pin, the result is correct.
Then I disbale pull up PORTB_PCR0, it doesn't matter now.
I got little confuse here for the result:
- If the pull up (PE+PS) has not been enabled, the GPIO read is 0.
- If I enable pull up of one GPIO, then all GPIOs in one port is enable.
- If I disable pull up then, it doesn't matter at all.
It seems to detect ID-pin, the firmware should enable its GPIOx_PCR PE/PS bits. However I have no idea if other GPIO will be effected because all pull up is enabled.