Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion ulisp-arm-comments.ino
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ const char LispLibrary[] = "";
#define CPU_RP2350

#elif defined(ARDUINO_ADAFRUIT_FRUITJAM_RP2350)
// #define BOARD_HAS_PSRAM /* Uncomment to use PSRAM */
#define BOARD_HAS_PSRAM /* Enable 8MB PSRAM → 1M Lisp objects */
#if defined(BOARD_HAS_PSRAM)
#undef MEMBANK
#define MEMBANK PSRAM
Expand Down Expand Up @@ -9989,6 +9989,16 @@ void setup () {
Serial.begin(9600);
int start = millis();
while ((millis() - start) < 5000) { if (Serial) break; }
#if defined(ARDUINO_ADAFRUIT_FRUITJAM_RP2350) && defined(BOARD_HAS_PSRAM)
// The DVHSTX library's global constructor (init_priority 101) changes clk_sys
// from 125 MHz to 240 MHz AFTER the Arduino core's PSRAM init ran at 125 MHz.
// The PSRAM QMI timing (divisor, rxdelay) must be recalculated for the actual
// clock speed, otherwise PSRAM SCK = 240/2 = 120 MHz exceeds the 109 MHz max.
{
extern void psram_reinit_timing(uint32_t hz);
psram_reinit_timing(0); // 0 = auto-detect current clk_sys
}
#endif
initworkspace();
initenv();
initsleep();
Expand Down
12 changes: 11 additions & 1 deletion ulisp-arm.ino
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ const char LispLibrary[] = "";
#define CPU_RP2350

#elif defined(ARDUINO_ADAFRUIT_FRUITJAM_RP2350)
// #define BOARD_HAS_PSRAM /* Uncomment to use PSRAM */
#define BOARD_HAS_PSRAM /* Enable 8MB PSRAM → 1M Lisp objects */
#if defined(BOARD_HAS_PSRAM)
#undef MEMBANK
#define MEMBANK PSRAM
Expand Down Expand Up @@ -8456,6 +8456,16 @@ void setup () {
Serial.begin(9600);
int start = millis();
while ((millis() - start) < 5000) { if (Serial) break; }
#if defined(ARDUINO_ADAFRUIT_FRUITJAM_RP2350) && defined(BOARD_HAS_PSRAM)
// The DVHSTX library's global constructor (init_priority 101) changes clk_sys
// from 125 MHz to 240 MHz AFTER the Arduino core's PSRAM init ran at 125 MHz.
// The PSRAM QMI timing (divisor, rxdelay) must be recalculated for the actual
// clock speed, otherwise PSRAM SCK = 240/2 = 120 MHz exceeds the 109 MHz max.
{
extern void psram_reinit_timing(uint32_t hz);
psram_reinit_timing(0); // 0 = auto-detect current clk_sys
}
#endif
initworkspace();
initenv();
initsleep();
Expand Down