micropython icon indicating copy to clipboard operation
micropython copied to clipboard

Renesas-RA: Pin-IRQ does not behave as expected.

Open robert-hh opened this issue 1 year ago • 5 comments

Port, board and/or hardware

Rensas-RA, Board RA6M2

MicroPython version

MicroPython v1.24.0-preview.36.gdc9e733ad on 2024-06-12; EK-RA6M2 with RA6M2

Reproduction

from machine import Pin, idle

p5=Pin("P005", Pin.IN)
p6=Pin("P006", Pin.OUT, value=0)

def cb(pin):
    global p6
    p6(1)
    p6(0)
    
p5.irq(handler=cb, trigger=Pin.IRQ_FALLING)

while True:
    idle()

Expected behaviour

Response pulse at Pin P006.

Observed behaviour

No pulse. If I call the callback directly, I get a pulse.

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

robert-hh avatar Jun 13 '24 10:06 robert-hh

@robert-hh san, Thank you for your report. I will check.

TakeoTakahashi2020 avatar Jun 13 '24 11:06 TakeoTakahashi2020

@robert-hh san, I have made a PR #15283 to fix this issue. I appreciate it if you could check it. Thanks.

TakeoTakahashi2020 avatar Jun 14 '24 10:06 TakeoTakahashi2020

Thank you. I will try it later today.

robert-hh avatar Jun 14 '24 12:06 robert-hh

@TakeoTakahashi2020 Pin.irq() works now in my test as expected. It triggers at and does so the right time. Thank you for the fix.

robert-hh avatar Jun 14 '24 13:06 robert-hh

@robert-hh san, Thank you very much for your check.

TakeoTakahashi2020 avatar Jun 17 '24 00:06 TakeoTakahashi2020

Fixed by 6381ad5d0c4c594dbb8feea3bebf6222fd78f3a1

dpgeorge avatar Sep 26 '24 07:09 dpgeorge