Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion bsp/nxp/imx/imxrt/imxrt1180-nxp-evk/cm33/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ config SOC_MIMXRT1189CVM8C_CM33
default y
depends on SOC_MIMXRT1189CVM8C
select ARCH_ARM_CORTEX_M33
select ARCH_ARM_CORTEX_FPU
select ARCH_ARM_CORTEX_FPU
select ARCH_ARM_CORTEX_SECURE

menu "On-chip Peripheral Drivers"
Expand Down Expand Up @@ -128,6 +128,42 @@ menu "On-chip Peripheral Drivers"
default 1
endif

menuconfig BSP_USING_I2C
bool "Enable I2C"
select RT_USING_I2C
default n
if BSP_USING_I2C
config BSP_USING_I2C2
bool "Enable I2C2"
default y

config BSP_USING_I2C3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

似乎没看到I2C3的pin mux初始化?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已处理

bool "Enable I2C3"
default n

choice
prompt "Select I2C2 badurate"
default HW_I2C2_BADURATE_100kHZ

config HW_I2C2_BADURATE_100kHZ
bool "Badurate 100kHZ"

config HW_I2C2_BADURATE_400kHZ
bool "Badurate 400kHZ"
endchoice

choice
prompt "Select I2C3 badurate"
default HW_I2C3_BADURATE_100kHZ

config HW_I2C3_BADURATE_100kHZ
bool "Badurate 100kHZ"

config HW_I2C3_BADURATE_400kHZ
bool "Badurate 400kHZ"
endchoice
endif

menuconfig BSP_USING_CAN
bool "Enable CAN"
select RT_USING_CAN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,44 @@ void BOARD_InitPins(void) {
Pull / Keep Select Field: Pull Disable, Highz
Pull Up / Down Config. Field: Weak pull down
Open Drain Field: Disabled */

IOMUXC_SetPinMux(
IOMUXC_GPIO_AON_16_LPI2C2_SCL, /* GPIO_AON_16 is configured as LPI2C2_SCL */
1U); /* Software Input On Field: Force input path of pad GPIO_AON_16 */
IOMUXC_SetPinMux(
IOMUXC_GPIO_AON_15_LPI2C2_SDA, /* GPIO_AON_15 is configured as LPI2C2_SDA */
1U); /* Software Input On Field: Force input path of pad GPIO_AON_15 */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AON_16_LPI2C2_SCL, /* GPIO_AON_16 PAD functional properties : */
0x1DU); /* Slew Rate Field: Slow Slew Rate
Pull Enable Field: Pull Enable
Pull Up / Down Config. Field: Weak pull up
Open Drain Field: Enabled */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AON_15_LPI2C2_SDA, /* GPIO_AON_15 PAD functional properties : */
0x1DU); /* Slew Rate Field: Slow Slew Rate
Pull Enable Field: Pull Enable
Pull Up / Down Config. Field: Weak pull up
Open Drain Field: Enabled */

IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_18_LPI2C3_SCL, /* GPIO_AD_18 is configured as LPI2C3_SCL */
0U); /* Software Input On Field: Input Path is determined by functionality */
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_19_LPI2C3_SDA, /* GPIO_AD_19 is configured as LPI2C3_SDA */
0U); /* Software Input On Field: Input Path is determined by functionality */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AD_18_LPI2C3_SCL, /* GPIO_AD_18 PAD functional properties : */
0x1DU); /* Slew Rate Field: Slow Slew Rate
Pull Enable Field: Pull Enable
Pull Up / Down Config. Field: Weak pull up
Open Drain Field: Enabled */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AD_19_LPI2C3_SDA, /* GPIO_AD_19 PAD functional properties : */
0x1DU); /* Slew Rate Field: Slow Slew Rate
Pull Enable Field: Pull Enable
Pull Up / Down Config. Field: Weak pull up
Open Drain Field: Enabled */
}

void BOARD_InitLeds(void) {
Expand Down
8 changes: 4 additions & 4 deletions bsp/nxp/imx/imxrt/imxrt1180-nxp-evk/cm7/applications/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ int main(void)
{
rt_kprintf("MIMXRT1180_CM7 Hello_World\r\n");

while (1)
{
rt_thread_mdelay(500);
}
while (1)
{
rt_thread_mdelay(500);
}
}
50 changes: 43 additions & 7 deletions bsp/nxp/imx/imxrt/imxrt1180-nxp-evk/cm7/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ config SOC_MIMXRT1189CVM8C_CM7
default y
depends on SOC_MIMXRT1189CVM8C
select ARCH_ARM_CORTEX_M7
select ARCH_ARM_CORTEX_FPU
select ARCH_ARM_CORTEX_FPU

config BSP_USING_LCD_MIPI
bool
default n
Expand Down Expand Up @@ -131,6 +131,42 @@ menu "On-chip Peripheral Drivers"
default 1
endif

menuconfig BSP_USING_I2C
bool "Enable I2C"
select RT_USING_I2C
default n
if BSP_USING_I2C
config BSP_USING_I2C2
bool "Enable I2C2"
default y

config BSP_USING_I2C3
bool "Enable I2C3"
default n

choice
prompt "Select I2C2 badurate"
default HW_I2C2_BADURATE_100kHZ

config HW_I2C2_BADURATE_100kHZ
bool "Badurate 100kHZ"

config HW_I2C2_BADURATE_400kHZ
bool "Badurate 400kHZ"
endchoice

choice
prompt "Select I2C3 badurate"
default HW_I2C3_BADURATE_100kHZ

config HW_I2C3_BADURATE_100kHZ
bool "Badurate 100kHZ"

config HW_I2C3_BADURATE_400kHZ
bool "Badurate 400kHZ"
endchoice
endif

menuconfig BSP_USING_CAN
bool "Enable CAN"
select RT_USING_CAN
Expand Down Expand Up @@ -244,24 +280,24 @@ menu "Onboard Peripheral Drivers"
choice
prompt "Select display panel"
default DISPLAY_USING_RK055AHD091

config DISPLAY_USING_RK055AHD091
bool "RK055AHD091-CTG (RK055HDMIPI4M 720 * 1280)"

config DISPLAY_USING_RK055IQH091
bool "RK055IQH091-CTG (540 * 960)"

config DISPLAY_USING_RK055MHD091
bool "RK055MHD091A0-CTG (RK055HDMIPI4MA0 720 * 1280)"
endchoice

choice
prompt "Select display controller"
default BSP_USING_LCDIFV2

config BSP_USING_ELCDIF
bool "ELCDIF"

config BSP_USING_LCDIFV2
bool "LCDIFV2"
endchoice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ void BOARD_InitBootPins(void) {
*
* END ****************************************************************************************************************/
void BOARD_InitPins(void) {
CLOCK_EnableClock(kCLOCK_Iomuxc1); /* Turn on LPCG: LPCG is ON. */
CLOCK_EnableClock(kCLOCK_Iomuxc2); /* Turn on LPCG: LPCG is ON. */

IOMUXC_SetPinMux(
Expand All @@ -75,6 +76,44 @@ void BOARD_InitPins(void) {
Pull / Keep Select Field: Pull Disable, Highz
Pull Up / Down Config. Field: Weak pull down
Open Drain Field: Disabled */

IOMUXC_SetPinMux(
IOMUXC_GPIO_AON_16_LPI2C2_SCL, /* GPIO_AON_16 is configured as LPI2C2_SCL */
1U); /* Software Input On Field: Force input path of pad GPIO_AON_16 */
IOMUXC_SetPinMux(
IOMUXC_GPIO_AON_15_LPI2C2_SDA, /* GPIO_AON_15 is configured as LPI2C2_SDA */
1U); /* Software Input On Field: Force input path of pad GPIO_AON_15 */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AON_16_LPI2C2_SCL, /* GPIO_AON_16 PAD functional properties : */
0x1DU); /* Slew Rate Field: Slow Slew Rate
Pull Enable Field: Pull Enable
Pull Up / Down Config. Field: Weak pull up
Open Drain Field: Enabled */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AON_15_LPI2C2_SDA, /* GPIO_AON_15 PAD functional properties : */
0x1DU); /* Slew Rate Field: Slow Slew Rate
Pull Enable Field: Pull Enable
Pull Up / Down Config. Field: Weak pull up
Open Drain Field: Enabled */

IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_18_LPI2C3_SCL, /* GPIO_AD_18 is configured as LPI2C3_SCL */
0U); /* Software Input On Field: Input Path is determined by functionality */
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_19_LPI2C3_SDA, /* GPIO_AD_19 is configured as LPI2C3_SDA */
0U); /* Software Input On Field: Input Path is determined by functionality */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AD_18_LPI2C3_SCL, /* GPIO_AD_18 PAD functional properties : */
0x1DU); /* Slew Rate Field: Slow Slew Rate
Pull Enable Field: Pull Enable
Pull Up / Down Config. Field: Weak pull up
Open Drain Field: Enabled */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AD_19_LPI2C3_SDA, /* GPIO_AD_19 PAD functional properties : */
0x1DU); /* Slew Rate Field: Slow Slew Rate
Pull Enable Field: Pull Enable
Pull Up / Down Config. Field: Weak pull up
Open Drain Field: Enabled */
}

/***********************************************************************************************************************
Expand Down
Loading
Loading