When I use MDK 3.4 and input following: PINSEL2 = PINSEL2 & ( ~( 0x3<<4 )) | ( 1<<4 ) //enable CS0, OE, D0...D7, D8...D15 & ( ~(0x3<<26 )) | ( 1<<25 ) //enable Addr2 as NAND flash ALE //enable Addr3 as NAND flash CLE | ( 1<<8 ); //enable WE PINSEL2 =0x026001D4 when I change it by following: PINSEL2 = PINSEL2 & ( ~(0x3<<26 )) | ( 1<<25 ) //enable Addr2 as NAND flash ALE //enable Addr3 as NAND flash CLE | ( 1<<8 ); //enable WE // & ( ~( 0x3<<4 )) // | ( 1<<4 ); //enable CS0, OE, D0...D7, D8...D15 PINSEL2 =0x026001F4 The second code is NXP DEMO code.I use it,but it works wrong.I write it " the first code",it works right.Where the problem is?