[info] name = "TIMER3" desc = "16-Bit Timer/Counter3" [[int]] name = "TIMER3_CAPT" desc = "Timer/Counter3 Capture Event" vect = 31 [[int]] name = "TIMER3_COMPA" desc = "Timer/Counter3 Compare Match A" vect = 32 [[int]] name = "TIMER3_COMPB" desc = "Timer/Counter3 Compare Match B" vect = 33 [[int]] name = "TIMER3_COMPC" desc = "Timer/Counter3 Compare Match C" vect = 34 [[int]] name = "TIMER3_OVF" desc = "Timer/Counter3 Overflow" vect = 35 [val.com] values = [ {valu=0, name="DISCONNECTED", desc="Normal port operation, OC3x disconnected"}, {valu=1, name="MATCH_TOGGLE", desc="Toggle OC3x on Compare Match (Might depend on WGM)"}, {valu=2, name="MATCH_CLEAR", desc="Clear OC3x on Compare Match (If PWM is enabled, OC3x is set at TOP)"}, {valu=3, name="MATCH_SET", desc="Set OC3x on Compare Match (If PWM is enabled, OC3x is cleared at TOP)"}, ] [val.cs] values = [ {valu=0, name="STOPPED", desc="No clock source (Timer/Counter stopped)"}, {valu=1, name="IO", desc="clkIO/1 (No prescaling)"}, {valu=2, name="IO_8", desc="clkIO/8 (From prescaler)"}, {valu=3, name="IO_64", desc="clkIO/64 (From prescaler)"}, {valu=4, name="IO_256", desc="clkIO/256 (From prescaler)"}, {valu=5, name="IO_1024", desc="clkIO/1024 (From prescaler)"}, {valu=6, name="EXT_FALLING", desc="External clock source on T0 pin. Clock on falling edge."}, {valu=7, name="EXT_RISING", desc="External clock source on T0 pin. Clock on rising edge."}, ] #---------------------------------------------------------------------# [[reg]] name = "TIFR" desc = "Timer Interrupt Flag Register" addr = "0x38" fields = [ {name="ICF", desc="Input Capture Flag", rnge="5:5"}, {name="OCF_C", desc="Output Compare C Match Flag", rnge="3:3"}, {name="OCF_B", desc="Output Compare B Match Flag", rnge="2:2"}, {name="OCF_A", desc="Output Compare A Match Flag", rnge="1:1"}, {name="TOV", desc="Timer Overflow Flag", rnge="0:0"}, ] #---------------------------------------------------------------------# [[reg]] name = "TCCR_A" desc = "Timer/Counter Control Register A" addr = "0x90" fields = [ {name="COM_A", desc="Compare Output Mode for Channel A", rnge="7:6", valu="com"}, {name="COM_B", desc="Compare Output Mode for Channel B", rnge="5:4", valu="com"}, {name="COM_C", desc="Compare Output Mode for Channel C", rnge="3:2", valu="com"}, {name="WGM0", desc="Waveform Generation Mode 1:0", rnge="1:0"}, ] #---------------------------------------------------------------------# [[reg]] name = "TCCR_B" desc = "Timer/Counter Control Register B" addr = "0x91" fields = [ {name="ICNC", desc="Input Capture Noise Canceler", rnge="7:7"}, {name="ICES", desc="Input Capture Edge Set", rnge="6:6"}, {name="WGM2", desc="Waveform Generation Mode 3:2", rnge="4:3"}, {name="CS", desc="Clock Select", rnge="2:0", valu="cs"}, ] #---------------------------------------------------------------------# [[reg]] name = "TCCR_C" desc = "Timer/Counter Control Register C" addr = "0x92" fields = [ {name="FOC_A", desc="Force Output Compare for Channel A", rnge="7:7"}, {name="FOC_B", desc="Force Output Compare for Channel B", rnge="6:6"}, {name="FOC_C", desc="Force Output Compare for Channel C", rnge="5:5"}, ] #---------------------------------------------------------------------# [[reg]] name = "TCNT_H" desc = "Timer/Counter Register High Byte" addr = "0x95" safe = true #---------------------------------------------------------------------# [[reg]] name = "TCNT_L" desc = "Timer/Counter Register Low Byte" addr = "0x94" safe = true #---------------------------------------------------------------------# [[reg]] name = "OCR_A_H" desc = "Output Compare Register A High Byte" addr = "0x99" safe = true #---------------------------------------------------------------------# [[reg]] name = "OCR_A_L" desc = "Output Compare Register A Low Byte" addr = "0x98" safe = true #---------------------------------------------------------------------# [[reg]] name = "OCR_B_H" desc = "Output Compare Register B High Byte" addr = "0x9B" safe = true #---------------------------------------------------------------------# [[reg]] name = "OCR_B_L" desc = "Output Compare Register B Low Byte" addr = "0x9A" safe = true #---------------------------------------------------------------------# [[reg]] name = "OCR_C_H" desc = "Output Compare Register C High Byte" addr = "0x9D" safe = true #---------------------------------------------------------------------# [[reg]] name = "OCR_C_L" desc = "Output Compare Register C Low Byte" addr = "0x9C" safe = true #---------------------------------------------------------------------# [[reg]] name = "ICR_H" desc = "Input Capture Register High Byte" addr = "0x87" safe = true #---------------------------------------------------------------------# [[reg]] name = "ICR_L" desc = "Input Capture Register Low Byte" addr = "0x86" safe = true #---------------------------------------------------------------------# [[reg]] name = "TIMSK" desc = "Timer Interrupt Mask Register" addr = "0x71" fields = [ {name="ICIE", desc="Input Capture Interrupt Enable", rnge="5:5"}, {name="OCIE_C", desc="Output Compare Match C Interrupt Enable", rnge="3:3"}, {name="OCIE_B", desc="Output Compare Match B Interrupt Enable", rnge="2:2"}, {name="OCIE_A", desc="Output Compare Match A Interrupt Enable", rnge="1:1"}, {name="TOIE", desc="Timer Overflow Interrupt Enable", rnge="0:0"}, ]