Hi there!
I need to measure frequency output of a flow meter 0-1000Hz.
(Core2, Pin GPIO27)
I have setup some code in UIFlow and defined IRQ and handler in "Execute Code" block.
Reading works but very unstable (Jumps between 300..1000).
Probably I need to run the handler in IRAM?
Where/ how can I put the IRAM_ATTR?
My execute code block:
*def event_interrupt(pin0):
global counter, semaphore
if Semaphore:
counter+=1
pin0.irq(trigger=machine.Pin.IRQ_FALLING,
handler= event_interrupt)*
Thanks a lot!