Nice. Regarding the riddle: I thought exactly the same and supposed an error first.
New observation:
GPIO hard interrupts seem to be completely independent from the direction (Input/Output) of driving the pins, at least on Stm32.
If I change my script to:
before defining the interrupts and
Code: Select all
# @micropython.viper
# def flipflop():
# for _ in range(25):
# pb3(1)
# pb3(0)
#
# flipflop()
for _ in range(25):
pb3(1)
pb3(0)
afterwards I get similar output, with of course shorter time differences.
Perhaps this is established knowledge.
Back in my youth studying maths I found something new by myself, but my professor said it was 'folklore'. It wasn't in the textbooks but apparently known by all aquainted with the subject.
So perhaps the above is folklore too ???, but apparently not ??? I will try to find out how it behaves with different ports.