Skip to content

Commit 0b6c451

Browse files
committed
Add Overclocking Warnings to Processor.c
1 parent fd41c1a commit 0b6c451

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ports/mimxrt10xx/common-hal/microcontroller/Processor.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ uint32_t common_hal_mcu_processor_set_frequency(mcu_processor_obj_t *self,
5757
if (frequency < 24000000 || frequency > 1008000000) {
5858
mp_raise_ValueError(translate("Frequency Out of Range Must be between 24Mhz and 1.008Ghz"));
5959
}
60+
if (frequency <= 600000000) {
61+
mp_printf(&mp_plat_print, "System Clock is set to %d hz\n", frequency);
62+
}
63+
if (frequency > 600000000) {
64+
mp_printf(&mp_plat_print, "System Clock is set to %d hz and is Overclocked\n", frequency);
65+
}
66+
if (frequency > 816000000) {
67+
mp_printf(&mp_plat_print, "System Clock is set to %d hz and is Overclocked, Cooling Required!\n", frequency);
68+
}
6069
SystemCoreClock = setarmclock(frequency);
6170
return SystemCoreClock;
6271
}

0 commit comments

Comments
 (0)