How to Visually Tell New from Old Silicon?
Re: How to Visually Tell New from Old Silicon?
The getChipRevision function in Arduino has a bug, by the way, as it has "&& EFUSE_RD_CHIP_VER_RESERVE_V" instead of "& EFUSE_RD_CHIP_VER_RESERVE_V". Also, the 8-bit EFUSE_RD_CHIP_VER_RESERVE field is used to encode a bunch of different things.
Lower 3 bits encode the package (0 = D0WDQ6, 1 = D0WDQ5, 2 = D2WDQ5), next 4 bits are reserved, the MSB is used for silicon version (0 = rev0, 1 = rev1).
We will have a function to check the chip revision/package in IDF soon and the updated efuse_reg.h file with these bit fields.
Lower 3 bits encode the package (0 = D0WDQ6, 1 = D0WDQ5, 2 = D2WDQ5), next 4 bits are reserved, the MSB is used for silicon version (0 = rev0, 1 = rev1).
We will have a function to check the chip revision/package in IDF soon and the updated efuse_reg.h file with these bit fields.
Re: How to Visually Tell New from Old Silicon?
Ah, thank you Ivan,
now we get some more "new" details
we can test if the parcel delivery earliest next week ....
best wishes
rudi
btw "new" details:
Who always keeps such information back to the end,
The silicon vallery, the manufacturer, the developer, the "discoverer" .....
love this "Salami tactics"
now we get some more "new" details
we can test if the parcel delivery earliest next week ....
best wishes
rudi
btw "new" details:
Who always keeps such information back to the end,
The silicon vallery, the manufacturer, the developer, the "discoverer" .....
love this "Salami tactics"
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
-
- Posts: 20
- Joined: Wed Jul 27, 2016 7:34 am
Re: How to Visually Tell New from Old Silicon?
Thank you to both
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: How to Visually Tell New from Old Silicon?
Saw that piece of code being used in a driver, so I guess they are confident the method itself (which is similar to what rudi posted) works:
Source: https://github.com/espressif/esp-idf/bl ... clk.c#L133
Code: Select all
uint32_t is_rev0 = (GET_PERI_REG_BITS2(EFUSE_BLK0_RDATA3_REG, 1, 15) == 0);
Re: How to Visually Tell New from Old Silicon?
btw: LoLESP_igrr wrote:
The getChipRevision function in Arduino has a bug, by the way, as it has "&& EFUSE_RD_CHIP_VER_RESERVE_V" instead of "& EFUSE_RD_CHIP_VER_RESERVE_V". ....
https://github.com/espressif/arduino-es ... p.cpp#L120
Code: Select all
uint8_t EspClass::getChipRevision(void)
{
return (REG_READ(EFUSE_BLK0_RDATA3_REG) >> EFUSE_RD_CHIP_VER_RESERVE_S) && EFUSE_RD_CHIP_VER_RESERVE_V;
}
Code: Select all
int cpu_revission() {
return (REG_READ(EFUSE_BLK0_RDATA3_REG) >> EFUSE_RD_CHIP_VER_RESERVE_S) && EFUSE_RD_CHIP_VER_RESERVE_V;
}
One writes the same "error" from the other
More Interesting:
@Mike
the snippet code read register comes in esp-idf in past 14 days ( 2017 April 11 )
https://github.com/espressif/esp-idf/co ... b9e4abR133
the arduino got this "error" version on 2017 Feb 23 by "third party"
- added function to retrieve chip revision from eFuse
https://github.com/espressif/arduino-es ... 32/Esp.cpp
...
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: How to Visually Tell New from Old Silicon?
I pushed a PR
https://github.com/espressif/arduino-esp32/pull/704
May the efuse be changed ?
I mean, can a fraudolent seller change the efuse bit and so sell old rev 0 for a rev 1 ?
https://github.com/espressif/arduino-esp32/pull/704
May the efuse be changed ?
I mean, can a fraudolent seller change the efuse bit and so sell old rev 0 for a rev 1 ?
Re: How to Visually Tell New from Old Silicon?
Reading through exposed APIs, I seem to find an ESP-IDF API called "esp_chip_info" which now reports a variety of items include:
* model
* features
* number of cores
* revision
I believe the revision fields is the silicon revision described in this post. This is a high level API and is probably more consumable that some of the other bit twiddlings.
* model
* features
* number of cores
* revision
I believe the revision fields is the silicon revision described in this post. This is a high level API and is probably more consumable that some of the other bit twiddlings.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: How to Visually Tell New from Old Silicon?
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/
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
which gives me
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
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
So i'm guessing the chip_version bitfield is bit 15:12, not 12:9
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) ;
}
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() {
}
Code: Select all
EFUSE_BLK0_RDATA3_REG = 00008000
Chip revision = 0
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)
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
Re: How to Visually Tell New from Old Silicon?
For those who might be confused (like I was), here are the respective expected outputs as of 19th July 2018. Unfortunately I don't have a v0 chip to compare, but I presume the below all indicate that mine is a v1.
From instructables, after using the new shift globals:
result:
From espefuse.py:
From esptool.py chip_info:
From instructables, after using the new shift globals:
Code: Select all
int getChipRevision()
{
return (REG_READ(EFUSE_BLK0_RDATA3_REG) >> (EFUSE_CHIP_VER_REV1_S)&&EFUSE_CHIP_VER_REV1_V) ;
}
Code: Select all
REG_READ(EFUSE_BLK0_RDATA3_REG) 1010000000000000
EFUSE_CHIP_VER_REV1_S 1111
EFUSE_CHIP_VER_REV1_V 1
Chip Revision (official version): 1
Chip Revision from shift Opration 1
Code: Select all
Identity fuses:
MAC MAC Address
= aa:aa:aa:aa:aa:aa (CRC 23 OK) R/W
CHIP_VER_REV1 Silicon Revision 1 = 1 R/W (0x1)
CHIP_VERSION Reserved for future chip versions = 2 R/W (0x2)
CHIP_PACKAGE Chip package identifier = 0 R/W (0x0)
Code: Select all
esptool.py v2.5.0
Serial port COM3
Connecting........__
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse
MAC: aa:aa:aa:aa:aa:aa
Uploading stub...
Running stub...
Stub running...
Warning: ESP32 has no Chip ID. Reading MAC instead.
MAC: aa:aa:aa:aa:aa:aa
Hard resetting via RTS pin...
Re: How to Visually Tell New from Old Silicon?
yep, the actually merged function use this method, so now the getChipRevision() return the correct hw revisionkolban wrote:Reading through exposed APIs, I seem to find an ESP-IDF API called "esp_chip_info" which now reports a variety of items include:
* model
* features
* number of cores
* revision
I believe the revision fields is the silicon revision described in this post. This is a high level API and is probably more consumable that some of the other bit twiddlings.
https://github.com/espressif/arduino-esp32/pull/704
Who is online
Users browsing this forum: No registered users and 86 guests