Skip to content
Discussion options

You must be logged in to vote

Sorry, what is hard=True? I don't recall coming across it.

See docs for e.g. Pin.irq https://docs.micropython.org/en/latest/library/machine.Pin.html#machine.Pin.irq and the linked document about writing interrupt handlers.

Not all ports support both hard=True and hard=False (i.e. "soft"). e.g. ESP32 only supports soft. rp2040 supports both. Hard interrupts run in the CPU's interrupt context and execute immediately (pre-empting running code). Soft interrupts are scheduled for later execution.

and each Micropython "statement" takes around 10us to execute (on average, obviously it would vary by statement... btw what is considered a statement in Python? A line of code?)

Time per line or s…

Replies: 4 comments 11 replies

Comment options

You must be logged in to vote
4 replies
@czarnikjak
Comment options

@jimmo
Comment options

Answer selected by czarnikjak
@czarnikjak
Comment options

@robert-hh
Comment options

Comment options

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

@robert-hh
Comment options

@robert-hh
Comment options

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

@robert-hh
Comment options

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