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

Hi @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

Hi @Community member​ 

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.

Hi @Community member​ ,

I did some tests to check if the TIM20 can be used in any way and especially if it is actually present or not in STM32F303RE. In my opinion it is NOT present, as Wael rightly wrote.

The test is the following: if you see in the reference manual on page 151 the register RCC_APB2ENR you will see that there is bit 20 (TIM20EN) to enable the clock at TIM20. Instead with TrueStudio, if you enter debug mode, then open the internal registers, and display RCC_APB2ENR, you will see that bit 20 (TIM20EN) is missing, so it is impossible to enable the clock to TIM20:

0690X000006D9CrQAK.jpg

So STM32CubeMX is right. The fault could be in TrueStudio which displays the TIM20 register even if it is not really available.

Andrea

WBOUG
Senior

Hi @Andrea Canepa​ 

You're right about your bug 2

it will be implemented in the next version

Best Regards,

Wael

Missing bit in an IDE proves nothing. It may be a bug in the IDE.

Try to write 0xFFFFFFFF into APB2ENR, then read it back - that reveals which bits are implemented.

JW

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

Yes, that's the problem I am complaining about. If there are missing modules in certain models, the reference manual should say so.

JW