2011-10-03 05:20 PM
Hi,
I am using an STM32F102C6 processor. The design has an LED and resistor tied to 3.3V and Pin PB4. I need to release this pin from JTAG and use it in OD mode to drive the LED. So far I have: Read all the documentation on pin remapping and selected the third JTAG option that remaps PB3 and PB4. Checked all the other re-mappings for this part and concluded that they do not affect PB4 unless enabled. Tried configuring the pin in both Out_OD and Af_OD modes with no results. Tried everything on multiple boards. Am I missing something? It doesn't seem like this should be so difficult. Thanks for your ideas. Dave #jtag-pb4-remap #answer2011-10-04 12:05 PM
Solution:
It was not obvious from the chip documentation that the AFIO feature is a clocked preipheral. Its clock needs to be enabled as follows: RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE); Also, you do not need to use the 'af_OD' pin option even though the table in the documentation makes it look that way. Use 'Out_OD' or the other 'Out_' option of your choice. Thanks to Alec at ST. Dave