Clock source change (XC23xx)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Ted
Employee
Employee
Hello there,

For XC2364, I'd like to change clock source from external(or internal) to internal(or external) during run-time.

I had been trying to search this topic out until I found that there is no such page in our um nor pg.

Is there anyone knows this method? or could you tell me where the relevant reference document is?
0 Likes
5 Replies
Not applicable
Refer this file from IFX website:
http://www.infineon.com/cms/en/product/microcontrollers/16-bit/xc2300-family-safety/channel.html?cha...
XC2000/XE166 Programmers Guide (xc2000_xe166_pg_v2.1_2009_07.pdf)
0 Likes
Ted
Employee
Employee
Let me add some more information for your better understanding.
My customer is using XC2364 for their system and has been trying to implement clock failure handling code.
Originally, I've tried to implement emergency clock system(500KHz) according to our UM and PG.
But the thing is, when we(customer and me) made a short-circuit between XTAL1 and XTAL2, system clock runs on about 21~22MHz.
Besides, software runs through as we expected even without reset! (means overall system looks like run on 20MHz, for instance PWM, timer and so on)

Here's their settings for PLL :
1) Clock Source : 8MHz X-tal
2) Final System clock : 40MHz
3) TRAP : Default (No OSCWDT, No VCO loss-of-lock TRAP)
4) Emergency Clock : Disabled

Now, my questions is,
[1] Where does the number of "21~22MHz" come from?
[2] Is this clock safe for system?
[3] If user doesn't set the configuration for 'Emergency Clock'(means disabled) what happens in case of OSCWDT or VCO lock failure?

If you need more information to solve this, let me know.
0 Likes
Not applicable
XC2000/XE166 Family Programmer’s Guide

XC2000/XE166 Family 16/32-Bit Single-Chip Microcontroller with
32-Bit Performance Clock and Power Management.

This AN will tell you how to change power mode...But I don't suggest to read this file...Let IFX FAE give you a LIB to change power mode...The LIB I get is ScuConfigTool.exe
0 Likes
Not applicable
we use XC2364B,DAvE Generate Software can change fsys from 80M to Vco Base Frq when external osc loss.
0 Likes
Ted
Employee
Employee
Thanks alexshao and Sandiage.

My questions are not clearly answered but I think I can guess what happens in my customer's ECU.
0 Likes