Skip to content

Commit 8dc0c86

Browse files
Testatome-no-dev
authored andcommitted
Chip revision fix (#704)
* Chip revision fix https://www.esp32.com/viewtopic.php?f=2&t=1358&sid=f77cd62ec254317f3bbb30d8ab75ca2a&start=10 * using of esp_chip_info instead of register reading
1 parent 3b972e8 commit 8dc0c86

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: cores/esp32/Esp.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ uint32_t EspClass::getFreeHeap(void)
119119

120120
uint8_t EspClass::getChipRevision(void)
121121
{
122-
return (REG_READ(EFUSE_BLK0_RDATA3_REG) >> EFUSE_RD_CHIP_VER_RESERVE_S) && EFUSE_RD_CHIP_VER_RESERVE_V;
122+
esp_chip_info_t chip_info;
123+
esp_chip_info(&chip_info);
124+
return chip_info.revision;
123125
}
124126

125127
const char * EspClass::getSdkVersion(void)

0 commit comments

Comments
 (0)