what is meant by HW TIMER NEVER INIT ERROR ?

Raghav Jha
Posts: 15
Joined: Thu Feb 25, 2021 9:59 am

what is meant by HW TIMER NEVER INIT ERROR ?

Postby Raghav Jha » Sat Dec 25, 2021 3:32 pm

Hello,
I m trying to use the arduino IR remote library v2.0.1 esp-idf v 4.2.
In IR remote mostly 3 or 4 files are used like ( esp-hal-timer.c.h, esp32-hal-gpio.c.h, esp32-ledc-gpio.c.h, esp32-hal.h esp32-hal-matrix.c.h)
which is easy to use with idf with some modification.

So, i tried and got little succes in that. But after receiving it giving following error
.

Code: Select all

E (40391) timer_group: timer_enable_intr(415): HW TIMER NEVER INIT ERROR
E (40391) timer_group: timer_get_config(362): HW TIMER NEVER INIT ERROR
E (40391) timer_group: timer_get_alarm_value(180): HW TIMER NEVER INIT ERROR
E (40401) timer_group: timer_isr_callback_add(234): HW TIMER NEVER INIT ERROR
Can you tell me what it mean? Reason for this error?

Also, at first time I m able to receive but when I m trying to receive second time, system got crash

Log:
At first receive..

Code: Select all

--------please press remote button------

W (35291) esp32-hal-timer.c: EDGE timer interrupt is not supported! Setting to LEVEL...

I (39311) IRremote_main.cpp: raw length: 68 

Protocol: NEC	Data: 0x40BF18E7 (32 bits)
Timing[67]:
    +8850, -4650    + 450, - 600    + 500, -1800    + 500, - 600
    + 450, - 600    + 500, - 600    + 500, - 600    + 450, - 600
    + 500, - 600    + 500, -1800    + 500, - 600    + 450, -1800
    + 500, -1800    + 500, -1500    + 500, -1800    + 500, -1800
    + 500, -1800    + 450, - 600    + 500, - 600    + 500, - 600
    + 450, -1850    + 450, -1800    + 500, - 600    + 500, - 600
    + 450, - 600    + 500, -1800    + 500, -1800    + 500, -1800
    + 500, - 600    + 450, - 600    + 500, -1800    + 500, -1800
    + 500, -1800    + 450
unsigned int  rawData[67] = {8850,4650, 450,600, 500,1800, 500,600, 450,600, 500,600, 500,600, 450,600, 500,600, 500,1800, 500,600, 450,1800, 500,1800, 500,1500, 500,1800, 500,1800, 500,1800, 450,600, 500,600, 500,600, 450,1850, 450,1800, 500,600, 500,600, 450,600, 500,1800, 500,1800, 500,1800, 500,600, 450,600, 500,1800, 500,1800, 500,1800, 450};  // NEC 0x40BF18E7

unsigned int  data = 0x40BF18E7
I (39391) IRremote_main.cpp: 

E (40391) timer_group: timer_enable_intr(415): HW TIMER NEVER INIT ERROR
E (40391) timer_group: timer_get_config(362): HW TIMER NEVER INIT ERROR
E (40391) timer_group: timer_get_alarm_value(180): HW TIMER NEVER INIT ERROR
E (40401) timer_group: timer_isr_callback_add(234): HW TIMER NEVER INIT ERROR
At second receive:

Code: Select all

W (48541) esp32-hal-timer.c: EDGE timer interrupt is not supported! Setting to LEVEL...
Guru Meditation Error: Core  0 panic'ed (Coprocessor exception). 

Core  0 register dump:
PC      : 0x70795467  PS      : 0x00060032  A0      : 0x6c000000  A1      : 0x3ffbec20  
A2      : 0x3fff2a64  A3      : 0x00000000  A4      : 0x00060b23  A5      : 0x00000000  
A6      : 0x3ffdbf70  A7      : 0x00060b23  A8      : 0x80089ae7  A9      : 0x0a0800e0  
A10     : 0x3fff0065  A11     : 0xffffffff  A12     : 0x8008fcd3  A13     : 0x3fff9130  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000020  EXCCAUSE: 0x00000004  
EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0xffffffff  
Core  0 was running in ISR context:
EPC1    : 0x70795467  EPC2    : 0x40091808  EPC3    : 0x00000000  EPC4    : 0x00000000
0x40091808: vTaskExitCritical at /home/horsemann/Desktop/WorkSpace/universalRemote_v202107/build/../freertos/freertos_kernel/tasks.c:4388


Backtrace:0x70795464:0x3ffbec20 |<-CORRUPTED


ELF file SHA256: ab7943761fc186fc
Attachments
esp32-hal.h
(2.17 KiB) Downloaded 379 times
esp32-hal-timer.h
(2.73 KiB) Downloaded 363 times
esp32-hal-timer.c
(8.29 KiB) Downloaded 370 times

ESP_Sprite
Posts: 9725
Joined: Thu Nov 26, 2015 4:08 am

Re: what is meant by HW TIMER NEVER INIT ERROR ?

Postby ESP_Sprite » Sun Dec 26, 2021 3:02 am

At first glance, it sounds like you never call timer_init() on that timer. Also you probably get that coprocessor exception because you're trying to do floating point calculations within an interrupt. ESP-IDF doesn't really support that. (If you need to do it anyway, the correct way would be to set a semaphore or something in the interrupt, then do the floating point calculation in a task that wakes up from that.)

Inglebard
Posts: 1
Joined: Wed Dec 29, 2021 6:29 pm

Re: what is meant by HW TIMER NEVER INIT ERROR ?

Postby Inglebard » Wed Dec 29, 2021 6:32 pm

Hi,
@Raghav Jha

I also encounter "HW TIMER NEVER INIT ERROR" since esp32 2.0.2 (https://github.com/espressif/arduino-es ... /tag/2.0.2).

Do you have the issue with version 2.0.1 ?

Raghav Jha
Posts: 15
Joined: Thu Feb 25, 2021 9:59 am

Re: what is meant by HW TIMER NEVER INIT ERROR ?

Postby Raghav Jha » Sat Jan 22, 2022 7:44 am

Very sorry @Inglebard. For the late reply.

Yeah I m having issue in version 2.0.1.

Let me let you details steps what I did and what I want for might you can help me.

Aim: I want to use the Arduino IR Remote library in esp-idf v4.2.2.
I want to use the arduino IR remote library v2.01. I check in library there is some how arduino files its uses. Like esp_hal_timer.c, esp_hal_gpio, esp_hal_ledc.c esp_hal_matrix , esp_hal_cpu.c.
And I check this files, and got that this files is build on the top of the esp-idf components files.
So, I thought If I just add this files with aruidno IR library then It should work. Because at the end the its uses the esp-idf components.

But Its giving me this error. I did not change anything in IR remote.

Can you guide me how IR call the timer and how timer works here. So, I can narrow down my issue?

Who is online

Users browsing this forum: No registered users and 99 guests