Skip to content
Discussion options

You must be logged in to vote

@ma261065

As discussed above, the ESP32 is a little bit complicated because it only uses "soft" interrupts.

So there are three parts here.

  1. The actual interrupt source (e.g. a Pin edge). What happens varies between architectures, but typically a flag is set to indicate a pending IRQ.
  2. The CPU interrupts the executing code to run the ISR (i.e. a C function). This is what's enabled/disabled by machine.disable_irq(). The C function schedules the Python handler.
  3. The scheduler that calls the Python handler at some later point.

In some sense the exact same thing is implemented at two levels -- a low-level thing sets a flag (interrupt source, or scheduler), which the execution loop (the CPU, or …

Replies: 10 comments 17 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@robert-hh
Comment options

@robert-hh
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@rkompass
Comment options

@shariltumin
Comment options

Comment options

You must be logged in to vote
2 replies
@shariltumin
Comment options

@andrewleech
Comment options

andrewleech Sep 13, 2023
Collaborator Sponsor

Answer selected by ma261065
Comment options

You must be logged in to vote
3 replies
@glenn20
Comment options

@jimmo
Comment options

@ma261065
Comment options

ma261065 Sep 26, 2023
Author Sponsor

Comment options

You must be logged in to vote
8 replies
@jimmo
Comment options

@ma261065
Comment options

ma261065 Oct 31, 2023
Author Sponsor

@ma261065
Comment options

ma261065 Oct 31, 2023
Author Sponsor

@jimmo
Comment options

jimmo Nov 1, 2023
Maintainer

@ma261065
Comment options

ma261065 Nov 1, 2023
Author Sponsor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
ESP32
Labels
None yet
7 participants