GPIO edge interrupts incorrect
762SPR opened this issue · comments
GPIO Pin.enable_interrupt() seems to configure the RTSR1 and FTSR1 registers wrong on a L4
Setting it to FALLING results in:
RTSR1 = 0
FTSR1 = 0
Setting it to RISING results in:
RTSR1 = 1
FTSR1 = 1
Setting it to Either results in:
RTSR1 = 1
FTSR1 = 0
I believe it is because
Line 365 in 3494d54
Should be
exti.ftsr1.modify(|_, w| w.[<tr $num>]().bit($falling));
But I don't know much about macros so could be wrong!
THANK YOU for your work on this HAL!!!
Good call - you're correct; fixed!
…On Fri, Oct 7, 2022 at 2:09 AM 762SPR ***@***.***> wrote:
GPIO Pin.enable_interrupt() seems to configure the RTSR1 and FTSR1
registers wrong on a L4
Setting it to FALLING results in:
RTSR1 = 0
FTSR1 = 0
Setting it to RISING results in:
RTSR1 = 1
FTSR1 = 1
Setting it to Either results in:
RTSR1 = 1
FTSR1 = 0
I believe it is because
https://github.com/David-OConnor/stm32-hal/blob/3494d546a0c704c7043ac4c4bb1710d848911043/src/gpio.rs#L365
Should be
exti.ftsr1.modify(|_, w| w.[<tr $num>]().bit($falling));
But I don't know much about macros so could be wrong! 😅
*THANK YOU* for your work on this HAL!!!
—
Reply to this email directly, view it on GitHub
<#57>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDAZTH44Y5YGZWA2BFEQY3WB6A7DANCNFSM6AAAAAAQ7FKK3I>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>