attiny167-esxz ATMEL Corporation, attiny167-esxz Datasheet - Page 268

no-image

attiny167-esxz

Manufacturer Part Number
attiny167-esxz
Description
8-bit Avr 8-bit Microcontroller Microcontroller With 16k Bytes In-system Programmable Flash And Lin Controller
Manufacturer
ATMEL Corporation
Datasheet
268
ATtiny167
3. ‘Disable Clock Source’ command remains enabled.
Problem fix / workaround .
a. No workaround.
b. As soon as possible, after any CLKSELR modification, re-write the appropriate crystal
Code example:
; (*) !!! Loose gain control of crystal oscillator !!!
; ==> WORKAROUND ...
; ...
In the Dynamic Clock Switch module, the ‘Disable Clock Source’ command remains running
after disabling the targeted clock source (the clock source is set in the CLKSELR register).
Problem fix / workaround.
After a ‘Disable Clock Source’ command, reset the CLKCSR register writing 0x80.
Code example:
; (*) !!! At this moment, if any other clock source is selected by CLKSELR,
;
; ==> WORKAROUND ...
; Select crystal oscillator ( 16MHz crystal, fast rising power)
; Enable clock source (crystal oscillator)
;
; Select watchdog clock ( 128KHz, fast rising power)
; Select crystal oscillator
; Disable clock source (crystal oscillator)
oscillator setting (CSEL[3]=1 and CSEL[2..0] / CSUT[1..0] bits) in CLKSELR.
Clock source switch
ldi
sts
ldi
ldi
sts
sts
ldi
sts
sts
ldi
sts
sts
ldi
sts
ldi
ldi
sts
sts
sts
this clock source will also stop !!!
temp1,((0x0F<<CSEL0)|(0x02<<CSUT0))
CLKSELR, temp1
temp2,(1<<CLKCCE)
temp3,(0x02<<CLKC0)
CLKCSR,temp2
CLKCSR,temp3
temp3,(0x04<<CLKC0)
CLKCSR,temp2
CLKCSR,temp3
temp3,((0x03<<CSEL0)|(0x02<<CSUT0))
CLKSELR, temp3
CLKSELR, temp1
temp1,(0x0F<<CSEL0)
CLKSELR, temp1
temp2,(1<<CLKCCE)
temp3,(0x01<<CLKC0)
CLKCSR,temp2
CLKCSR,temp3
CLKCSR,temp2
; CSEL = "0010"
; Enable CLKCSR register access
; Enable crystal oscillator clock
; CSEL = "0100"
; Enable CLKCSR register access
; Clock source switch
; (*)
; CSEL = "0001"
; Enable CLKCSR register access
; (*) Disable crystal oscillator clock
7728A–AUTO–07/08

Related parts for attiny167-esxz