Handle internal interrupt

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: Handle internal interrupt

Postby ESP_igrr » Sat Jan 06, 2018 1:56 pm

Sorry, i can't find the issue in your example.
But this simple example demonstrates how to use ULP interrupt:
https://gist.github.com/igrr/4b002047fc ... 01858e1de5

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: Handle internal interrupt

Postby urbanze » Sat Jan 06, 2018 2:11 pm

ESP_igrr wrote:Sorry, i can't find the issue in your example.
But this simple example demonstrates how to use ULP interrupt:
https://gist.github.com/igrr/4b002047fc ... 01858e1de5
I discovered the "mistake" too, anyway thanks for the example, ended up confirming the "error".

The ISR definition must be made before ulp_run(), and if you see the code I posted earlier, the ISR definition was after ulp_run(). The problem was just that, all the registers were correct, thanks for the attention!

With this your code, you could add the list of ULP examples in ESP-IDF!

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Handle internal interrupt

Postby WiFive » Sat Jan 06, 2018 2:12 pm

ESP_igrr wrote:Sorry, i can't find the issue in your example.
But this simple example demonstrates how to use ULP interrupt:
https://gist.github.com/igrr/4b002047fc ... 01858e1de5
xSemaphoreGiveFromISR

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: Handle internal interrupt

Postby ESP_igrr » Sat Jan 06, 2018 2:41 pm

Thanks WiFive. We should add configASSERT( !xPortInIsrContext() ); into xQueueGenericSend...

Who is online

Users browsing this forum: Bing [Bot], Dennie, pcouderc and 109 guests