Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

XMEGA External Cristal not work in 2.0.7.7

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
barni7

Bascom Member



Joined: 09 May 2007
Posts: 1

blank.gif
PostPosted: Sun Oct 05, 2014 8:09 pm    Post subject: XMEGA External Cristal not work in 2.0.7.7 Reply with quote

I have use a cristal with 8 MHz in Version 2.0.7.6.
This code works fine.
Now in Version 2.0.7.7 it's dont work.


Code:
$crystal = 32000000                                         ' xmega128 is running on 32 MHz
$regfile = "xm128a1def.dat"
$lib "xmega.lib"                                            ' add a reference to this lib
$loader = &H10000
'configure the systemclock
Config Osc = Disabled , Extosc = Enabled , Range = 2mhz_9mhz , Startup = Xtal_256clk
'Set the Multiplication factor and select the clock Reference for the PLL
Cpu_ccp = &HD8
Osc_pllctrl = &B11_0_00100                               ' EXTERNAL clock Source and Multiplication factor = 4
Bitwait Osc_status.3 , Set                               'Check if XOSCRDY is ready
Set Osc_ctrl.4                                           ' PLL enable
Config Sysclock = Pll , Prescalea = 1 , Prescalebc = 1_1
 


(BASCOM-AVR version : 2.0.7.7 )
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Sun Oct 05, 2014 9:14 pm    Post subject: Reply with quote

when you change : Config Osc = Disabled to Config Osc = ENABLED it will work as before.
In 2077 there is a check on the oscillator status bits that are enabled, but since the internal osc will return a 1 as well, the code keeps checking. So the solution is to enable this bit so it will be part of the test.
In the next update this bit is AND-ed when not used so this work around is not required any more.

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum