在线时间3 小时
UID3816939
注册时间2022-1-16
NXP金币23
该用户从未签到
新手上路

- 积分
- 26
- 最后登录
- 2022-1-24
|
請問各位大陸同胞,我以前都是用STM32開發.現在用NXP試試看
針對原廠範例程式裡面,I2C使用PIO0.29和Pin0.30
但是我想要改成PIO0.24和Pin0.25為什麼無使用,請問我還需要改那些地方嗎??
因為針對LPC54628這個MCU的Data sheet裡面PIO0.24和Pin0.25一樣可以作為
I2C使用啊???.
void BOARD_InitPins(void)
{
/* Enables the clock for the IOCON block. 0 = Disable; 1 = Enable.: 0x01u */
CLOCK_EnableClock(kCLOCK_Iocon);
const uint32_t port0_pin29_config = (/* Pin is configured as FC0_RXD_SDA_MOSI */
IOCON_PIO_FUNC1 |
/* No addition pin function */
IOCON_PIO_MODE_INACT |
/* Input function is not inverted */
IOCON_PIO_INV_DI |
/* Enables digital function */
IOCON_PIO_DIGITAL_EN |
/* Input filter disabled */
IOCON_PIO_INPFILT_OFF |
/* Standard mode, output slew rate control is enabled */
IOCON_PIO_SLEW_STANDARD |
/* Open drain is disabled */
IOCON_PIO_OPENDRAIN_DI);
/* PORT0 PIN29 (coords: B13) is configured as FC0_RXD_SDA_MOSI */
IOCON_PinMuxSet(IOCON, 0U, 29U, port0_pin29_config);
// IOCON_PinMuxSet(IOCON, 0U, 24U, port0_pin29_config);
const uint32_t port0_pin30_config = (/* Pin is configured as FC0_TXD_SCL_MISO */
IOCON_PIO_FUNC1 |
/* No addition pin function */
IOCON_PIO_MODE_INACT |
/* Input function is not inverted */
IOCON_PIO_INV_DI |
/* Enables digital function */
IOCON_PIO_DIGITAL_EN |
/* Input filter disabled */
IOCON_PIO_INPFILT_OFF |
/* Standard mode, output slew rate control is enabled */
IOCON_PIO_SLEW_STANDARD |
/* Open drain is disabled */
IOCON_PIO_OPENDRAIN_DI);
/* PORT0 PIN30 (coords: A2) is configured as FC0_TXD_SCL_MISO */
IOCON_PinMuxSet(IOCON, 0U, 30U, port0_pin30_config);
//IOCON_PinMuxSet(IOCON, 0U, 25U, port0_pin30_config);
|
-
MCU Sheet
|