You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the bug #27450 I took on to the task of updating the framework (arduino-espressif32 based on esp-idf) to see if that made any difference. I saw an update to [email protected] at 4ef5372, but that's still way outdated.
Trying out things, I found that ANY SDK version newer than v3.5.0 (which internally would be a jump from esp-idf v3.5.3 to v4.4) throws the following error in this line:
E (24567) timer_group: timer_get_counter_value(54): HW TIMER NEVER INIT ERROR
Going down that rabbit hole I found that, in certain configurations, some of the timers are being used without being set up first.
An good example of this is timer 0 (on an ESP32 with I2S_STEPPER_STREAM enabled). HAL_timer_get_count is called here, even when HAL_timer_startis never called.
Stacktrace for reference:
0x400d3aa3: HAL_timer_get_count(unsigned char) at /home/fermino/develop/marlin-builds/.build/AnetA6/Marlin/src/HAL/ESP32/timers.cpp:162
0x400fc7f5: Stepper::block_phase_isr() at /home/fermino/develop/marlin-builds/.build/AnetA6/Marlin/src/module/stepper.cpp:2389
0x400d2f3f: stepperTask(void*) at /home/fermino/develop/marlin-builds/.build/AnetA6/Marlin/src/HAL/ESP32/i2s.cpp:171
In any case, the newer SDK is not as forgiving as the old one and it throws that error.
One solution would be forcing OLD_ADAPTIVE_MULTISTEPPING to be enabled if I2S_STEPPER_STREAM is enabled, another would be to keep track of which timers have been init'd and init them on demand if necessary. A quick n' dirty workaround would be to just return 0 if the timer was not started.
In any case, I don't feel I know Marlin well enough to figure this one out, so I'm requesting some comments on this one.
I don't really want to tag anyone but I feel like @quiret might have some input on this as he is the one that updated the SDK on the first place.
Any input is appreciated :) I will keep doing some testing and if any solution is agreed on I will be happy to make appropiate patches.
Kind regards,
Fermín Olaiz.
Bug Timeline
It's been there for a while but the stricter SDK makes it noticeable
Version of Marlin Firmware
bugfix-2.1.x
Electronics
BOARD_MKS_TINYBEE
The text was updated successfully, but these errors were encountered:
Moving the i2s calls up is not possible due to #21019 (which might be fixed in recent arduino-esp32 releases? I haven't found any literature on it yet). The only decent workaround I can think of is to keep track of what timers have been init'd and init them on demand if they're needed before they're set up.
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
Based on the bug #27450 I took on to the task of updating the framework (arduino-espressif32 based on esp-idf) to see if that made any difference. I saw an update to
[email protected]
at 4ef5372, but that's still way outdated.Trying out things, I found that ANY SDK version newer than
v3.5.0
(which internally would be a jump from esp-idfv3.5.3
tov4.4
) throws the following error in this line:Going down that rabbit hole I found that, in certain configurations, some of the timers are being used without being set up first.
An good example of this is timer 0 (on an ESP32 with
I2S_STEPPER_STREAM
enabled).HAL_timer_get_count
is called here, even whenHAL_timer_start
is never called.Stacktrace for reference:
In any case, the newer SDK is not as forgiving as the old one and it throws that error.
One solution would be forcing
OLD_ADAPTIVE_MULTISTEPPING
to be enabled ifI2S_STEPPER_STREAM
is enabled, another would be to keep track of which timers have been init'd and init them on demand if necessary. A quick n' dirty workaround would be to just return 0 if the timer was not started.In any case, I don't feel I know Marlin well enough to figure this one out, so I'm requesting some comments on this one.
I don't really want to tag anyone but I feel like @quiret might have some input on this as he is the one that updated the SDK on the first place.
Any input is appreciated :) I will keep doing some testing and if any solution is agreed on I will be happy to make appropiate patches.
Kind regards,
Fermín Olaiz.
Bug Timeline
It's been there for a while but the stricter SDK makes it noticeable
Version of Marlin Firmware
bugfix-2.1.x
Electronics
BOARD_MKS_TINYBEE
The text was updated successfully, but these errors were encountered: