I am currently trying to adjust a clock for a serial interface.
As I can only get 25Mhz or 16,6MHz and nothing in between, I am thinking of adjusting the reference clock.
What would be affected by that? I am thinking of timers, is there anything else?
What is affected by changing the reference clock? Topic is solved
-
- XCore Addict
- Posts: 191
- Joined: Tue Jul 05, 2016 2:19 pm
-
- XCore Legend
- Posts: 1126
- Joined: Thu May 27, 2010 10:08 am
The clocks in an xcore are as follows:
https://www.xmos.com/download/private/A ... rc1%29.pdf)
Note that XS2 (xcore200) doesn't have standby mode, but the rest is accurate.
Changing the reference clock will affect a lot of stuff - basically anything connected to CLKBLK 0 which by default everything is including timers and ports. You can find out from the code what the speed is using:
You know you can clock a clockblock from the 500MHz clock divided by 2n?
That may get you closer to what you want without changing ref clock values..
(from Note that XS2 (xcore200) doesn't have standby mode, but the rest is accurate.
Changing the reference clock will affect a lot of stuff - basically anything connected to CLKBLK 0 which by default everything is including timers and ports. You can find out from the code what the speed is using:
and compensate for any use of timers by scaling delays, but slow down the ref clock too much and ports might start behaving differently too. Pretty much all of the software IP written assumes 100MHz ref clock.PLATFORM_REFERENCE_HZ
You know you can clock a clockblock from the 500MHz clock divided by 2n?
void configure_clock_xcore(clock clk, unsigned char divide);
That may get you closer to what you want without changing ref clock values..
You do not have the required permissions to view the files attached to this post.
-
- XCore Addict
- Posts: 191
- Joined: Tue Jul 05, 2016 2:19 pm
Awesome, thank you.
I did not know I can use the system clock to drive ports.
I did not know I can use the system clock to drive ports.