Page 1 of 2

using efuse BLK3

Posted: Thu Sep 27, 2018 9:33 pm
by mzimmers
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?

Re: using efuse BLK3

Posted: Fri Sep 28, 2018 4:00 am
by WiFive

Re: using efuse BLK3

Posted: Fri Sep 28, 2018 9:29 am
by ESP_Dazz
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

Re: using efuse BLK3

Posted: Fri Sep 28, 2018 2:22 pm
by mzimmers
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.

Re: using efuse BLK3

Posted: Fri Sep 28, 2018 4:59 pm
by WiFive
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.

Re: using efuse BLK3

Posted: Fri Sep 28, 2018 10:49 pm
by mzimmers
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."

Re: using efuse BLK3

Posted: Fri Sep 28, 2018 11:43 pm
by WiFive
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

Re: using efuse BLK3

Posted: Sun Sep 30, 2018 9:59 am
by ESP_Dazz
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

Re: using efuse BLK3

Posted: Sun Sep 30, 2018 2:56 pm
by mzimmers
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.

Re: using efuse BLK3

Posted: Mon Oct 01, 2018 5:32 am
by ESP_Angus
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.