Hi Hang,
In these days I've tried multiple configurations, as you listed now, the N-MOS level translator and pull-ups connected to PIO0_10 and PIO0_11 are working correctly (the circuit is the same of the attached photos).
I've found that I was wrong to put in the right place the while statements for PENDING status during the I2C Master transmission.
As linked in the manual guide into I2C0 Chapter, the third and sixth points "Wait for the pending status to be set (MSTPENDING = 1) by polling the STAT register" has to be as follow:
LPC_I2C0 -> MSTDAT = ADDR;
MSCTL_REG = I2C_MSTCTL_MSTSTART_ON;
MSCTL_REG = I2C_MSTCTL_MSTSTART_OFF;
while(!(LPC_I2C0 ->STAT & (1 << 0)));
LPC_I2C0 -> MSTDAT = DATA;
while(!(LPC_I2C0 ->STAT & (1 << 0)));
MSCTL_REG = I2C_MSTCTL_MSTSTOP_ON;
MSCTL_REG = I2C_MSTCTL_MSTSTOP_OFF;
I've observed also that my "printf " function (for debugging) gave me issues to the right clock timing of I2C, inside the above transmission cycle code...
Thanks,
Ivan