cancel
Showing results for 
Search instead for 
Did you mean: 

Copy input pin to output.

BCoch
Senior

What would be an efficient, low latency way to reflect the state of an input pin onto an output pin?

Is there anything more automated than configuring the input pin as an EXTI, then in the interrupt handler, reading it and setting the state of the output pin accordingly? Could it be done with a comparator or timer?

12 REPLIES 12

Hi JW and thanks for the reply

The analog comparator only has 2 pins and afaik they are only available on analog input pins. What I need is a full mirror of the full 16 digital pins of one GPIO port to another.

> 2)memory to perif or perif to memory can accept two GPIO ports?

BDMA in 'H7 yes, and DMA2 in 'F7 too. Both would require some tricks for continuous triggering, but IMO in both cases that's quite easily doable. They will choke on the continuous transfers, though, and so will the related buses.

Doable? Probably. Practical? No.

JW

Guess its worth a try. I'm fully aware its not elegant. As long as there is no corrupted port writes (that they are atomic), then its all fine if there is lots of internal fights. Thanks