Skip to content

Commit 838c702

Browse files
committed
RP2040: correct system clock frequency to fix delay()
1 parent 64bf2aa commit 838c702

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From 8ccd98f8d597f315f33fbe943f5a8c5f8d0e28d1 Mon Sep 17 00:00:00 2001
2+
From: Martino Facchin <m.facchin@arduino.cc>
3+
Date: Mon, 6 Dec 2021 12:02:28 +0100
4+
Subject: [PATCH] RP2040: correct system clock frequency
5+
6+
Fixes https://github.com/arduino/ArduinoCore-mbed/issues/271
7+
---
8+
.../TARGET_RP2040/TARGET_NANO_RP2040_CONNECT/board.c | 2 +-
9+
.../TARGET_RP2040/TARGET_RASPBERRY_PI_PICO/board.c | 2 +-
10+
2 files changed, 2 insertions(+), 2 deletions(-)
11+
12+
diff --git a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/TARGET_NANO_RP2040_CONNECT/board.c b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/TARGET_NANO_RP2040_CONNECT/board.c
13+
index 1f775638f9..b9ad1319af 100644
14+
--- a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/TARGET_NANO_RP2040_CONNECT/board.c
15+
+++ b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/TARGET_NANO_RP2040_CONNECT/board.c
16+
@@ -1,3 +1,3 @@
17+
#include "PinNames.h"
18+
19+
-uint32_t SystemCoreClock = 120000000;
20+
\ No newline at end of file
21+
+uint32_t SystemCoreClock = 125000000;
22+
\ No newline at end of file
23+
diff --git a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/TARGET_RASPBERRY_PI_PICO/board.c b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/TARGET_RASPBERRY_PI_PICO/board.c
24+
index 1f775638f9..b9ad1319af 100644
25+
--- a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/TARGET_RASPBERRY_PI_PICO/board.c
26+
+++ b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/TARGET_RASPBERRY_PI_PICO/board.c
27+
@@ -1,3 +1,3 @@
28+
#include "PinNames.h"
29+
30+
-uint32_t SystemCoreClock = 120000000;
31+
\ No newline at end of file
32+
+uint32_t SystemCoreClock = 125000000;
33+
\ No newline at end of file
34+
--
35+
2.34.1
36+

0 commit comments

Comments
 (0)