Skip to content

Commit 6599f20

Browse files
authored
PSRAM availability for ESP32S3 is now properly shown (#299)
***NO_CI***
1 parent f7b45e3 commit 6599f20

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

nanoFirmwareFlasher.Library/EspTool.cs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,21 @@ public Esp32DeviceInfo GetDeviceDetails(
249249
}
250250
else if (_chipType == "esp32s3")
251251
{
252-
// For now assuming all S3 have PSRAM.
253-
// TODO: following https://github.com/espressif/esptool/issues/970
254-
// The download mode register is not cleared so a reset/run command does not work on the S3. We should retest this after depending on what will be the fix for that issue.
255-
psramIsAvailable = PSRamAvailability.Undetermined;
252+
// check device features for PSRAM mention and size
253+
// features should look like this: "Features WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)"
254+
255+
Regex regex = new(@"Embedded PSRAM (?<size>\d+)MB");
256+
257+
Match psRamMatch = regex.Match(features);
258+
if (psRamMatch.Success)
259+
{
260+
psRamSize = int.Parse(psRamMatch.Groups["size"].Value);
261+
psramIsAvailable = PSRamAvailability.Yes;
262+
}
263+
else
264+
{
265+
psramIsAvailable = PSRamAvailability.No;
266+
}
256267
}
257268
else
258269
{

0 commit comments

Comments
 (0)