Search found 643 matches
- Wed Apr 17, 2019 5:25 pm
- Forum: ESP-IDF
- Topic: (resolved) I2C call panicking system
- Replies: 29
- Views: 27117
Re: I2C call panicking system
Hi Fly - here's the prototype: esp_err_t readReg(uint8_t devAddr, uint8_t regAddr, uint16_t *data); As I was preparing to produce a minimal example, a thought occurred to me. I moved the code that caused the problem to the top of my app_main(), and it works. I now believe that I may be running out o...
- Wed Apr 17, 2019 3:14 am
- Forum: ESP-IDF
- Topic: (resolved) is there a way to make a function uninterruptible?
- Replies: 10
- Views: 11906
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.
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.
- Wed Apr 17, 2019 2:39 am
- Forum: ESP-IDF
- Topic: (resolved) is there a way to make a function uninterruptible?
- Replies: 10
- Views: 11906
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.
I don't think I'm spending 300ms in this routine anyway, but I'll take a closer look in the morning.
- Tue Apr 16, 2019 9:15 pm
- Forum: ESP-IDF
- Topic: (resolved) is there a way to make a function uninterruptible?
- Replies: 10
- Views: 11906
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);
- Tue Apr 16, 2019 7:57 pm
- Forum: ESP-IDF
- Topic: (resolved) I2C call panicking system
- Replies: 29
- Views: 27117
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); ...
- Tue Apr 16, 2019 7:43 pm
- Forum: ESP-IDF
- Topic: (resolved) is there a way to make a function uninterruptible?
- Replies: 10
- Views: 11906
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 : ...
- Tue Apr 16, 2019 6:08 pm
- Forum: ESP-IDF
- Topic: (resolved) is there a way to make a function uninterruptible?
- Replies: 10
- Views: 11906
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(). ...
- Tue Apr 16, 2019 5:42 pm
- Forum: ESP-IDF
- Topic: (resolved) is there a way to make a function uninterruptible?
- Replies: 10
- Views: 11906
(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...
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...
- Thu Apr 04, 2019 1:49 am
- Forum: ESP-IDF
- Topic: (resolved) I2C call panicking system
- Replies: 29
- Views: 27117
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.
- Wed Apr 03, 2019 2:01 pm
- Forum: ESP-IDF
- Topic: (resolved) I2C call panicking system
- Replies: 29
- Views: 27117
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...