AnsweredAssumed Answered

Simulating Alternate Function Input

Question asked by Jack Peacock on Oct 26, 2011
Latest reply on Sep 3, 2012 by rigo.mate.002
In the STM32 reference manual (Doc ID 13902 Rev 13) in section 9.1.4 it states:

It is also possible to emulate the AFI input pin by software by programming the GPIO controller. In this case, the port should be configured in Alternate Function Output mode. And obviously, the corresponding port should not be driven externally as it will be driven by the software using the GPIO controller.

The question is how to use this?  I'd like to simulate encoder inputs to TIM4.  But if I set the GPIO B6 (TIM4 CH1) and B7 (TIM4 CH2) pins to alternale output it disconnects the ODR output register, so how can I set/reset the B6 and B7 pins in software?  CPU is an STM32F103Z on a STM3210E eval board.
  Jack Peacock