[rtems commit] bsps/imxrt: Make chip start code chip specific
Christian Mauderer
christianm at rtems.org
Mon May 22 07:32:20 UTC 2023
Module: rtems
Branch: master
Commit: c1a949745f9dfc35e633daf39fad746ba968e56b
Changeset: http://git.rtems.org/rtems/commit/?id=c1a949745f9dfc35e633daf39fad746ba968e56b
Author: Christian Mauderer <christian.mauderer at embedded-brains.de>
Date: Thu May 4 14:55:24 2023 +0200
bsps/imxrt: Make chip start code chip specific
Some parts of the startup code don't apply for all chips. Make that part
chip specific.
---
bsps/arm/imxrt/start/bspstart.c | 4 ++++
bsps/arm/imxrt/start/bspstarthooks.c | 2 ++
2 files changed, 6 insertions(+)
diff --git a/bsps/arm/imxrt/start/bspstart.c b/bsps/arm/imxrt/start/bspstart.c
index a2c73c74bf..7398ffbe73 100644
--- a/bsps/arm/imxrt/start/bspstart.c
+++ b/bsps/arm/imxrt/start/bspstart.c
@@ -47,6 +47,7 @@ uint32_t imxrt_systick_frequency(void)
static void imxrt_disable_wait_mode(void)
{
+#if IMXRT_IS_MIMXRT10xx
/*
* Prevent processor from entering WAIT or SLEEP mode when a WFI is executed.
* This would switch off the normal interrupt controller and activate an
@@ -58,6 +59,9 @@ static void imxrt_disable_wait_mode(void)
* every WFI.
*/
CLOCK_SetMode(kCLOCK_ModeRun);
+#else
+ #error Disabling wait mode not implemented for this chip.
+#endif
}
void bsp_start(void)
diff --git a/bsps/arm/imxrt/start/bspstarthooks.c b/bsps/arm/imxrt/start/bspstarthooks.c
index f9c4299ad7..4814373641 100644
--- a/bsps/arm/imxrt/start/bspstarthooks.c
+++ b/bsps/arm/imxrt/start/bspstarthooks.c
@@ -58,9 +58,11 @@ BSP_START_TEXT_SECTION void bsp_start_hook_1(void)
BOARD_BootClockRUN();
BOARD_InitDEBUG_UARTPins();
+#if IMXRT_IS_MIMXRT10xx
/* Reduce frequency for I2C */
CLOCK_SetDiv(kCLOCK_Lpi2cDiv, 5);
/* Enable EDMA clock. We initialize the EDMA so we need the clock. */
CLOCK_EnableClock(kCLOCK_Dma);
+#endif
}
More information about the vc
mailing list