Skip to content

Commit 22a6777

Browse files
committed
enable CFG_TUD/THU_MEM_DCACHE_ENABLE for imxrt with M7 by default
1 parent a39e30d commit 22a6777

File tree

7 files changed

+150
-137
lines changed

7 files changed

+150
-137
lines changed

hw/bsp/imxrt/boards/mimxrt1170_evkb/board/clock_config.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
1313
!!GlobalInfo
14-
product: Clocks v12.0
14+
product: Clocks v14.0
1515
processor: MIMXRT1176xxxxx
1616
package_id: MIMXRT1176DVMAA
1717
mcu_data: ksdk2_0
18-
processor_version: 14.0.1
18+
processor_version: 16.3.0
1919
board: MIMXRT1170-EVKB
2020
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
2121

@@ -335,7 +335,6 @@ void BOARD_BootClockRUN(void)
335335

336336
/* Init OSC RC 400M */
337337
CLOCK_OSC_EnableOscRc400M();
338-
CLOCK_OSC_GateOscRc400M(false);
339338

340339
/* Init OSC RC 48M */
341340
CLOCK_OSC_EnableOsc48M(true);
@@ -349,22 +348,29 @@ void BOARD_BootClockRUN(void)
349348
{
350349
}
351350

352-
/* Switch both core, M7 Systick and Bus_Lpsr to OscRC48MDiv2 first */
351+
/* Switch core M7 clock root to OscRC48MDiv2 first */
353352
#if __CORTEX_M == 7
354353
rootCfg.mux = kCLOCK_M7_ClockRoot_MuxOscRc48MDiv2;
355354
rootCfg.div = 1;
356355
CLOCK_SetRootClock(kCLOCK_Root_M7, &rootCfg);
356+
#endif
357357

358+
/* Switch core M7 systick clock root to OscRC48MDiv2 first */
359+
#if __CORTEX_M == 7
358360
rootCfg.mux = kCLOCK_M7_SYSTICK_ClockRoot_MuxOscRc48MDiv2;
359361
rootCfg.div = 1;
360362
CLOCK_SetRootClock(kCLOCK_Root_M7_Systick, &rootCfg);
361363
#endif
362364

365+
/* Switch core M4 clock root to OscRC48MDiv2 first */
363366
#if __CORTEX_M == 4
364367
rootCfg.mux = kCLOCK_M4_ClockRoot_MuxOscRc48MDiv2;
365368
rootCfg.div = 1;
366369
CLOCK_SetRootClock(kCLOCK_Root_M4, &rootCfg);
370+
#endif
367371

372+
/* Switch the Bus_Lpsr clock root to OscRC48MDiv2 first */
373+
#if __CORTEX_M == 4
368374
rootCfg.mux = kCLOCK_BUS_LPSR_ClockRoot_MuxOscRc48MDiv2;
369375
rootCfg.div = 1;
370376
CLOCK_SetRootClock(kCLOCK_Root_Bus_Lpsr, &rootCfg);

hw/bsp/imxrt/boards/mimxrt1170_evkb/board/clock_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void BOARD_InitBootClocks(void);
4848
#define BOARD_BOOTCLOCKRUN_ARM_PLL_CLK 996000000UL /* Clock consumers of ARM_PLL_CLK output : N/A */
4949
#define BOARD_BOOTCLOCKRUN_ASRC_CLK_ROOT 24000000UL /* Clock consumers of ASRC_CLK_ROOT output : ASRC */
5050
#define BOARD_BOOTCLOCKRUN_AXI_CLK_ROOT 996000000UL /* Clock consumers of AXI_CLK_ROOT output : FLEXRAM */
51-
#define BOARD_BOOTCLOCKRUN_BUS_CLK_ROOT 240000000UL /* Clock consumers of BUS_CLK_ROOT output : ADC_ETC, AOI1, AOI2, CAAM, CAN1, CAN2, CM7_GPIO2, CM7_GPIO3, CMP1, CMP2, CMP3, CMP4, CSI, DAC, DMA0, DMAMUX0, DSI_HOST, EMVSIM1, EMVSIM2, ENC1, ENC2, ENC3, ENC4, ENET, ENET_1G, ENET_QOS, EWM, FLEXIO1, FLEXIO2, FLEXSPI1, FLEXSPI2, GPIO1, GPIO2, GPIO3, GPIO4, GPIO5, GPIO6, IEE_APC, IOMUXC, IOMUXC_GPR, KPP, LCDIF, LCDIFV2, LPADC1, LPADC2, LPI2C1, LPI2C2, LPI2C3, LPI2C4, LPSPI1, LPSPI2, LPSPI3, LPSPI4, LPUART1, LPUART10, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8, LPUART9, MECC1, MECC2, MIPI_CSI2RX, PIT1, PWM1, PWM2, PWM3, PWM4, PXP, RTWDOG3, SAI1, SAI2, SAI3, SPDIF, TMR1, TMR2, TMR3, TMR4, USBPHY1, USBPHY2, USB_OTG1, USB_OTG2, USDHC1, USDHC2, WDOG1, WDOG2, XBARA1, XBARB2, XBARB3, XECC_FLEXSPI1, XECC_FLEXSPI2, XECC_SEMC, XRDC2_D0, XRDC2_D1 */
51+
#define BOARD_BOOTCLOCKRUN_BUS_CLK_ROOT 240000000UL /* Clock consumers of BUS_CLK_ROOT output : ADC_ETC, AOI1, AOI2, CAAM, CAN1, CAN2, CM7_GPIO2, CM7_GPIO3, CMP1, CMP2, CMP3, CMP4, CSI, DAC, DMA0, DMAMUX0, DSI_HOST, EMVSIM1, EMVSIM2, ENC1, ENC2, ENC3, ENC4, ENET, ENET_1G, ENET_QOS, EWM, FLEXIO1, FLEXIO2, FLEXSPI1, FLEXSPI2, GPIO1, GPIO2, GPIO3, GPIO4, GPIO5, GPIO6, IEE_APC, IEE__IEE_RT1170, IOMUXC, IOMUXC_GPR, KPP, LCDIF, LCDIFV2, LPADC1, LPADC2, LPI2C1, LPI2C2, LPI2C3, LPI2C4, LPSPI1, LPSPI2, LPSPI3, LPSPI4, LPUART1, LPUART10, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8, LPUART9, MECC1, MECC2, MIPI_CSI2RX, PIT1, PWM1, PWM2, PWM3, PWM4, PXP, RTWDOG3, SAI1, SAI2, SAI3, SPDIF, TMR1, TMR2, TMR3, TMR4, USBPHY1, USBPHY2, USB_OTG1, USB_OTG2, USDHC1, USDHC2, WDOG1, WDOG2, XBARA1, XBARB2, XBARB3, XECC_FLEXSPI1, XECC_FLEXSPI2, XECC_SEMC, XRDC2_D0, XRDC2_D1 */
5252
#define BOARD_BOOTCLOCKRUN_BUS_LPSR_CLK_ROOT 160000000UL /* Clock consumers of BUS_LPSR_CLK_ROOT output : CAN3, GPIO10, GPIO11, GPIO12, GPIO7, GPIO8, GPIO9, IOMUXC_LPSR, LPI2C5, LPI2C6, LPSPI5, LPSPI6, LPUART11, LPUART12, MUA, MUB, PDM, PIT2, RDC, RTWDOG4, SAI4, SNVS, XRDC2_D0, XRDC2_D1 */
5353
#define BOARD_BOOTCLOCKRUN_CAN1_CLK_ROOT 24000000UL /* Clock consumers of CAN1_CLK_ROOT output : CAN1 */
5454
#define BOARD_BOOTCLOCKRUN_CAN2_CLK_ROOT 24000000UL /* Clock consumers of CAN2_CLK_ROOT output : CAN2 */

hw/bsp/imxrt/boards/mimxrt1170_evkb/board/pin_mux.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
/*
77
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
88
!!GlobalInfo
9-
product: Pins v14.0
9+
product: Pins v16.0
1010
processor: MIMXRT1176xxxxx
1111
package_id: MIMXRT1176DVMAA
1212
mcu_data: ksdk2_0
13-
processor_version: 14.0.1
13+
processor_version: 16.3.0
1414
board: MIMXRT1170-EVKB
1515
external_user_signals: {}
1616
pin_labels:
@@ -90,7 +90,7 @@ void BOARD_InitPins(void) {
9090
IOMUXC_GPIO_AD_04_GPIO9_IO03, /* GPIO_AD_04 PAD functional properties : */
9191
0x02U); /* Slew Rate Field: Slow Slew Rate
9292
Drive Strength Field: high drive strength
93-
Pull / Keep Select Field: Pull Disable, Highz
93+
Pull / Keep Select Field: Pull Disable
9494
Pull Up / Down Config. Field: Weak pull down
9595
Open Drain Field: Disabled
9696
Domain write protection: Both cores are allowed
@@ -99,7 +99,7 @@ void BOARD_InitPins(void) {
9999
IOMUXC_GPIO_AD_24_LPUART1_TXD, /* GPIO_AD_24 PAD functional properties : */
100100
0x02U); /* Slew Rate Field: Slow Slew Rate
101101
Drive Strength Field: high drive strength
102-
Pull / Keep Select Field: Pull Disable, Highz
102+
Pull / Keep Select Field: Pull Disable
103103
Pull Up / Down Config. Field: Weak pull down
104104
Open Drain Field: Disabled
105105
Domain write protection: Both cores are allowed
@@ -108,22 +108,19 @@ void BOARD_InitPins(void) {
108108
IOMUXC_GPIO_AD_25_LPUART1_RXD, /* GPIO_AD_25 PAD functional properties : */
109109
0x02U); /* Slew Rate Field: Slow Slew Rate
110110
Drive Strength Field: high drive strength
111-
Pull / Keep Select Field: Pull Disable, Highz
111+
Pull / Keep Select Field: Pull Disable
112112
Pull Up / Down Config. Field: Weak pull down
113113
Open Drain Field: Disabled
114114
Domain write protection: Both cores are allowed
115115
Domain write protection lock: Neither of DWP bits is locked */
116116
IOMUXC_SetPinConfig(
117117
IOMUXC_WAKEUP_DIG_GPIO13_IO00, /* WAKEUP_DIG PAD functional properties : */
118-
0x0EU); /* Slew Rate Field: Slow Slew Rate
119-
Drive Strength Field: high driver
120-
Pull / Keep Select Field: Pull Enable
118+
0x0EU); /* Pull / Keep Select Field: Pull Enable
121119
Pull Up / Down Config. Field: Weak pull up
122120
Open Drain SNVS Field: Disabled
123121
Domain write protection: Both cores are allowed
124122
Domain write protection lock: Neither of DWP bits is locked */
125123
}
126-
127124
/***********************************************************************************************************************
128125
* EOF
129126
**********************************************************************************************************************/

hw/bsp/imxrt/boards/mimxrt1170_evkb/board/pin_mux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void BOARD_InitBootPins(void);
4646
#define BOARD_INITPINS_USER_LED_GPIO_PIN 3U /*!< GPIO pin number */
4747
#define BOARD_INITPINS_USER_LED_GPIO_PIN_MASK (1U << 3U) /*!< GPIO pin mask */
4848

49-
/* WAKEUP (coord T8), USER_BUTTON */
49+
/* WAKEUP (coord T8), USER_BUTTON/SW7 */
5050
/* Routed pin properties */
5151
#define BOARD_INITPINS_USER_BUTTON_PERIPHERAL GPIO13 /*!< Peripheral name */
5252
#define BOARD_INITPINS_USER_BUTTON_SIGNAL gpio_io /*!< Signal name */

hw/bsp/imxrt/boards/mimxrt1170_evkb/mimxrt1170_evkb.mex

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding= "UTF-8" ?>
2-
<configuration name="MIMXRT1176xxxxx" xsi:schemaLocation="http://mcuxpresso.nxp.com/XSD/mex_configuration_14 http://mcuxpresso.nxp.com/XSD/mex_configuration_14.xsd" uuid="060646c1-2247-47a8-b52d-03c1968b4426" version="14" xmlns="http://mcuxpresso.nxp.com/XSD/mex_configuration_14" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2+
<configuration name="MIMXRT1176xxxxx" xsi:schemaLocation="http://mcuxpresso.nxp.com/XSD/mex_configuration_16 http://mcuxpresso.nxp.com/XSD/mex_configuration_16.xsd" uuid="060646c1-2247-47a8-b52d-03c1968b4426" version="16" xmlns="http://mcuxpresso.nxp.com/XSD/mex_configuration_16" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
33
<common>
44
<processor>MIMXRT1176xxxxx</processor>
55
<package>MIMXRT1176DVMAA</package>
@@ -19,18 +19,17 @@
1919
<generate_registers_defines>false</generate_registers_defines>
2020
</preferences>
2121
<tools>
22-
<pins name="Pins" version="14.0" enabled="true" update_project_code="true">
22+
<pins name="Pins" version="16.0" enabled="true" update_project_code="true">
2323
<generated_project_files>
2424
<file path="board/pin_mux.c" update_enabled="true"/>
2525
<file path="board/pin_mux.h" update_enabled="true"/>
2626
</generated_project_files>
2727
<pins_profile>
28-
<processor_version>14.0.1</processor_version>
28+
<processor_version>16.3.0</processor_version>
2929
<pin_labels>
3030
<pin_label pin_num="M13" pin_signal="GPIO_AD_04" label="SIM1_PD/J44[C8]/USER_LED_CTL1/J9[8]/J25[7]" identifier="SIM1_PD;LED;USER_LED"/>
3131
</pin_labels>
3232
<external_user_signals>
33-
<routingDetailsColumns/>
3433
<properties/>
3534
</external_user_signals>
3635
<power_domains/>
@@ -44,7 +43,7 @@
4443
<enableClock>true</enableClock>
4544
</options>
4645
<dependencies>
47-
<dependency resourceType="Peripheral" resourceId="LPUART1" description="Peripheral LPUART1 is not initialized" problem_level="1" source="Pins:BOARD_InitPins">
46+
<dependency resourceType="Peripheral" resourceId="LPUART1" description="Peripheral LPUART1 signals are routed in the Pins Tool, but the peripheral is not initialized in the Peripherals Tool." problem_level="1" source="Pins:BOARD_InitPins">
4847
<feature name="initialized" evaluation="equal">
4948
<data>true</data>
5049
</feature>
@@ -104,13 +103,13 @@
104103
</function>
105104
</functions_list>
106105
</pins>
107-
<clocks name="Clocks" version="12.0" enabled="true" update_project_code="true">
106+
<clocks name="Clocks" version="14.0" enabled="true" update_project_code="true">
108107
<generated_project_files>
109108
<file path="board/clock_config.c" update_enabled="true"/>
110109
<file path="board/clock_config.h" update_enabled="true"/>
111110
</generated_project_files>
112111
<clocks_profile>
113-
<processor_version>14.0.1</processor_version>
112+
<processor_version>16.3.0</processor_version>
114113
</clocks_profile>
115114
<clock_configurations>
116115
<clock_configuration name="BOARD_BootClockRUN" id_prefix="" prefix_user_defined="false">

0 commit comments

Comments
 (0)