-
Notifications
You must be signed in to change notification settings - Fork 7k
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
mcpwm_capture_channel_register_event_callbacks(322): install interrupt service for cap channel failed (IDFGH-8010) #9520
Labels
Comments
github-actions
bot
changed the title
mcpwm_capture_channel_register_event_callbacks(322): install interrupt service for cap channel failed
mcpwm_capture_channel_register_event_callbacks(322): install interrupt service for cap channel failed (IDFGH-8010)
Aug 7, 2022
espressif-bot
added
Status: In Progress
Work is in progress
and removed
Status: Opened
Issue is new
labels
Aug 8, 2022
@dizcza Thanks for the detailed debug log, could you help to check if the following fix can help? diff --git a/components/driver/mcpwm/mcpwm_private.h b/components/driver/mcpwm/mcpwm_private.h
index b5881280f8..eb176fc29e 100644
--- a/components/driver/mcpwm/mcpwm_private.h
+++ b/components/driver/mcpwm/mcpwm_private.h
@@ -29,9 +29,9 @@ extern "C" {
#endif
#if CONFIG_MCPWM_ISR_IRAM_SAFE
-#define MCPWM_INTR_ALLOC_FLAG (ESP_INTR_FLAG_SHARED | ESP_INTR_FLAG_INTRDISABLED | ESP_INTR_FLAG_IRAM)
+#define MCPWM_INTR_ALLOC_FLAG (ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_SHARED | ESP_INTR_FLAG_INTRDISABLED | ESP_INTR_FLAG_IRAM)
#else
-#define MCPWM_INTR_ALLOC_FLAG (ESP_INTR_FLAG_SHARED | ESP_INTR_FLAG_INTRDISABLED)
+#define MCPWM_INTR_ALLOC_FLAG (ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_SHARED | ESP_INTR_FLAG_INTRDISABLED)
#endif
#define MCPWM_PERIPH_CLOCK_PRE_SCALE (2) |
Yes, the fix solves the issue. Checked for both options for the CONFIG_MCPWM_ISR_IRAM_SAFE. |
espressif-bot
added
Status: Reviewing
Issue is being reviewed
and removed
Status: In Progress
Work is in progress
labels
Aug 8, 2022
espressif-bot
added
Resolution: NA
Issue resolution is unavailable
Status: Done
Issue is done internally
Resolution: Done
Issue is done internally
and removed
Status: Reviewing
Issue is being reviewed
Resolution: NA
Issue resolution is unavailable
labels
Aug 15, 2022
espressif-bot
pushed a commit
that referenced
this issue
Sep 2, 2022
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Environment
Problem Description
I'm migrating MCPWM capture mode from legacy to mcpwm_cap module using esp-idf master branch.
In my code, which I cannot show all, I
and the code fails with
If I
mcpwm_capture_channel_register_event_callbacks
works fine. As the return code suggests -ESP_ERROR_CHECK
, - "No free interrupt found with the specified flags".Expected Behavior
There is at least one free interrupt with the MCPWM flags specified and
mcpwm_capture_channel_register_event_callbacks
succeeds.Actual Behavior
There are no free interrupts with the MCPWM flags specified and
mcpwm_capture_channel_register_event_callbacks
fails.Code to reproduce this issue
This is schematic code to perform GPS-RTC sync. It isn't meant to run.
Debug Logs
Update 1
If I call
gps_init
after I initialize MCPWM and enable it,everything works fine.
Update 2
However, if I enable & disable MCPWM, the error appears again.
Legacy MCPWM code
For the reference, the legacy code I'm porting is
And it's very annoying to see logs flooded with GPIO messages each time I "enable" and "disable" the new
mcpwm_cap
driver. I'll perhaps open a discussion on this matter later on to avoid callingmcpwm_new_capture_channel
andmcpwm_del_capture_channel
explicitly as the documentation suggests at the moment.Other items if possible
sdkconfig.txt
The text was updated successfully, but these errors were encountered: