I purchased a WROOM32 module a month ago after reading some reviews from buyers that mentioned they had received a rev 1 chip.
Looking for code to check the revision, I found Arduino code on instructables (and the same in a youtube video series on the ESP32)
http://www.instructables.com/id/How-to- ... our-ESP32/
Code: Select all
int getChipRevision()
{
return (REG_READ(EFUSE_BLK0_RDATA3_REG) >> (EFUSE_RD_CHIP_VER_RESERVE_S)&&EFUSE_RD_CHIP_VER_RESERVE_V) ;
}
I run this and it returns a chip revision of 0. Am pissed off, but then see that the code is obviously wrong - it's using a logical && instead of a bitmask &.
RTFM right ? So I downloaded the latest TRM and in Table 64, I see that the bitfield chip_version is in bits 12:9 of register EFUSE_BLK0_RDATA3_REG
So I run my own arduino code
Code: Select all
#include "soc/efuse_reg.h"
void setup() {
Serial.begin(115200);
uint32_t reg = REG_READ(EFUSE_BLK0_RDATA3_REG);
Serial.printf("\r\nEFUSE_BLK0_RDATA3_REG = %08X\r\n", reg );
uint8_t chipRevision = (uint8_t)((REG_READ(EFUSE_BLK0_RDATA3_REG) >> 9 ) & 0x0F);
Serial.printf("Chip revision = %X\r\n" , chipRevision );
}
void loop() {
}
which gives me
Code: Select all
EFUSE_BLK0_RDATA3_REG = 00008000
Chip revision = 0
Still pissed off that I have a rev 0 chip. But I then find this page
https://github.com/espressif/esptool/issues/206
and on running 'python espefuse.py -p COM4 summary' I get the result
Code: Select all
CHIP_VERSION Chip version = 8 R/W (0x8)
CHIP_PACKAGE Chip package identifier = 0 R/W (0x0)
which tells me (phew) that I do have a ESP32-D0WDQ6 silicon revision 1 chip.
On running espefuse.py with a WROOM32 module I purchased last year, I found that it is a revision 0 chip, and my code returns
Code: Select all
EFUSE_BLK0_RDATA3_REG = 00000000
Chip revision = 0
So i'm guessing the chip_version bitfield is bit 15:12, not 12:9