1
10-1
Section 10 Section 10 Timers and Programmable Flags a 10-1 1 - - PDF document
Section 10 Section 10 Timers and Programmable Flags a 10-1 1 ADSP-BF533 Block Diagram L1 Core Instruction Timer 64 Memory Performance Core LD0 32 Monitor Processor L1 Data LD1 32 Memory JTAG/ Debug SD32 Core D0 bus 32
10-1
10-2
Watchdog And Timers DMA Controller UART0 IRDA Real Time Clock Programmable flags SPORTs SPI EBIU 1KB internal Boot ROM
CORE/SYSTEM BUS INTERFACE
32 Core D1 bus 64 Core I bus Core Timer JTAG/ Debug Performance Monitor Core Processor L1 Instruction Memory L1 Data Memory LD1 32 64 PPI
Peripheral Access Bus (PAB) DMA Access Bus (DAB) External Access Bus (EAB)
Power Management Event Controller 32 DMA Mastered bus
Core DA0 bus 32 32 Core D0 bus Core DA1 bus 32
Core Clock (CCLK) Domain System Clock (SCLK) Domain
LD0 32 16 16 16 16
External Port Bus (EPB) DMA Ext Bus (DEB)
16
DMA Core Bus (DCB)
16 SD32
Data Address Control
10-3
10-4
10-5
10-6
10-7
* - Bits 0-3 are 0 at reset, the rest are undefined. *
10-8
10-9
10-10
10-11
10-12
10-13
10-14
10-15
10-16
10-17
10-18
10-19
10-20
10-21
10-22
10-23
10-24
10-25
10-26
10-27
10-28
10-29
Interrupt
Interrupt
10-30
Interrupt Interrupt
PULSE_HI = 1 TOGGLE_HI = 0
Interrupt
PULSE_HI = 1 TOGGLE_HI = 1
Interrupt
10-31
COUNTER PERIOD WIDTH WIDTH BUFFER PERIOD BUFFER
WIDTH WIDTH PERIOD - WIDTH
10-32
Counter: FFFF FF00 FFFF F0FF FFFF FFFE
TMRx xxxx
10-33
Period Period
Width old Width old Width new Width new Period – Width old Period – Width new
Period – Width new
10-34
Period
Width old Width old Period – Width old Period – Width old + Width new – Width new
Period
Width new Period – Width new
Period Period
10-35
10-36
10-37
10-38
TMRx is Input First Leading edge: Timer starts counting Trailing edge: Width register is loaded with Count value (0x04) Leading edge: 1) Period register is loaded with Count value (0x0A) 2) Counter resets to 0x0000 0001 Interrupt is generated: PERIOD_CNT = 0: End of Width PERIOD_CNT = 1: End of Period When counter reaches 0xFFFF FFFF: Interrupt issued Overflow bit set Timer stopped / disabled
Graph is for PULSE_HI = 1 01 02 03 04 05 06 07 08 09 0A 01 01 01 xx 02 03 xx
SCLK = CLKOUT Counter:
Timer enable: Counter loaded by 0x0000 0001
10-39
10-40
10-41
Input comes from TMRx pin Timer enable First rising edge loads Counter with 0xFFFF FFFF - Period Every subsequent rising edge increments the Counter When reaching count value 0xFFFF FFFE an Interrupt is generated Counter reloads to 0xFFFF FFFF - Period Unused bits / registers: TIMERx_WIDTH OVF_ERRx PERIOD_CNT UART_RX_SEL TOGGLE_HI
10-42
10-43
10-44
10-45
If in PWM_OUT mode, timer will continue running until end of PWM pulse after write to this register
10-46
PWM_OUT mode only
remains set until period ends, even if TIMERx is disabled before the period expires
EXT_CLK modes, it is identical to TIMENx
TIMERx is running
10-47
10-48
10-49
PF0 PF15 PF7 PF8 SPISS /
SPISEL1/ SPISEL2/ SPISEL3/ SPISEL4/ SPISEL5/ SPISEL6/ SPISEL7/ Frame Sync3 I/O #15 I/O #14 I/O #13 I/O #12 I/O #11 I/O #10 I/O #9 I/O #8 I/O #7 I/O #6 I/O #5 I/O #4
Timer Input Clock
When PPI is enabled PF12-15 are always enabled as PPI I/O data lines. Other multiplexed pins are enabled by writing to the function’s registers that use these pins, e.g., SPI_FLG, PPI_CTL, and TIMERx_CONFIG registers for SPI, PPI, and Timers 0,1,2 functionality, respectively.
10-50
10-51
Flag: PF15 PF0 Bit: 15 Reset = 0x0000
10-52
Flag: PF15 PF0
10-53
Flag: PF15 PF0 Flag: PF15 PF0
A “0” configures the corresponding Flag Pin as a level sensitive, a “1” as an edge sensitive input.
A “1” configures the corresponding Flag Pin for both-edges sensitivity. An interrupt request is generated on each edge. A “0” configures Flag Pin as rising- or falling-edge sensitivity (determined by the value in FIO_POLAR).
10-54
Flag: PF15 PF0
10-55
Setting a flag pin that is configured as interrupt, allows software configurable interrupts
Flag: PF15 PF0
Flag: PF15 PF0
10-56
Flag: PF15 PF0 Flag: PF15 PF0
10-57
Flag: PF15 PF0
Flag: PF15 PF0
FIO_MASKA_S/ FIO_MASKA_C and FIO_MASKB_S/ FIO_MASKB_C registers allow two different Interrupt priorities for all Flag Pins. (FlagA and FlagB interrupt)
10-58
Flag: PF15 PF0
Flag: PF15 PF0
10-59
10-60
P0.H = HI(FIO_DIR); // assign P0 the address of P0.L = LO(FIO_DIR); // FIO_DIR register R0.L = 0x000f; // load value of 0xf into R0 W[P0] = R0.L; // store value
#include <defBF533.h>
10-61
#include <defBF533.h>
P0.L = LO(FIO_FLAG_C); P0.H = HI(FIO_ FLAG_C); R0.L = 0x000f; W[P0] = R0.L;