2017-05-17 01:57 AM
Hello,
it seems cube does not take care of time TIMPRE x4 multiplier for the AHB1 timer clock
Note: this post was migrated and contained many threaded conversations, some content may be missing.2017-05-17 02:39 AM
Hi
Bonnes.Uwe
,Please make sure that theTIM Prescaler selection is enabled from RCC configuration tab:
-Nesrine-
2017-05-17 05:30 AM
Dear Nesrine,
thanks for the hint. However when setting the frequency field for AHB1 timer clock to 200 Mhz, cube tries hard to find a solution, but does not come up with the 'TIM Prescaler selection from RCC configuration'.
2017-05-17 07:39 AM
Hi
Bonnes.Uwe
,I' am not able to reproduce the issue that you describe :
when the TIMPRE bit in the RCC_DCKCFGR1 register is set, if APBx prescaler is 1,2 or 4, then TIMxCLK = HCLK, otherwise TIMxCLK = 4x PCLKx.
When TIMPRE bit of the RCC_DKCFGR1 register is reset, if APBx prescaler is 1, then TIMxCLK = PCLKx, otherwise
TIMxCLK = 2x PCLKxCould you please share your *ioc file for check?
-Nesrine-
2017-05-18 04:02 AM
Dear Nesrine,
do it the other way round. Start with a new project, change to the clock configuration view, set up PLL to run at highest speed, correct all AHB/APB prescalers so that all bus speeds are in the limit. Now the ABPx timer clocks are twice the value of the corresponding ABPx clock. No change the APB1 timer clock frequency input field to the value of HCLK. Cube starts to find a solution, but does not come up with TIMPRE and offers no solution. Cube should consider TIMPRE in that case.
2017-05-18 05:02 AM
Hi
Bonnes.Uwe
,I followed all steps that you describe but I am not able to reproduceyourissue.
So could you please share
the STM32CubeMX.log file that you find under your user directory in the .stm32cubemx folder?
-Nesrine-
2017-05-18 05:41 AM
I don´t see a possibility on this page to share a file...
2017-05-18 07:37 AM
Hi
Bonnes.Uwe
,Please use advenced editor
-Nesrine-
2017-05-18 11:21 AM
Her the logfile.
________________ Attachments : STM32CubeMX.log.sav.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hyeu&d=%2Fa%2F0X0000000bAe%2FS7_8as1REvP_JGIEBvpXQBPCRKS.lHelToXzP_OmeYk&asPdf=false2017-10-19 05:42 AM
Hello,
Please note the following feature on CubeMX clock tree. By right clicking the clock tree, you can lock a value you want to remain unchanged (HCLK here), then to reach 200MHz for the timer the timer pre-scaler will be adjusted fine.