Skip to main content
wuio
Associate III
Jan 21, 2019 9:13 AM UTC
Solved

STM32CubeMX V5.0.1: error in uwTimclock with STM32G0xx (with Timebase source TIM15, TIM16, TIM17)

If, as the basis of time, I use a different timer than the systick in the hal_timebase_tim file in the ruler

 uwTimclock = HAL_RCC_GetPCLK2Freq ();

there is an error. Should

 uwTimclock = HAL_RCC_GetPCLK1Freq ();

This topic has been closed for replies.
WBOUGBest answer
Visitor II
Jan 24, 2019 9:15 AM UTC

Hi @wuio​ 

Your issue has been transmitted for the dev team.

it will be implemented in the next version of the CubeMX.

Best Regards,

Wael

4 replies

ST Technical Moderator
Jan 21, 2019 3:23 PM UTC

Hello @wuio​ ,

Can you please share your ioc file to check this issue.

I cannot reproduce your issue, I checked from my side and I have:

 uwTimclock = HAL_RCC_GetPCLK1Freq();

Kind Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
wuio
wuioAuthor
Associate III
Jan 22, 2019 10:32 AM UTC

It depends on which timer you choose as the basis of the system time. I chose tim17 but when I chose tim 6 it was ok.

ST Technical Moderator
Jan 22, 2019 2:13 PM UTC

Hi @wuio​ ,

You are right, I raised this issue internally to CubeMX team for fix.

Thanks for your contribution.

Kind Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
WBOUGBest answer
Visitor II
Jan 24, 2019 9:15 AM UTC

Hi @wuio​ 

Your issue has been transmitted for the dev team.

it will be implemented in the next version of the CubeMX.

Best Regards,

Wael