using efuse BLK3

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

using efuse BLK3

Postby mzimmers » Thu Sep 27, 2018 9:33 pm

Hi all -

I need to permanently store a bit of data (s/n and our company-assigned MAC address) in our ESP32-based products. From the docs, it seems as though I could use BLK3 for this. But I've looked at a few units, and they already have something stored right in the middle of BLK3:

Code: Select all

BLK1                   Flash encryption key
  = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLK2                   Secure boot key
  = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLK3                   Variable Block 3
  = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f2 81 f3 82 00 00 00 00 00 00 00 00 00 00 00 00 R/W
I'm fairly sure I didn't put this in there. Can someone tell me where this came from? Is it OK if I write to the other bytes in this block?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: using efuse BLK3

Postby WiFive » Fri Sep 28, 2018 4:00 am


ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: using efuse BLK3

Postby ESP_Dazz » Fri Sep 28, 2018 9:29 am

Some WROVER modules were shipped with Two Point ADC Calibration Values burned into BLK3. These modules will also have their coding scheme changed (see related topic) and should also have set the EFUSE_BLK3_PART_RESERVE bit located in block 0 (see Technical Reference Manual).

Just to double check this is the case, please try running the espefuse.py tool located in the esptool_py component of ESP-IDF. You should get something similar to the following

Code: Select all

$ python espefuse.py adc_info
espefuse.py v2.5.0
Connecting....
ADC VRef calibration: 1149mV
ADC readings stored in efuse BLK3:
    ADC1 Low reading  (150mV): 306
    ADC1 High reading (850mV): 3153
    ADC2 Low reading  (150mV): 389
    ADC2 High reading (850mV): 3206

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: using efuse BLK3

Postby mzimmers » Fri Sep 28, 2018 2:22 pm

Hi ESP_Dazz - yes, that appears to be the case with my chips. So, I can still use the other portions of BLK3 right?

We're only building prototypes right now, so this isn't a big deal, but hopefully any new devices we order won't have BLK3 used.

Thanks for the answer.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: using efuse BLK3

Postby WiFive » Fri Sep 28, 2018 4:59 pm

Well in 3/4 encoding there are only 192 bits per block and with blk3 part reserve 48 are reserved so you should be able to use the other 144 bits (which are also non contiguous) but you have to program them pre-encoded which I don't think espefuse supports.

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: using efuse BLK3

Postby mzimmers » Fri Sep 28, 2018 10:49 pm

OK, so I need some chips where BLK3 is fully available to me.

I don't need to use espefuse.py for programming this efuse; I can write a small program to do it. I can't find much on this 3/4 encoding, so I'm not sure I understand it. What is its purpose? It looks a little like something we used to call "Gray code."

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: using efuse BLK3

Postby WiFive » Fri Sep 28, 2018 11:43 pm

It is described in the TRM and I believe it is just an error correcting code not sure if efuse is prone to bit errors or what

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: using efuse BLK3

Postby ESP_Dazz » Sun Sep 30, 2018 9:59 am

mzimmers wrote:OK, so I need some chips where BLK3 is fully available to me.
With regards to getting refuned/replacement/specific order requirements, I suggest you contact sales@espressif.com

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: using efuse BLK3

Postby mzimmers » Sun Sep 30, 2018 2:56 pm

Hi Dazz - thanks for the suggestion, but that's not necessary. As I mentioned we only have a few units, and they're all prototypes, so I ca n use them as they are. What I meant was that when we place a production order I'll have to be sure that I get units that aren't pre-programmed.

Right now, though, my concern is whether I can use the remaining space in BLK3. I'll do some experimentation and report back.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: using efuse BLK3

Postby ESP_Angus » Mon Oct 01, 2018 5:32 am

mzimmers wrote: Right now, though, my concern is whether I can use the remaining space in BLK3. I'll do some experimentation and report back.
This can't be done easily at the moment. Support is being added right now, so something should be available in ESP-IDF very soon.

Who is online

Users browsing this forum: No registered users and 83 guests