Skip to main content
markbell9
Associate II
June 14, 2012
Question

STM32F103C8 Peripheral Alternate Function

  • June 14, 2012
  • 3 replies
  • 884 views
Posted on June 14, 2012 at 15:55

On the STM32F103C8 chip I can use the PA9 default alternate function to use either USART1_TX or TIM1_CH2 on that pin depending upon which peripheral is enabled.

If both peripherals are enabled and I am using PA9 as USART1_TX, does this preclude me from using TIM_CH1, TIM_CH3, or TIM_CH4?

  

This assumes that TIM_CH2 is disabled:

TIM1 MOE =1

OSSR = x

CC2E = 0

CC2NE = 0

I pretty sure the answer is ''Yes'', but would like confirmation.

Thank you.

#stm32
    This topic has been closed for replies.

    3 replies

    raptorhal2
    Lead
    June 14, 2012
    Posted on June 14, 2012 at 16:34

    Each pin is independent as to alternate function, so the other timer channels are available.

    Cheers, Hal

    Andrew Neil
    Super User
    June 14, 2012
    Posted on June 14, 2012 at 19:43

    Many Alternate Functions can be ''re-mapped'' onto different pins...

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Tesla DeLorean
    Guru
    June 14, 2012
    Posted on June 14, 2012 at 20:04

    Many Alternate Functions can be ''re-mapped'' onto different pins...

    And sometimes must be otherwise pins clash. This is the case for one of the CAN outputs and a USART CTS or RTS pin. It's in the errata now, but banged my head on it with a 103 design. You need to remap the CAN off in the weeds. PA11 or PA12 as I recall.

    Definitely review the errata as you floor plan the pin escape of your design.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..