cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX Version 5 bugs: missing TIM20 and wrong clock in TIM2 Clock Configuration

Andrea Canepa
Senior

I have created a project for STM32F303REtx.

1° BUG: TIM20 is missing from the list of available timers. Instead in the "reference manual" and in the internal registers visible in debugging the TIM20 timer is present. See attached picture: 0690X000006CUUJQA4.png

2° BUG: In the clock settings, for the TIM2 timer I have selected PLLCLK*2 in order to have 144 MHz (as is the case for TIM3/4 visible in the image).

At the time of setting, the correct indication (144MHz) occurs in the rectangle next to the word "TIM2". After saving the project, closing the project and opening the same project again, going to see in the clock configuration I always find "72MHz". In truth, the true clock at TIM2 is 144MHz, so it's just a data display problem, in fact the generated code is right.

0690X000006CUUsQAO.pngRegards,

Andrea

15 REPLIES 15
WBOUG
Senior

Hello @Andrea Canepa​ 

Thank you very much for your feedback.

  • About 1° BUG it will be corrected in next CubeMX version .
  • About 2° BUG you are working with an MCU whose default frequency is not very important, however if you use a Board it is mandatory a default freiquece

Best regards,

Wael

About 2° BUG: as I wrote, the actual frequency at TIM2 is 144 MHz, so the generated code is right. It is only a display defect that occurs after saving and reloading the project. Made myself clear?

WBOUG
Senior

Hello @Andrea Canepa​ 

Yes you're right but it's not a real bug. You can change the manual frequency since you work with MCU.

Best regards,

 Wael

Andrea Canepa
Senior

Ok, but to me it does not seem correct that if I select the 144MHz frequency, and I actually get 144 MHz, then the written one goes back to 72MHz. I consider it a BUG, otherwise it would remain with the writing 144 MHz as it happens for the other timers (see TIM3/4 in the same image); I do not think this was intended by programmers.

Regards,

Andrea

WBOUG
Senior

Hello @Andrea Canepa​ 

OK sir. I will do my best and I will always be at your service and availability at any time.

Best regards,

Wael

Hello @WBOUG​ 

I wanted to say that both reported bugs are still present in STM32CubeMX 5.0.1.

Since you wrote "About 1° BUG it will be corrected in next CubeMX version" I was hoping this would happen (from 5.0.0 to 5.0.1).

Thanks

Andrea

Hello @Andrea Canepa​ 

datasheet table 2 and its associated note 1 indicates the contrary.

refman supports all component of the series and does not distinguish F303Rx or F303Vx for example

SVD file is unique for all F303 devices. this is why you can find Tim20 for F303Rx

Best Regards,

Wael

Hello @WBOUG​ 

you are right: on the data-sheet there is written what you say.

What misled me is that in the "Reference Manual" page 43, table 1, in the column called "STM32F303xD / E", on the "Section 20" line, reads "TIM1, TIM8 and TIM20". Since I have the "STM32F303RE" I thought it was the right column. I have not looked at the datasheet.

Furthermore, in the Debug of Atollic TrueStudio the TIM20 registers are present:

0690X000006D8rjQAC.jpgHowever now I understand: it is better to check the datasheet! ;)

Instead regarding the 2nd bug reported, do you have any updates?

Regards

Andrea

Hi @WBOUG​ ,

While in 'F303Rx - i.e. 64-pin packages - there are not TIM20-related pins - the timer may still be present internally and usable for all purposes which do not require pins - e.g. timing, DMA triggering, ADC triggering,

Can you please positively confirm that TIM20 is *not* present (or *not* supported, e.g. *not* tested, or may be removed in future revisions) in the Rx packages? If it is so, Table 1, and the note in chapter 20.1 TIM1/TIM8/TIM20 introduction in RM0316 should reflect this fact, too.

Thanks,

JW