Search found 27 matches

by dovoto
Fri Aug 19, 2022 7:51 pm
Forum: ESP-IDF
Topic: Flash encryption - flashing pre-encrypted app.bin
Replies: 12
Views: 14359

Re: Flash encryption - flashing pre-encrypted app.bin

Hi, I actually have a question related to this point. Regarding the first boot for flash encryption, are there any disadvantages to the following workflow? For the record, I am using ESP-IDF v3.2. Generate flash encryption key, write to eFuse Set FLASH_CRYPT_CNT to 1, FLASH_CRYPT_CONFIG to 15, set ...
by dovoto
Fri Apr 22, 2022 10:27 pm
Forum: ESP-IDF
Topic: ESP 32 Restart
Replies: 2
Views: 2336

Re: ESP 32 Restart

For those that stumble on this same issue, the above solution worked (we increased the timeout, set a global reset pending flag so other threads knew not to start doing things like write to flash (or feed the rtc), added a vtaskdelay to give other tasks time to complete, and then put the thread prio...
by dovoto
Fri Apr 22, 2022 12:27 am
Forum: ESP-IDF
Topic: ESP 32 Restart
Replies: 2
Views: 2336

Re: ESP 32 Restart

I am going to try something like the following...ill update if it works system_reset() { rtc_wdt_protect_off(); rtc_wdt_set_stage(RTC_WDT_STAGE0, RTC_WDT_STAGE_ACTION_RESET_SYSTEM); rtc_wdt_set_time(RTC_WDT_STAGE0, 100); rtc_wdt_enable(); rtc_wdt_protect_on(); }
by dovoto
Thu Apr 21, 2022 11:44 pm
Forum: ESP-IDF
Topic: ESP 32 Restart
Replies: 2
Views: 2336

ESP 32 Restart

We are getting some odd results restarting the ESP 32 after an OTA. It seems like some peripherals are not reset (wifi, ble, spi, uart etc as described in the docs) However, sometimes after an OTA erasing flash sectors appears to not work (about 50 % of the time erase returns success but reading the...
by dovoto
Thu Mar 31, 2022 5:00 pm
Forum: ESP-IDF
Topic: Invalid Header when enabling flash encryption
Replies: 4
Views: 4466

Re: Invalid Header when enabling flash encryption

Update: The problem seems to have solved itself while I slept...I dont know that I did anything differently than I was doing last night but maybe a more attentive build (moving partition table and ensuring the flash address lined up) and adding the erase flash immediately before the command to flash...
by dovoto
Thu Mar 31, 2022 6:28 am
Forum: ESP-IDF
Topic: Invalid Header when enabling flash encryption
Replies: 4
Views: 4466

Re: Invalid Header when enabling flash encryption

I should clarify that I can erase the flash and put the original firmware (with encryption not set in menu config) and it boots up and works fine.
by dovoto
Thu Mar 31, 2022 5:17 am
Forum: ESP-IDF
Topic: Invalid Header when enabling flash encryption
Replies: 4
Views: 4466

Re: Invalid Header when enabling flash encryption

Detecting chip type... ESP32 espefuse.py v3.0 EFUSE_NAME (Block) Description = [Meaningful Value] [Readable/Writeable] (Hex Value) ---------------------------------------------------------------------------------------- Calibration fuses: BLK3_PART_RESERVE (BLOCK0): BLOCK3 partially served for ADC ...
by dovoto
Thu Mar 31, 2022 4:37 am
Forum: ESP-IDF
Topic: Invalid Header when enabling flash encryption
Replies: 4
Views: 4466

Invalid Header when enabling flash encryption

I am trying to enable flash encryption (without secure boot). Wrover E (16MB flash, 8MB spiram) with the aws freertos esp tool chain. I have moved the partition table to 0xA000 and verified the system flashes and boots correctly (to make room for the bootloader). I then did a menuconfig to set the e...
by dovoto
Wed Feb 23, 2022 6:05 pm
Forum: General Discussion
Topic: Wear leveling
Replies: 4
Views: 3651

Wear leveling

I have a 64 bit value I need to write to flash every 15 minutes and I need to do this over a 15 year product lifetime. This value will never be zero or all FFs. What is the best way to wear level? My plan is to use the spi flash api, erase a block (say 64k) write sequentially for 1000 writes, then e...
by dovoto
Fri Jan 28, 2022 8:17 pm
Forum: ESP-IDF
Topic: CMAKE and compiler defines
Replies: 2
Views: 4787

Re: CMAKE and compiler defines

Things like add_compile_options and add_compile_definitions have to come before the "project" statement. Thanks! cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) add_compile_definitions( "DO_THING_A" "ENABLE_AWESOMENESS" ) project(my_amazing_project) message(STA...