Teensy 4.1 generates 240kHz clock/pwm signal that it sends to a target device.
And I need to generate interrupt on either rising/falling edge of the sent signal to capture bitsequence that is sent back from target device.
For some reason I struggle to find a simple example of how to do this, preferably without any thick, hard to understand abstraction layers.
(ideally this would be done via DMA, each sent clock pulse would read multiple pins, save them to memory and then increase memory address, but even this simpler case eludes me)
Code:
analogWriteFrequency(A9, 240000); //240kHz
analogWrite(A9,128); // duty cycle 50%
And I need to generate interrupt on either rising/falling edge of the sent signal to capture bitsequence that is sent back from target device.
For some reason I struggle to find a simple example of how to do this, preferably without any thick, hard to understand abstraction layers.
(ideally this would be done via DMA, each sent clock pulse would read multiple pins, save them to memory and then increase memory address, but even this simpler case eludes me)