Skip to content

Commit 6a908cc

Browse files
committed
correctly use xtal for initialize usbphy, rt1170 usb is working
1 parent 89dce68 commit 6a908cc

File tree

10 files changed

+223
-213
lines changed

10 files changed

+223
-213
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
1717
!!GlobalInfo
18-
product: Clocks v11.0
18+
product: Clocks v12.0
1919
processor: MIMXRT1011xxxxx
2020
package_id: MIMXRT1011DAE5A
2121
mcu_data: ksdk2_0
22-
processor_version: 13.0.2
22+
processor_version: 14.0.0
2323
board: MIMXRT1010-EVK
2424
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
2525

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

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -36,36 +36,36 @@ void BOARD_InitBootClocks(void);
3636
#define BOARD_BOOTCLOCKRUN_CORE_CLOCK 500000000U /*!< Core clock frequency: 500000000Hz */
3737

3838
/* Clock outputs (values are in Hz): */
39-
#define BOARD_BOOTCLOCKRUN_ADC_ALT_CLK 40000000UL
40-
#define BOARD_BOOTCLOCKRUN_CKIL_SYNC_CLK_ROOT 32768UL
41-
#define BOARD_BOOTCLOCKRUN_CLKO1_CLK 0UL
42-
#define BOARD_BOOTCLOCKRUN_CLKO2_CLK 0UL
43-
#define BOARD_BOOTCLOCKRUN_CLK_1M 1000000UL
44-
#define BOARD_BOOTCLOCKRUN_CLK_24M 24000000UL
45-
#define BOARD_BOOTCLOCKRUN_CORE_CLK_ROOT 500000000UL
46-
#define BOARD_BOOTCLOCKRUN_ENET_500M_REF_CLK 500000000UL
47-
#define BOARD_BOOTCLOCKRUN_FLEXIO1_CLK_ROOT 30000000UL
48-
#define BOARD_BOOTCLOCKRUN_FLEXSPI_CLK_ROOT 132000000UL
49-
#define BOARD_BOOTCLOCKRUN_GPT1_IPG_CLK_HIGHFREQ 62500000UL
50-
#define BOARD_BOOTCLOCKRUN_GPT2_IPG_CLK_HIGHFREQ 62500000UL
51-
#define BOARD_BOOTCLOCKRUN_IPG_CLK_ROOT 125000000UL
52-
#define BOARD_BOOTCLOCKRUN_LPI2C_CLK_ROOT 60000000UL
53-
#define BOARD_BOOTCLOCKRUN_LPSPI_CLK_ROOT 105600000UL
54-
#define BOARD_BOOTCLOCKRUN_MQS_MCLK 63529411UL
55-
#define BOARD_BOOTCLOCKRUN_PERCLK_CLK_ROOT 62500000UL
56-
#define BOARD_BOOTCLOCKRUN_SAI1_CLK_ROOT 63529411UL
57-
#define BOARD_BOOTCLOCKRUN_SAI1_MCLK1 63529411UL
58-
#define BOARD_BOOTCLOCKRUN_SAI1_MCLK2 63529411UL
59-
#define BOARD_BOOTCLOCKRUN_SAI1_MCLK3 30000000UL
60-
#define BOARD_BOOTCLOCKRUN_SAI3_CLK_ROOT 63529411UL
61-
#define BOARD_BOOTCLOCKRUN_SAI3_MCLK1 63529411UL
62-
#define BOARD_BOOTCLOCKRUN_SAI3_MCLK2 0UL
63-
#define BOARD_BOOTCLOCKRUN_SAI3_MCLK3 30000000UL
64-
#define BOARD_BOOTCLOCKRUN_SPDIF0_CLK_ROOT 30000000UL
65-
#define BOARD_BOOTCLOCKRUN_SPDIF0_EXTCLK_OUT 0UL
66-
#define BOARD_BOOTCLOCKRUN_TRACE_CLK_ROOT 132000000UL
67-
#define BOARD_BOOTCLOCKRUN_UART_CLK_ROOT 80000000UL
68-
#define BOARD_BOOTCLOCKRUN_USBPHY_CLK 480000000UL
39+
#define BOARD_BOOTCLOCKRUN_ADC_ALT_CLK 40000000UL /* Clock consumers of ADC_ALT_CLK output : N/A */
40+
#define BOARD_BOOTCLOCKRUN_CKIL_SYNC_CLK_ROOT 32768UL /* Clock consumers of CKIL_SYNC_CLK_ROOT output : CSU, EWM, GPT1, GPT2, KPP, PIT, RTWDOG, SNVS, SPDIF, TEMPMON, USB, WDOG1, WDOG2 */
41+
#define BOARD_BOOTCLOCKRUN_CLKO1_CLK 0UL /* Clock consumers of CLKO1_CLK output : N/A */
42+
#define BOARD_BOOTCLOCKRUN_CLKO2_CLK 0UL /* Clock consumers of CLKO2_CLK output : N/A */
43+
#define BOARD_BOOTCLOCKRUN_CLK_1M 1000000UL /* Clock consumers of CLK_1M output : EWM, RTWDOG */
44+
#define BOARD_BOOTCLOCKRUN_CLK_24M 24000000UL /* Clock consumers of CLK_24M output : GPT1, GPT2 */
45+
#define BOARD_BOOTCLOCKRUN_CORE_CLK_ROOT 500000000UL /* Clock consumers of CORE_CLK_ROOT output : ARM, FLEXSPI */
46+
#define BOARD_BOOTCLOCKRUN_ENET_500M_REF_CLK 500000000UL /* Clock consumers of ENET_500M_REF_CLK output : N/A */
47+
#define BOARD_BOOTCLOCKRUN_FLEXIO1_CLK_ROOT 30000000UL /* Clock consumers of FLEXIO1_CLK_ROOT output : FLEXIO1 */
48+
#define BOARD_BOOTCLOCKRUN_FLEXSPI_CLK_ROOT 132000000UL /* Clock consumers of FLEXSPI_CLK_ROOT output : FLEXSPI */
49+
#define BOARD_BOOTCLOCKRUN_GPT1_IPG_CLK_HIGHFREQ 62500000UL /* Clock consumers of GPT1_ipg_clk_highfreq output : GPT1 */
50+
#define BOARD_BOOTCLOCKRUN_GPT2_IPG_CLK_HIGHFREQ 62500000UL /* Clock consumers of GPT2_ipg_clk_highfreq output : GPT2 */
51+
#define BOARD_BOOTCLOCKRUN_IPG_CLK_ROOT 125000000UL /* Clock consumers of IPG_CLK_ROOT output : ADC1, ADC_ETC, AIPSTZ1, AIPSTZ2, AOI, ARM, CCM, CSU, DCDC, DCP, DMA0, DMAMUX, EWM, FLEXIO1, FLEXRAM, FLEXSPI, GPC, GPIO1, GPIO2, GPIO5, IOMUXC, KPP, LPI2C1, LPI2C2, LPSPI1, LPSPI2, LPUART1, LPUART2, LPUART3, LPUART4, OCOTP, PWM1, RTWDOG, SAI1, SAI3, SNVS, SPDIF, SRC, TEMPMON, TRNG, USB, WDOG1, WDOG2, XBARA */
52+
#define BOARD_BOOTCLOCKRUN_LPI2C_CLK_ROOT 60000000UL /* Clock consumers of LPI2C_CLK_ROOT output : LPI2C1, LPI2C2 */
53+
#define BOARD_BOOTCLOCKRUN_LPSPI_CLK_ROOT 105600000UL /* Clock consumers of LPSPI_CLK_ROOT output : LPSPI1, LPSPI2 */
54+
#define BOARD_BOOTCLOCKRUN_MQS_MCLK 63529411UL /* Clock consumers of MQS_MCLK output : N/A */
55+
#define BOARD_BOOTCLOCKRUN_PERCLK_CLK_ROOT 62500000UL /* Clock consumers of PERCLK_CLK_ROOT output : GPT1, GPT2, PIT */
56+
#define BOARD_BOOTCLOCKRUN_SAI1_CLK_ROOT 63529411UL /* Clock consumers of SAI1_CLK_ROOT output : N/A */
57+
#define BOARD_BOOTCLOCKRUN_SAI1_MCLK1 63529411UL /* Clock consumers of SAI1_MCLK1 output : SAI1 */
58+
#define BOARD_BOOTCLOCKRUN_SAI1_MCLK2 63529411UL /* Clock consumers of SAI1_MCLK2 output : SAI1 */
59+
#define BOARD_BOOTCLOCKRUN_SAI1_MCLK3 30000000UL /* Clock consumers of SAI1_MCLK3 output : SAI1 */
60+
#define BOARD_BOOTCLOCKRUN_SAI3_CLK_ROOT 63529411UL /* Clock consumers of SAI3_CLK_ROOT output : N/A */
61+
#define BOARD_BOOTCLOCKRUN_SAI3_MCLK1 63529411UL /* Clock consumers of SAI3_MCLK1 output : SAI3 */
62+
#define BOARD_BOOTCLOCKRUN_SAI3_MCLK2 0UL /* Clock consumers of SAI3_MCLK2 output : SAI3 */
63+
#define BOARD_BOOTCLOCKRUN_SAI3_MCLK3 30000000UL /* Clock consumers of SAI3_MCLK3 output : SAI3 */
64+
#define BOARD_BOOTCLOCKRUN_SPDIF0_CLK_ROOT 30000000UL /* Clock consumers of SPDIF0_CLK_ROOT output : SPDIF */
65+
#define BOARD_BOOTCLOCKRUN_SPDIF0_EXTCLK_OUT 0UL /* Clock consumers of SPDIF0_EXTCLK_OUT output : SPDIF */
66+
#define BOARD_BOOTCLOCKRUN_TRACE_CLK_ROOT 132000000UL /* Clock consumers of TRACE_CLK_ROOT output : ARM */
67+
#define BOARD_BOOTCLOCKRUN_UART_CLK_ROOT 80000000UL /* Clock consumers of UART_CLK_ROOT output : LPUART1, LPUART2, LPUART3, LPUART4 */
68+
#define BOARD_BOOTCLOCKRUN_USBPHY_CLK 480000000UL /* Clock consumers of USBPHY_CLK output : TEMPMON, USB */
6969

7070
/*! @brief Usb1 PLL set for BOARD_BootClockRUN configuration.
7171
*/

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

Lines changed: 2 additions & 2 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 v13.1
9+
product: Pins v14.0
1010
processor: MIMXRT1011xxxxx
1111
package_id: MIMXRT1011DAE5A
1212
mcu_data: ksdk2_0
13-
processor_version: 13.0.2
13+
processor_version: 14.0.0
1414
board: MIMXRT1010-EVK
1515
external_user_signals: {}
1616
pin_labels:

hw/bsp/imxrt/boards/metro_m7_1011/metro_m7_1011.mex

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding= "UTF-8" ?>
2-
<configuration name="MIMXRT1010-EVK" xsi:schemaLocation="http://mcuxpresso.nxp.com/XSD/mex_configuration_13 http://mcuxpresso.nxp.com/XSD/mex_configuration_13.xsd" uuid="f341eb24-9521-4127-8932-81692aeb76df" version="13" xmlns="http://mcuxpresso.nxp.com/XSD/mex_configuration_13" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2+
<configuration name="MIMXRT1010-EVK" xsi:schemaLocation="http://mcuxpresso.nxp.com/XSD/mex_configuration_14 http://mcuxpresso.nxp.com/XSD/mex_configuration_14.xsd" uuid="f341eb24-9521-4127-8932-81692aeb76df" version="14" xmlns="http://mcuxpresso.nxp.com/XSD/mex_configuration_14" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
33
<common>
44
<processor>MIMXRT1011xxxxx</processor>
55
<package>MIMXRT1011DAE5A</package>
@@ -19,19 +19,20 @@
1919
<generate_registers_defines>false</generate_registers_defines>
2020
</preferences>
2121
<tools>
22-
<pins name="Pins" version="13.1" enabled="true" update_project_code="true">
22+
<pins name="Pins" version="14.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>13.0.2</processor_version>
28+
<processor_version>14.0.0</processor_version>
2929
<pin_labels>
3030
<pin_label pin_num="1" pin_signal="GPIO_11" label="GPIO_11" identifier="GPIO_11"/>
3131
<pin_label pin_num="10" pin_signal="GPIO_03" label="SAI1_RXD0/U10[16]" identifier="LED;USER_LED"/>
3232
<pin_label pin_num="4" pin_signal="GPIO_08" label="SAI1_MCLK/U10[11]" identifier="USER_BUTTON"/>
3333
</pin_labels>
3434
<external_user_signals>
35+
<routingDetailsColumns/>
3536
<properties/>
3637
</external_user_signals>
3738
<power_domains>
@@ -93,13 +94,13 @@
9394
</function>
9495
</functions_list>
9596
</pins>
96-
<clocks name="Clocks" version="11.0" enabled="true" update_project_code="true">
97+
<clocks name="Clocks" version="12.0" enabled="true" update_project_code="true">
9798
<generated_project_files>
9899
<file path="board/clock_config.c" update_enabled="true"/>
99100
<file path="board/clock_config.h" update_enabled="true"/>
100101
</generated_project_files>
101102
<clocks_profile>
102-
<processor_version>13.0.2</processor_version>
103+
<processor_version>14.0.0</processor_version>
103104
</clocks_profile>
104105
<clock_configurations>
105106
<clock_configuration name="BOARD_BootClockRUN" id_prefix="" prefix_user_defined="false">

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@
2424
* This file is part of the TinyUSB stack.
2525
*/
2626

27+
#ifndef BOARD_MIMXRT1170_EVKB_H_
28+
#define BOARD_MIMXRT1170_EVKB_H_
2729

28-
#ifndef BOARD_H_
29-
#define BOARD_H_
30-
31-
// required since iMX RT10xx SDK include this file for board size
30+
// required since iMXRT MCUX-SDK include this file for board size
3231
#define BOARD_FLASH_SIZE (0x1000000U)
3332

3433
// LED: IOMUXC_GPIO_AD_04_GPIO9_IO03
@@ -45,4 +44,4 @@
4544
#define UART_PORT LPUART1
4645
#define UART_CLK_ROOT BOARD_BOOTCLOCKRUN_LPUART10_CLK_ROOT
4746

48-
#endif /* BOARD_H_ */
47+
#endif

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

Lines changed: 6 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 v11.0
14+
product: Clocks v12.0
1515
processor: MIMXRT1176xxxxx
1616
package_id: MIMXRT1176DVMAA
1717
mcu_data: ksdk2_0
18-
processor_version: 13.0.2
18+
processor_version: 14.0.1
1919
board: MIMXRT1170-EVKB
2020
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
2121

@@ -275,6 +275,7 @@ void BOARD_BootClockRUN(void)
275275
{
276276
clock_root_config_t rootCfg = {0};
277277

278+
#if !defined(SKIP_DCDC_CONFIGURATION) || (!SKIP_DCDC_CONFIGURATION)
278279
/* Set DCDC to DCM mode to improve the efficiency for light loading in run mode and transient performance with a big loading step. */
279280
DCDC_BootIntoDCM(DCDC);
280281

@@ -288,7 +289,8 @@ void BOARD_BootClockRUN(void)
288289
/* Set 1.125V for production samples to align with data sheet requirement */
289290
DCDC_SetVDD1P0BuckModeTargetVoltage(DCDC, kDCDC_1P0BuckTarget1P125V);
290291
}
291-
#endif
292+
#endif /* SKIP_DCDC_ADJUSTMENT */
293+
#endif /* SKIP_DCDC_CONFIGURATION */
292294

293295
#if !defined(SKIP_FBB_ENABLE) || (!SKIP_FBB_ENABLE)
294296
/* Check if FBB need to be enabled in OverDrive(OD) mode */
@@ -333,7 +335,7 @@ void BOARD_BootClockRUN(void)
333335

334336
/* Init OSC RC 400M */
335337
CLOCK_OSC_EnableOscRc400M();
336-
CLOCK_OSC_GateOscRc400M(true);
338+
CLOCK_OSC_GateOscRc400M(false);
337339

338340
/* Init OSC RC 48M */
339341
CLOCK_OSC_EnableOsc48M(true);

0 commit comments

Comments
 (0)