This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32F401RE: Where does CK_INT (Internal Clock) come from?

Hi,

Using the STM32F401RE uC I wonder where the clock signal CK_INT is originating from as is shown in a Timer1 figure. I searched al the reference manual but did not find it. As my SysClk is 30MHz, checked with the MCO2 output by oscilloscoop and all AHB and APB prescalers are set to zero, Timer1 is clocked with 15MHz as I can check by toggling a GPIO on the update interrupt (TIM1_UP_TIM10_IRQHandler) with reload value of 10.000. It should be 30MHz. Do I mis some divider?

Thanks

Henk

Parents
  • CLK_INT would be from the APB divider chain to which the TIM is attached, per the Clock Tree Diagram.

    In all but the DIV1 case the clock feed to the timer is 2X that of the APB. The ratios of the clocks are set up in the RCC.

    If the part clocks at 84 MHz, and APB2 is 84 MHz (DIV1), and APB1 is 42 MHz (DIV2), then TIM2 on APB1 would clock at 84 MHz internally.

    Toggling halves frequency.

    How would 10 or 10000 get you to 30 MHz? If the CPU/APB1/APB2 all clock at 30 MHz (ie DIV1) then the TIM would clock at 30 MHz, toggling a GPIO with a Period of 10000-1 (N ticks programmed as N-1) the interrupt would occur at 3 KHz, a toggled pin would scope at 1.5 KHz

Reply
  • CLK_INT would be from the APB divider chain to which the TIM is attached, per the Clock Tree Diagram.

    In all but the DIV1 case the clock feed to the timer is 2X that of the APB. The ratios of the clocks are set up in the RCC.

    If the part clocks at 84 MHz, and APB2 is 84 MHz (DIV1), and APB1 is 42 MHz (DIV2), then TIM2 on APB1 would clock at 84 MHz internally.

    Toggling halves frequency.

    How would 10 or 10000 get you to 30 MHz? If the CPU/APB1/APB2 all clock at 30 MHz (ie DIV1) then the TIM would clock at 30 MHz, toggling a GPIO with a Period of 10000-1 (N ticks programmed as N-1) the interrupt would occur at 3 KHz, a toggled pin would scope at 1.5 KHz

Children