Skip to content

Commit a3d3712

Browse files
committed
Fix PSRAM address
1 parent f357f4a commit a3d3712

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ports/espressif/common-hal/espidf/__init__.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,15 @@ size_t common_hal_espidf_get_total_psram(void) {
108108

109109
intptr_t common_hal_espidf_get_psram_start(void) {
110110
#ifdef CONFIG_SPIRAM
111-
if (esp_psram_is_initialized()) {
112-
return SOC_EXTRAM_DATA_LOW;
113-
}
111+
return (intptr_t)esp_psram_get_address();
114112
#endif
115113
return 0;
116114
}
117115

118116
intptr_t common_hal_espidf_get_psram_end(void) {
119117
#ifdef CONFIG_SPIRAM
120118
if (esp_psram_is_initialized()) {
121-
return SOC_EXTRAM_DATA_LOW + psram_size_usable();
119+
return common_hal_espidf_get_psram_start() + psram_size_usable();
122120
}
123121
#endif
124122
return 0;

0 commit comments

Comments
 (0)