Other Parts Discussed in Thread: TLV320AIC3104EVM-K, AM5728
On the AM5749 I have performed pin muxing to change pin vin1a_d6 to pr1_pru0_gpi3 (attaches to external push button), and gpio4_8 to pr1_pru1_gpo4 (attaches to external LED). Using a combination of code from the TI trainings I have set up a scenario that will turn the LED on and off when the button is pushed. RPMsg is also enabled and sends a message to the device driver saying whether the button is pushed or released.
Currently I debounce with using a large delay [__delay_cycles(100000000)]. The problem with this is that the response time is too slow for my desired functionality however, reducing the delay time causes the remoteproc to either completely freeze and require a restart or loses all functionality and doesn’t register the button push at all.
I am new to embedded systems and PRU, and am unsure if this is a PRU/RPMsg problem or a debouncing issue. I have tried different types of debouncing methods and it doesn’t improve the situation. Is there a specific method to debounce PRU inputs or is there any advice to improving the speed of my input/output response.
I have also seen issues with using __delay_cycles causing strange outputs, I am looking into using IEP to act as a timer for debouncing to avoid using __delay_cylces but so far am not having a great amount of luck.
Any suggestions would be greatly appreciated.