cancel
Showing results for 
Search instead for 
Did you mean: 

AN4013 & RM0313 contradict about Timer Features?

profclonk
Associate II
Posted on July 08, 2013 at 00:37

Hello Forum,

i am trying to get an overview of the various timer periphals present in the STM32 Mikrocontroller Family. It now seems that the two documents

http://www.st.com/st-web-ui/static/active/cn/resource/technical/document/application_note/DM00042534.pdf

and

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/reference_manual/DM00041563.pdf

contradict each other. Table 2 on page 7 of AN4013 states that TIM13 of the STM32F37x Mikrocontrollers is a ''1 Channel'' type Timer module, and according to table 3, page 8 this type can act as a synchronization Master. However, the STM32F37/8x Reference Manual (RM0313) states on page 342 that TIM13 doesn't have this synchronization feature. The register description starting on page 373 supports this (no SMS bits, no SMCR register).

Additionally, the AN states on page 9 that Basic Timers can use external clocks on pins TI1, TI2, ETR, while the RM0313 says that the Basic Timers can only be clocked by the internal clock (RCC), on page 449, and the register description has no CC*S bits and no CCMRx register to configure an external clock source.

Which of the two documents is correct? The AN looked like a nice overview of the capabilities of the various Timer Periphals, but if it were incorrect, would i have to gather this information by comparing all the respective chapters in the RMs? Can i assume that e.g. TIM13 always has the same features (and register layout) on all STM32 Mikrocontrollers?

Thank you very much for any help!
7 REPLIES 7
Posted on July 08, 2013 at 08:51

The timers' description in ST's materials is an incredible mess. Instead of one properly written chapter, dealing with all the features and pointing out those omitted in the lesser-capable timers, they inflated the UMs with several copies of the timers' description, plagued with factual errors, omissions, apparent copy/paste and forgot-to-delete-this errors - plus the basic text is still of very poor quality.

For the 'F4xx, which I use, I tried to write down some of the most obvious errors in a ''doc errors'' writeup, http://www.efton.sk/STM32/STM32F4xx_doc_errors.txt ; but as far as the timers' chapters go, I'd recommend ST to discard the existing and rewrite it from scrap.

For your amusement, for example, have a glimpse at Table 49 on page 363 in RM0313...

JW

hatem_ch
Associate II
Posted on July 09, 2013 at 19:10

I think that we all have the same feeling regarding the quality of documentation. But, it is also fair to mention that a remarkable enhancement is observed over the whole documentation.From my point of view microcontrollers’ documentation from ST is still under expectations relatively compared to the huge success observed on market for the STM32 and STM8 microcontrollers.Based on my experience with STM32 MCUs, I think that Timers have one of the most complex documentation. I think that this is due mainly to the big number of features and the high degree of flexibility found on this peripheral. It is very challenging to have a high quality documentation that equals the already nice silicon

Anyway, let’s speak more technically. The TIM13 may serve as synchronization Master even it was not built with a synchronization bloc or feature. In fact, and if my memory is good, the only channel that it has serves also as a synchronization output. It is redirected internally to the other slave Timers’ trigger inputs. The information is located somewhere in the reference manual, I let you enjoy searching it.For the second part of your question, I think it is a good remark. Really, I do not have any idea.

Ciao,einSTein
Posted on July 09, 2013 at 20:13

The information is located somewhere in the reference manual

As far as I can tell the only timer that can use it is TIM12, kind a be helpful if it was usable by two or more timers if you want it to ''synchronize'' anything? And it's not a common source on the SDADC either.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Amel NASRI
ST Employee
Posted on July 11, 2013 at 13:37

The TIM13 may serve as synchronization Master even it was not built with a synchronization bloc or feature.

I confirm what was said by einSTein regarding the fact that TIM13 uses its unique channel’s output to trigger the other Timers as it has no Trigger Controller bloc.

For the second part of your question, I think it is a good remark. Really, I do not have any idea.

 

 

Regarding the discrepancy found between the RM0313 and the AN4013, It may be due to the confusing title of the chapter2 in the AN4013.

In fact, if we look at the RM0313, it is clear that there are 4 types of Timers:
  • The Advanced Control Timers
  • The General Purpose Timers
  • The “Lite�? General Purpose Timers (channels’ number is equal or less than 2)
  • The Basic Timers (TIM6 & TIM7)

The Basic Timers are solely clocked by the internal clock source (APB clock source). This is clearly stated in the RM0313 as highlighted previously by Erlkoenig.

Where for the AN4013, the chapter 2 is describing the basic modes for the General-Purpose Timers.

So, the confusion comes from the title of the chapter in the AN4013. But from technical point of view, the two documents are coherent.

To avoid such confusion, the right title for AN4013’s chapter2 should become something like “General-purpose timer modes�?.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

profclonk
Associate II
Posted on July 18, 2013 at 11:06

Thanks for your replies... @waclawek.jan, nice list. If TIM13 can act as a sync master, what slaves can be connected to it? Would that be common to all STM32 devices that have a TIM13?

Indeed, that title in the AN is confusing.

Regarding documentation quality, it would be sufficient (and great) if it were at least complete & correct (as in doesn't contradict itself), nobody is saying that it has to be like Atmel's or something.

It would probably have been less work to write one ''master Timer chapter'' that deals with all Timer features and provide a feature matrix, than making a copy of the chapter for each timer. At least for the ''non-professional'' community doc quality is a big argument for selecting MCU Vendors - don't know how important those are for ST, though.

Btw, there is probably some kind of machine-readable ''Master Database'' with exact information about which STM32 Controller contains what periphals and what features those have, out of which the StdPeriphal Library is generated. Is this Database available somewhere?

Posted on July 18, 2013 at 14:43

If TIM13 can act as a sync master, what slaves can be connected to it?

 

As mentioned, that would be just TIM12

nobody is saying that it has to be like Atmel's or something.

 

I'll take the working flash and less annoying errata from ST
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Amel NASRI
ST Employee
Posted on July 18, 2013 at 15:03

It would probably have been less work to write one ''master Timer chapter'' that deals with all Timer features and provide a feature matrix, than making a copy of the chapter for each timer.

 

In the refernce manual, it is required to have all technical details. May be it will be interesting to add a table summarizing features of all timers as you suggested. But this can be available in a brochure for example or the AN4013.

Btw, there is probably some kind of machine-readable ''Master Database'' with exact information about which STM32 Controller contains what periphals and what features those have, out of which the StdPeriphal Library is generated. Is this Database available somewhere?

 

There is already a similar solution, not exactly what you look for but it may be helpful.

It is accessible from

http://www.st.com/web/en/catalog/mmc/FM141/SC1169

.

In this interface, you can select peripherals with some of the features that you may need. Then with selected filters, the products part numbers matching these criteria will be displayed. You can choose the product you need then you go to the page containing all application notes, documentation & firmwares that you may need & related to this product.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.