Search found 312 matches

by mzimmers
Wed Apr 17, 2019 3:14 am
Forum: ESP32 IDF
Topic: (resolved) is there a way to make a function uninterruptible?
Replies: 10
Views: 661

Re: is there a way to make a function uninterruptible?

Oh duh...I should have seen that.

I may have multiple problems...sometimes I get heap poisoning messages. But I have a telltale that should print if there's less than 1K heap left at the top of this routine.
by mzimmers
Wed Apr 17, 2019 2:39 am
Forum: ESP32 IDF
Topic: (resolved) is there a way to make a function uninterruptible?
Replies: 10
Views: 661

Re: is there a way to make a function uninterruptible?

Oh...that's good to know. Does a WDT expiration manifest as a panic?

I don't think I'm spending 300ms in this routine anyway, but I'll take a closer look in the morning.
by mzimmers
Tue Apr 16, 2019 9:15 pm
Forum: ESP32 IDF
Topic: (resolved) is there a way to make a function uninterruptible?
Replies: 10
Views: 661

Re: is there a way to make a function uninterruptible?

Yes, that's exactly what I did.

Code: Select all

    portMUX_TYPE mutex = portMUX_INITIALIZER_UNLOCKED;
    taskENTER_CRITICAL(&mutex);
    taskEXIT_CRITICAL(&mutex);
by mzimmers
Tue Apr 16, 2019 7:57 pm
Forum: ESP32 IDF
Topic: (resolved) I2C call panicking system
Replies: 29
Views: 1868

Re: I2C call panicking system

Still working on producing a minimal example. I have made a little progress, though. I have a passage of code that uses the I2C device four times: uint16_t Max77818::getBatteryRepCap() { uint16_t percent = 0; uint16_t sample; readReg(MAX77818_ADDR_FUELGAUGE, MAX77818_REG_FUELGAUGE_REPCAP, &sample); ...
by mzimmers
Tue Apr 16, 2019 7:43 pm
Forum: ESP32 IDF
Topic: (resolved) is there a way to make a function uninterruptible?
Replies: 10
Views: 661

Re: is there a way to make a function uninterruptible?

I added the FreeRTOS critical calls, and now I'm getting this on startup: Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0) Core 0 register dump: PC : 0x40093184 PS : 0x00060934 A0 : 0x800919b7 A1 : 0x3ffb6080 A2 : 0x3ffb8724 A3 : 0x3ffb6394 A4 : 0x3ffbdda8 A5 : 0x00000001 A6 : ...
by mzimmers
Tue Apr 16, 2019 6:08 pm
Forum: ESP32 IDF
Topic: (resolved) is there a way to make a function uninterruptible?
Replies: 10
Views: 661

Re: is there a way to make a function uninterruptible?

Excellent...thanks. The wording in the FreeRTOS doc is a little odd: Calls to taskENTER_CRITICAL() and taskEXIT_CRITICAL() are designed to nest. Therefore, a critical section will only be exited when one call to taskEXIT_CRITICAL() has been executed for every preceding call to taskENTER_CRITICAL(). ...
by mzimmers
Tue Apr 16, 2019 5:42 pm
Forum: ESP32 IDF
Topic: (resolved) is there a way to make a function uninterruptible?
Replies: 10
Views: 661

(resolved) is there a way to make a function uninterruptible?

Hi all -

I'm still contending with an I2C library issue that causes my app to crash. I'm wondering whether there is a compiler option for making a particular function uninterruptible. (The keyword "atomic" is used in other IDEs.) Does anyone know of such an option?

Thanks...
by mzimmers
Thu Apr 04, 2019 1:49 am
Forum: ESP32 IDF
Topic: (resolved) I2C call panicking system
Replies: 29
Views: 1868

Re: I2C call panicking system

OK, I'll try to put something together. It might take a little time, given that the I2C portion of my app was the last thing I added, but I'll see what I can do. Thanks, Sprite.
by mzimmers
Wed Apr 03, 2019 2:01 pm
Forum: ESP32 IDF
Topic: (resolved) I2C call panicking system
Replies: 29
Views: 1868

Re: I2C call panicking system

Hi Sprite - I agree, except that I don't think it's "my" code...I think that's exactly the error that's occurring in the I2C library. It seems likely that the call to esp_intr_free() is what's causing the panic. The bigger question, though, is...what is Espressif going to do about it? This is kind o...
by mzimmers
Wed Apr 03, 2019 1:57 pm
Forum: ESP32 IDF
Topic: (resolved) I2C malloc error
Replies: 11
Views: 1192

Re: I2C malloc error

Hi Sprite - I did have pull-ups, but they were about half the 3.3K recommended by the other article. I replaced them, and it didn't change anything.

Something is definitely wrong here...the prevalence of articles on this subject suggests a bug in the I2C library, at least to me.

Go to advanced search