cancel
Showing results for 
Search instead for 
Did you mean: 

Remap of TIM1 and USART1

andreas2
Associate II
Posted on February 20, 2008 at 06:18

Remap of TIM1 and USART1

5 REPLIES 5
andreas2
Associate II
Posted on May 17, 2011 at 12:24

Hi!

I'm puzzled by the remap configuration for TIM1 and USART1 in the 64-pin package. Since TIM1 CH1-3 (positive) can be remapped in 100-pin package only, and the USART1 is mapped to PA9 & PA10 by default, what determines which alternate function gets output at those pins?

Does this mean that the bootloader is unavailable in 64-pin package when the TIM1 channels are wired to mosfet drivers? If I boot from System Memory, will my mosfets go crazy?

Best regards,

Andreas Fritiofson

Unjo AB

lanchon
Associate III
Posted on May 17, 2011 at 12:24

of course USART1 can't be remapped before booting, so PA9/10 are your only options, but you can:

-gate PA9/10 before the FETs using a GPIO, so that FETs won't turn on while booting

-program your own bootloader (some are posted here, there's also the DFU USB app)

-not gate PA9/10 and do nothing, since turning on only the high side FETs might not cause any trouble

I too wished TIM1 had more mapping options...

andreas2
Associate II
Posted on May 17, 2011 at 12:24

Thanks. The bootloader is not a big issue, since we won't use it it when the product is shipped. If we need one we'll have to roll our own anyway.

So which of TIM1 and USART1 controls PA9 by default (after switching the pin to alternate function) since both peripherals are mapped to this pin?

tta
Associate II
Posted on May 17, 2011 at 12:24

to make the remapping work, remember to enable clock the the remapping system also, else no response :)

I had a coleaque playing arround for a while with this ..

lanchon
Associate III
Posted on May 17, 2011 at 12:24

Well I believe there's no official answer to that simple question, see

http://www.st.com/mcu/forums-cat-6268-23.html

. I've no clue why ST hasn't clarified this here after that post.

The gut feeling answer is that if you don't enable USART1 (or don't enable those particular pins, if they were optional like DSR, CTS, etc) then TIM1 will get the pins. In your case you could also remap USART1 (but not for bootloading of course).