Hi,
I am using the AM5728 processor and the TI AM57xx-evm Linux processor. I need multiple separate encoders to be run on PRU (>3).
Currently, I am just trying to get an RPMsg to send to a device file for each encoder turn, I am uninterested in position or speed, only direction.
I have mapped the input signals generated from each CLK and DT pin to channel 1 and host 1, to be system events 17 and 20 and the depress functionality on system event 16 for a single encoder.
Whilst I can generate an interrupt from pressing the encoder, turning either way does not generate an interrupt. I am unsure how to write code that will generate an interrupt for these signals, as they seem to stay high when I attempt to do: if((__R31 & (1<<8)) == (1<<8)) (eg. input mapped to pru0_gpi8).
I have checked my encoder circuitry with a logic analyser to rule out hardware issues and the encoder responds normally.
I have also attempted to do a basic implementation of encoder logic that has further been unsuccessful: