emfcamp / TiDAL-Firmware

26 stars 14 forks source link

IRQ not working #15

Closed MatthewWilkes closed 2 years ago

MatthewWilkes commented 2 years ago

The Micropython implementation isn't firing interrupts on pins. Writing C code directly in a micropython function to register handlers also doesn't work. The same code in a non-upy environment does work, so something about the build or setup is breaking interrupts.

MatthewWilkes commented 2 years ago

Disabling interrupts entirely causes a crash due to a timed out periodic interrupt, so some interrupts are happening.

bendooks commented 2 years ago

is there an example of the code sequence that does work?

On Mon, 18 Apr 2022 at 14:34, Matthew Wilkes @.***> wrote:

The Micropython implementation isn't firing interrupts on pins. Writing C code directly in a micropython function to register handlers also doesn't work. The same code in a non-upy environment does work, so something about the build or setup is breaking interrupts.

— Reply to this email directly, view it on GitHub https://github.com/emfcamp/Mk6-micropython-board/issues/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCGQO2CDG6ZBA466KOKKK3VFVQFXANCNFSM5TV4D7ZQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Ben Dooks, http://www.fluff.org/ben/ @.***

MatthewWilkes commented 2 years ago

I used the code from https://github.com/espressif/esp-idf/issues/7885 in hello-world example from esp-idf

tomsci commented 2 years ago

@MatthewWilkes am I missing something, or does our version of esp-idf not have the fix from the issue you linked?

MatthewWilkes commented 2 years ago

I thought it did? Thought it was merged into 4.4 a few months before release. The issue linked is about interrupts on the 2nd core anyway, and we are using core 1. I only linked to it as a source of small interrupt testing code.

tomsci commented 2 years ago

Hmm.... there is a tag called v4.4 which points to 8153bfe4125e6a608abccf1561fd10285016c90a which seems to be what we're using and doesn't include the fix, but there's a branch called release/v4.4 which is more recent and does. I'll try rebuilding against release/v4.4 and see what happens. (Aside, quite how git clone --branch v4.4 selected a tag not a branch I won't even attempt to figure out...)

tomsci commented 2 years ago

Resolved by #24