Search found 35 matches

by Jimis1
Mon Apr 15, 2024 4:15 pm
Forum: General Discussion
Topic: Flash write/read issue
Replies: 6
Views: 1498

Re: Flash write/read issue

ok found the problem.

I was trying to use the nvs functions too fast before they had time to initialize (facepalm), so I set the same delay right after them

Thanks a lot!


Screenshot_4.jpg
Screenshot_4.jpg (73.47 KiB) Viewed 1179 times
by Jimis1
Mon Apr 15, 2024 4:08 pm
Forum: General Discussion
Topic: Flash write/read issue
Replies: 6
Views: 1498

Re: Flash write/read issue

Thanks ESP_adokitkat.

It worked with a delay 900ms not less ! The volatile didn't do anything.

There's clearly something very wrong here. I don't suppose I need to wait 900ms before I call my function!


Screenshot_3.jpg
Screenshot_3.jpg (73.44 KiB) Viewed 1190 times
by Jimis1
Sun Apr 14, 2024 8:08 am
Forum: General Discussion
Topic: Flash write/read issue
Replies: 6
Views: 1498

Re: Flash write/read issue

No, the code executes once before the main loop. I realized I have this problem only in the first flash of the ESP. If I reset it works ok. The following is between resets. This is repeating which is ok Screenshot_1.jpg Screenshot_2.jpg Ofc this is not solving my problem cause it's the first flash t...
by Jimis1
Sat Apr 13, 2024 8:55 am
Forum: General Discussion
Topic: Flash write/read issue
Replies: 6
Views: 1498

Flash write/read issue

Hi, I have been banging my head over the following. I have setup some functions to read and write to Flash which seem to work fine. But when I try to check the values of a global variable in flash compared to another global variable in RAM I have a problem. Before I even set the flash variable it is...
by Jimis1
Wed Mar 13, 2024 12:53 pm
Forum: General Discussion
Topic: 1-Wire example problem
Replies: 2
Views: 1509

Re: 1-Wire example problem

Yeap, stupid mistake I had mistakenly soldered a 100nF in Data line instead of 33pF
by Jimis1
Sun Mar 10, 2024 12:14 pm
Forum: General Discussion
Topic: How to detect ESP restart from upgrade
Replies: 7
Views: 2866

Re: How to detect ESP restart from upgrade

Thanks all ! I will have to implement one of the above :)
by Jimis1
Sun Mar 10, 2024 12:13 pm
Forum: General Discussion
Topic: ESP32 - nvs pointer issue
Replies: 4
Views: 2003

Re: ESP32 - nvs pointer issue

Thanks ESP_adokitkat :)
by Jimis1
Sun Mar 10, 2024 12:06 pm
Forum: General Discussion
Topic: 1-Wire example problem
Replies: 2
Views: 1509

1-Wire example problem

Hi, I'm trying to setup a DS18B20 thermometer and use the 1Wire library from here https://github.com/espressif/esp-idf/tree/c460e1c/examples/peripherals/rmt/onewire My hardware setup is with a pull-up 4k7 like it suggests and I assume it's ok. I can't read the thermometer, I get the errors E (77649)...
by Jimis1
Tue Mar 05, 2024 8:45 am
Forum: General Discussion
Topic: How to detect ESP restart from upgrade
Replies: 7
Views: 2866

Re: How to detect ESP restart from upgrade

Yes I have thought of that, but I was looking for something non-user dependent (during testing you don't change versions all the time). If there is no other way I will do it this way, I just thought that it should work this way For example ATMEL μCs have a register that defines the reason of a reset...
by Jimis1
Tue Mar 05, 2024 7:32 am
Forum: General Discussion
Topic: How to detect ESP restart from upgrade
Replies: 7
Views: 2866

How to detect ESP restart from upgrade

Hi I'm trying to check whether the ESP has reset from an upgrade (USB or OTA) to reset my "reset_counter" variable which is stored in flash. I tried to detect that from the response from the function nvs_get(). If I get a "value not initialized" then it means I had a code upgrade and I should reset ...