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

[Bug]: ESP32 "HW TIMER NEVER INIT ERROR" with MicroGirs #1031

Closed
10 of 29 tasks
whc2001 opened this issue Oct 4, 2022 · 7 comments
Closed
10 of 29 tasks

[Bug]: ESP32 "HW TIMER NEVER INIT ERROR" with MicroGirs #1031

whc2001 opened this issue Oct 4, 2022 · 7 comments
Labels
Enhancement Idea or request for enhancement of the library

Comments

@whc2001
Copy link

whc2001 commented Oct 4, 2022

The type of board you are using.

ESP32 board - first check https://github.com/crankyoldgit/IRremoteESP8266

What IDE are you using?

Arduino IDE

What IR protocol are you using?

Other - please specify below

Pin(s) used for IR-receive, if not default.

ESP32 pin number: D15

Example(s) you have checked while hunting the bug.

  • SimpleReceiver
  • ReceiveDemo
  • SendRawDemo
  • ReceiverTimingAnalysis
  • MinimalReceiver
  • ReceiveAndSend
  • SimpleSender
  • SendDemo
  • SendLGAirConditionerDemo
  • UnitTest
  • Other - please specify below
  • I checked, if at least one of the examples was working.

Example(s) to reproduce the issue.

  • SimpleReceiver
  • ReceiveDemo
  • SendRawDemo
  • ReceiverTimingAnalysis
  • MinimalReceiver
  • ReceiveAndSend
  • SimpleSender
  • SendDemo
  • SendLGAirConditionerDemo
  • UnitTest
  • Other - please specify below

The library version you are working with.

What are the steps to reproduce this issue?

  1. Change the receive pin of MicroGirs example to D15
  2. Compile and download
  3. Send "r" with serial monitor
  4. Press remote button

What happens?

An error message is emitted before the data.

The serial output which indicates the error happened.

E (4388) timer_group: timer_isr_callback_remove(244): HW TIMER NEVER INIT ERROR
+9050 -4400 +650 -1650 +600 -1650 +600 -1650 +600 -1650 +600 -1600 +600 -1650 +600 -1650 +600 -500 +650 -500 +600 -500 +650 -500 +600 -500 +650 -500 +600 -500 +650 -450 +650 -1650 +600 -500 +600 -500 +650 -500 +600 -500 +650 -500 +600 -500 +650 -500 +600 -500 +650 -1650 +600 -1650 +600 -1650 +600 -1600 +600 -1650 +600 -1650 +600 -1650 +600 -1650 +600 -40000
OK

What were you expecting to happen?

The error should not happen, or to say at least should not be output into the serial.

Additional context.

The error message makes it unusable with IrScrutinizer which the message is regarded as garbage and will trigger exception. Testing with ReceiveDemo, the error message won't appear. I have found a discussion before about this message, but the current release version is already 3.9.0. I also tried the latest version directly from the repo and the problem persists. Not sure if I am missing something.

Final checklist for the bug report.

  • I have read the README.md file thoroughly
  • I have searched existing issues to see if there is anything I have missed.
  • I have browsed the examples for one, that matches my use case.
  • The title of the issue is helpful and relevant.
@whc2001
Copy link
Author

whc2001 commented Oct 4, 2022

Just found that if I don't stop the receiver after successfully receiving a signal, the error won't appear... But will that cause any problem?

Commenting out this line and the problem is away:

@ArminJo
Copy link
Collaborator

ArminJo commented Oct 4, 2022

Which ESP32 core version do you use?
There are bugs in the timer functions in some 2.x versions. See here

@whc2001
Copy link
Author

whc2001 commented Oct 4, 2022

Ahh it's an upstream problem, no wonder. I am using 2.0.4 and the latest 2.0.5 also does not work. Downgrading to 2.0.1 solves the problem.

@whc2001 whc2001 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2022
@ArminJo
Copy link
Collaborator

ArminJo commented Oct 4, 2022

Thanks for reporting! 👍

@ArminJo
Copy link
Collaborator

ArminJo commented Oct 4, 2022

BTW, can you please test if 2.0.1 and 2.0.5 are working if you change the line 1122 in IRTimer.hpp from
#define TIMER_DISABLE_RECEIVE_INTR if (s50usTimer != NULL) {timerEnd(s50usTimer); timerDetachInterrupt(s50usTimer);}
to
#define TIMER_DISABLE_RECEIVE_INTR if (s50usTimer != NULL) {timerDetachInterrupt(s50usTimer);}
or
#define TIMER_DISABLE_RECEIVE_INTR if (s50usTimer != NULL) {timerAlarmDisable(s50usTimer);}
this could then be a stable fix to this problem.

@ArminJo ArminJo reopened this Oct 4, 2022
@whc2001
Copy link
Author

whc2001 commented Oct 4, 2022

Seems like the second fix won't work on 2.0.1 but works on 2.0.5. The first fix would work on both 2.0.1 and 2.0.5.

@ArminJo
Copy link
Collaborator

ArminJo commented Oct 4, 2022

Thank you very much, I will include the fix it in the forthcoming release.

@ArminJo ArminJo closed this as completed Oct 4, 2022
@ArminJo ArminJo added Documentation Fixed by extending documentation Enhancement Idea or request for enhancement of the library and removed Documentation Fixed by extending documentation labels Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Idea or request for enhancement of the library
Projects
None yet
Development

No branches or pull requests

2 participants