Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random crashes when using the rotary encoder #32

Closed
InstructionDecode opened this issue Aug 9, 2022 · 6 comments
Closed

Random crashes when using the rotary encoder #32

InstructionDecode opened this issue Aug 9, 2022 · 6 comments

Comments

@InstructionDecode
Copy link

Compiled the code and flashed it on the Heltec. The program starts and when I try to change settings the response is very slow and by using the rotary encoder the program crashes at a random point.
The serial monitor shows some kind of exception in the task scheduler.
Going to investigate the reasons and post the error message later.

@InstructionDecode
Copy link
Author

assert failed: taskSelectHighestPriorityTaskSMP tasks.c:3446 (xTaskScheduled == pdTRUE)

Backtrace:0x40084688:0x3ffbd4000x3ffbd4bd:0x3ffbd4e0 |<-CORRUPTED

ELF file SHA256: 0000000000000000

@doc2005
Copy link

doc2005 commented Nov 13, 2022

same issue on esp32 wroom.
setting version of espressif to 3.5.0 does not help at all

@amotl
Copy link
Member

amotl commented Jun 22, 2023

Dear @InstructionDecode,

thank you for submitting GH-33, and good to hear that this works for you. @doc2005: Could you elaborate what does not work?

Maybe @ClemensGruber outlined the correct solution how to modify the code at https://community.hiveeyes.org/t/kann-ich-auch-das-heltec-wifi-kit-32-in-der-neuen-version-v3-verwenden/4696/37?

For me the code runs stable if I comment out the line about 307 (depending on the code version):
// if ( rotating ) delay (1); // wait a little until the bouncing is done

Maybe the code at the develop branch already includes those changes, and others. It is not easy to figure out and pinpoint a specific commit, because commit messages have been obfuscated.

What about doing proper versioning using Git tags, and continuing development on the main branch instead, @ClemensGruber? Let me know if you need assistance on this.

With kind regards,
Andreas.

@amotl
Copy link
Member

amotl commented Jun 22, 2023

Maybe the code at the develop branch already includes those changes, and others?

It does!

https://github.com/ClemensGruber/hani-mandl/blob/2ce2b9f05a5fff6ab9590a491a08fa32d12f738e/hani-mandl.ino#L391-L393

That's the translation of the corresponding inline comment:

// Commented out, because probably the delay in the ISR function triggers a reset from ESP32 Arduino core version ≥ 2.x.
// Observe if bouncing becomes a problem with this, in rudimentary tests I (cg) could not observe anything negative.

That's the corresponding changelog item:

2023-01 Clemens Gruber | 0.2.13
- pin-Anpassungen für Hardware-Version V3 des Heltec "WiFi Kit 32 V3" mit wieder mal geändertem pin-Layout
- Anpassungen für den ESP32 Arduino core Version ≥ 2.x
- Display, U8g2: HW statt SW im constructor (ggf. Probleme mit älteren Heltec-Versionen)
- Rotary: de-bouncing code im isr2 auskommentiert, da sie zu Abstürzen führte

Translation of the bottom item:

Rotary: de-bouncing code in isr2 commented out as it caused crashes.

@amotl
Copy link
Member

amotl commented Jun 22, 2023

What about doing proper versioning using Git tags, and continuing development on the main branch instead, @ClemensGruber?

It would be really sweet, to save others from needing to spend hours of debugging to resolve this issue again and again.

@ClemensGruber
Copy link
Collaborator

master / main is now updated to the latest develop branch and rotary should also work with now work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants