Seems like a freedom-metal bug to me. I am creating a lot of PLIC interrupts from GPIO 23 with a 72 Hz rectangular signal. I also experimented a bit with the clock speed (does not seem to change anything). When using the aforementioned function without masking like
metal_interrupt_set_threshold(rect_sig_ic, 1); metal_spi_transfer(...) metal_interrupt_set_threshold(rect_sig_ic, 0);
it never returns. Am I missing out on something here?
P.S.: The masking as shown above does the trick for me, which sucks just a bit, since I cannot talk to the peripheral and evaluate the sensor signal at the same time.