я так настраиваю:
Код
FIO0DIR |= 1UL << 29; // P0.29
FIO0DIR |= 1UL << 30; // P0.29
IODIR0 |= 1UL << 29; // P0.29
IODIR0 |= 1UL << 30; // P0.29
user.manual.lpc23xx.pdf, GPIO port Direction register IODIR and FIODIR(IO[0/1]DIR -
0xE002 80[0/1]8 and FIO[0/1/2/3/4]DIR - 0x3FFF C0[0/2/4/6/8]0)
Remark: GPIO pins P0.29 and P0.30 are shared with the USB D+/− pins and must have
the same direction. If either P0DIR bits 29 or 30 are configured LOW in the IO0DIR or
FIO0DIR registers, both, P0.29 and P0.30, are inputs. If both, P0DIR bit 29 and bit 30 are
HIGH, both, P0.29 and P0.30, are outputs.