cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Alternate Functions on STM32F030?

Willunen
Associate III
Posted on July 08, 2017 at 22:35

On page 34 of the STM32F030 datasheet there is a table of Alternate Functions that I think contains an error.

If you look at the GPIOA_AFR registers for port A and select column AF4 you will see that TIM14_CH1 is mentioned twice. The first time in connection with PA4 and the second time with PA7.

Either I do not quite understand how it works or the second instance of TIM14_CH1 should be in another column.

Besides that, why isn't this table in the Reference Manual (RM0360)?!

(btw.  AF4 does connect TIM14_CH1 to PA4 )

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on July 09, 2017 at 01:10

It's a pin level mux, so the same signal can technically appear at multiple pins, you'd want to avoid doing that in practice, and PICK ONE, but the purpose is to allow signal escape and routing options across a wide range of parts sharing the same die, and in different packages.

The RM is a family level document, which might cover multiple die, the Data Sheet is more specifically die/package related. ie a model with more FLASH and RAM might well have additional peripherals (TIM, USART, etc).

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

View solution in original post

3 REPLIES 3
Posted on July 09, 2017 at 01:10

It's a pin level mux, so the same signal can technically appear at multiple pins, you'd want to avoid doing that in practice, and PICK ONE, but the purpose is to allow signal escape and routing options across a wide range of parts sharing the same die, and in different packages.

The RM is a family level document, which might cover multiple die, the Data Sheet is more specifically die/package related. ie a model with more FLASH and RAM might well have additional peripherals (TIM, USART, etc).

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on July 09, 2017 at 01:15

The pin table calls out PA4 connecting to TIM14_CH1 as well as the AF table.

You'd want to make sure the GPIOA clock is enabled before setting the mux, and confirm TIM14 is supported in the specific part, although there is not a note to suggest otherwise from a quick skim of the table. Sorry, not a part I'm using, if on a DISCO/NUCLEO board confirm the pin doesn't have some external conflict.

http://www.st.com/content/ccc/resource/technical/document/datasheet/a4/5d/0b/0e/87/c4/4d/71/DM00088500.pdf/files/DM00088500.pdf/jcr:content/translations/en.DM00088500.pdf

 
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on July 09, 2017 at 08:02

TIM14 is supported, and I have no problems using it. I'm using the bare STM32F030 chip in the TSSOP20 version, no development board.

What I didn't understand is how TIM14_CH1 could be redirected to PA4 or PA7 via the same AF4 setting. I missed the fact that this setting is placed on either AFR4 (PA4) or AFR7 (PA7) location in the AFRL register.  I understand it now.

(It never occurred to me that one could do both, I'll give it a try :-))

Thanks for explaining.