Skip to content

Commit 14145e4

Browse files
Update to SDK 2.1.2-develop (#2844)
Supercedes #2815 Move to pico-sdk official develop branch which includes a necessary IRQ header fix. 200MHz is now default for the Pico, but 133 is still available from the menus.
1 parent d9d556b commit 14145e4

36 files changed

+606
-589
lines changed

boards.txt

+582-582
Large diffs are not rendered by default.

cores/rp2040/main.cpp

+15-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "RP2040USB.h"
2323
#include <pico/stdlib.h>
2424
#include <pico/multicore.h>
25+
#include <hardware/vreg.h>
2526
#include <reent.h>
2627
#ifdef RP2350_PSRAM_CS
2728
#include "psram.h"
@@ -83,6 +84,16 @@ static struct _reent *_impure_ptr1 = nullptr;
8384

8485
extern "C" int main() {
8586
#if (defined(PICO_RP2040) && (F_CPU != 125000000)) || (defined(PICO_RP2350) && (F_CPU != 150000000))
87+
88+
#if defined(PICO_RP2040)
89+
// From runtime_init_clocks() to bump up RP2040 V for 200Mhz+ operation
90+
if ((F_CPU > 133000000) && (vreg_get_voltage() < VREG_VOLTAGE_1_15)) {
91+
vreg_set_voltage(VREG_VOLTAGE_1_15);
92+
// wait for voltage to settle; must use CPU cycles as TIMER is not yet clocked correctly
93+
busy_wait_at_least_cycles((uint32_t)((SYS_CLK_VREG_VOLTAGE_AUTO_ADJUST_DELAY_US * (uint64_t)XOSC_HZ) / 1000000));
94+
}
95+
#endif
96+
8697
#if defined(RP2350_PSRAM_CS) && (F_CPU > 150000000)
8798
// Need to increase the qmi divider before upping sysclk to ensure we keep the output sck w/in legal bounds
8899
psram_reinit_timing(F_CPU);
@@ -93,7 +104,9 @@ extern "C" int main() {
93104
*x ^= 0xff;
94105
asm volatile("" ::: "memory");
95106
#endif
107+
96108
set_sys_clock_khz(F_CPU / 1000, true);
109+
97110
#if defined(RP2350_PSRAM_CS) && (F_CPU < 150000000)
98111
psram_reinit_timing();
99112
// Per datasheet, need to do a dummy access and memory barrier before it takes effect
@@ -103,7 +116,8 @@ extern "C" int main() {
103116
*x ^= 0xff;
104117
asm volatile("" ::: "memory");
105118
#endif
106-
#endif
119+
120+
#endif // over/underclock
107121

108122
// Let rest of core know if we're using FreeRTOS
109123
__isFreeRTOS = initFreeRTOS ? true : false;

include/rp2040/pico_base/pico/version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#define PICO_SDK_VERSION_MAJOR 2
1515
#define PICO_SDK_VERSION_MINOR 1
16-
#define PICO_SDK_VERSION_REVISION 0
17-
#define PICO_SDK_VERSION_STRING "2.1.0"
16+
#define PICO_SDK_VERSION_REVISION 2
17+
#define PICO_SDK_VERSION_STRING "2.1.2-develop"
1818

1919
#endif

include/rp2350/pico_base/pico/version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#define PICO_SDK_VERSION_MAJOR 2
1515
#define PICO_SDK_VERSION_MINOR 1
16-
#define PICO_SDK_VERSION_REVISION 0
17-
#define PICO_SDK_VERSION_STRING "2.1.0"
16+
#define PICO_SDK_VERSION_REVISION 2
17+
#define PICO_SDK_VERSION_STRING "2.1.2-develop"
1818

1919
#endif

lib/rp2040/libipv4-big.a

1.74 KB
Binary file not shown.

lib/rp2040/libipv4-bt-big.a

203 KB
Binary file not shown.

lib/rp2040/libipv4-bt.a

203 KB
Binary file not shown.

lib/rp2040/libipv4-ipv6-big.a

1.74 KB
Binary file not shown.

lib/rp2040/libipv4-ipv6-bt-big.a

203 KB
Binary file not shown.

lib/rp2040/libipv4-ipv6-bt.a

203 KB
Binary file not shown.

lib/rp2040/libipv4-ipv6.a

1.74 KB
Binary file not shown.

lib/rp2040/libipv4.a

1.74 KB
Binary file not shown.

lib/rp2040/libpico.a

17.4 KB
Binary file not shown.

lib/rp2040/platform_inc.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
-iwithprefixbefore/pico-sdk/lib/btstack/src
1111
-iwithprefixbefore/pico-sdk/lib/btstack/3rd-party/bluedroid/decoder/include
1212
-iwithprefixbefore/pico-sdk/lib/btstack/3rd-party/bluedroid/encoder/include
13+
-iwithprefixbefore/pico-sdk/lib/btstack/3rd-party/yxml
1314
-iwithprefixbefore/pico-sdk/lib/btstack/platform/embedded
1415
-iwithprefixbefore/pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Device/RP2040/Include

0 commit comments

Comments
 (0)