ESP32 Restarts after interrupt detect

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
pschoon
Posts: 17
http://meble-kuchenne.info.pl
Joined: Thu Dec 31, 2020 2:14 pm
Been thanked: 3 times

ESP32 Restarts after interrupt detect

Post by pschoon »

Ji,

My first ESP32-S3-Wroom project with a button panel controlled with I2C.

I'm using the MCP23017 2x8 GPIO chip. Port A is button contacts, Port B is button Led control.
For reading out the buttons I use the chips IntA bus.
When configured in FC as Interrupt and all is setup the ESP32 is fully resetting at interrupt detect.
I checked several GPIO ports as Interrupt and all behave the same.
To check the ESP32 I use UART0 for readout in a terminal.

Now i configured a software interrupt in the main loop and that is working fine.

What do i oversee?
Attachments
ESP32 Test#1.fcfx
(31.95 KiB) Downloaded 13 times

mnfisher
Valued Contributor
Posts: 1487
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 137 times
Been thanked: 715 times

Re: ESP32 Restarts after interrupt detect

Post by mnfisher »

How are you reading the mcp23017 in the interrupt - if using i2c then you can not do this in the interrupt handler. You need to have a task that reads (either separate or in main) this - and the interrupt handler signals that there is a signal.

See
https://flowcode.co.uk/forums/viewtopic.php?t=3098 for some ideas.

Martin

pschoon
Posts: 17
Joined: Thu Dec 31, 2020 2:14 pm
Been thanked: 3 times

Re: ESP32 Restarts after interrupt detect

Post by pschoon »

thanks

Post Reply