cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple funcs mapped to one Pin

ziegler
Associate
Posted on March 29, 2015 at 00:45

Hi,

     I am a student studying EE, and do not have any experience in circuit design besides the theory being taught in college and a six month hardware design Co-Op. Currently, I am developing a board to be used for a prospective autonomous machine. This is more for learning and a hobby than an actual good product but I hope to achieve both (I know I can use an Rpi or a uino, but I'd rather not). I've been working on this board for two weeks everyday, and I am actually quite addicted. Learning so much about topics not covered in University. 

       Anyways, my question lies within the pinout of the STM32. There are multiple pins that are defaulted to more than one function. For example pin PA1 for my specific stm32 is defaulted to all of the following: USART2_RTS/ ADC12_IN1/TIM5_CH2 /TIM2_CH2/ETH_MII_RX_CLK/ETH_RMII_REF_CLK

      Now how do I work with that? Once I get coding, will I implement each function at a different clock cycle or something of the sort w/i the code? Also, how do I route theme on my board if it has more than one function? Do I use a demux? Any clarification on this matter will be greatly appreciated. 

      Thank you.

-Charlie

#stm32 #usart #ethernet #adc #stm32f4 #discovery
3 REPLIES 3
Posted on March 29, 2015 at 05:21

Not sure which STM32 specifically you are using, ST make several of them.

You get to escape a single function, via an internal multiplexor, on the F1 there are groups of pins tied together, ie for USART1 TX/RX, TIM4 CH1,CH2,CH3,CH4, etc.

It's not possible to use all the peripherals inside the STM32 all at once, it's just impossible to escape all the pins. Low pin count parts further constrain this. The design task is to determine the peripherals and pins you need.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ziegler
Associate
Posted on March 29, 2015 at 05:45

Thanks clive. I am using the F1, specifically F107vc. I'm still a little confused. The internal mux works for individual pins, or is it to quickly switch between different peripherals? It sounds like I'll be able to use ethernet on that pin in my example, but none of the other usart or tim channels on that pin, but I could remap them if desired if remap capable. Is that correct?

Posted on March 29, 2015 at 15:06

The internal mux works for individual pins, or is it to quickly switch between different peripherals?

You program a setting that acts as a static routing.

The newer F2, F4, L1, etc families have a pin level mux, supporting up to 16 peripheral options per pin (usually less populated than that, but have 4-bits per pin). The F1 has a peripheral/block level assignment of pins.

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