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

Set Timer tick for system clock task

Hello,

I changed the values for PLL in the startup_RTX.s file from the "HTTP_Example with RTX". Following is the code I changed. The original values are the one with ";" in front. This part of coude can be found at around line 300 of the startup file.

;PLLCFG_Val      EQU     0x00000007             ;7+1 = 8 * multiplier van mainclock (=>72MHz)
PLLCFG_Val      EQU     0x0000000B              ;11+1 = 12 * (12*2)/1 = 288MHz intern
;CCLKCFG_Val     EQU     0x00000003             ;3+1 = 4 * divider van PLLclock
CCLKCFG_Val     EQU     0x00000004              ;3+1 = 4 * divider van PLLclock = 72MHz
;USBCLKCFG_Val   EQU     0x00000003             ;3+1 = 4 * divider van PLLclock
USBCLKCFG_Val   EQU     0x00000005              ;5+1 = 6 * divider van PLLclock = 48 MHz
PCLKSEL0_Val    EQU     0x00010000              ;PCLK_SPI set to CCLK (48MHz)

So I changed it to have the following things:
-internal PLL rate of 288MHz
-divided by 4, this gives 72MHz for CPU
-divided by 6, this gives 48MHz for USB

When I do this, then the system clock isn't correct any more. What do I have to change to get it right again? The original CPU speed is 48MHz. So when I want to generate a periodic cycle of 2s, it's now only 1.333s...

Also, could it be that the CPU is less stable? When I reset my CPU, it blocks about 4 on 5 times.

Anyone got any experience with this?

0