参数资料
型号: ST72774S9T1/XXX
厂商: STMICROELECTRONICS
元件分类: 微控制器/微处理器
英文描述: 8-BIT, MROM, 8 MHz, MICROCONTROLLER, PQFP44
封装: TQFP-44
文件页数: 129/144页
文件大小: 1280K
代理商: ST72774S9T1/XXX
ST72774/ST727754/ST72734
85/144
USB INTERFACE (Cont’d)
4.6.5 Programming Considerations
In the following, the interaction between the USB
interface and the application program is described.
Apart from system reset, action is always initiated
by the USB interface, driven by one of the USB
events
associated
with
the
Interrupt
Status
Register (ISTR) bits.
4.6.5.1 Initializing the Registers
At system reset, the software must initialize all
registers to enable the USB interface to properly
generate interrupts and DMA requests.
1. Initialize the DMAR, IDR, and IMR registers
(choice of enabled interrupts, address of DMA
buffers). Refer the paragraph titled initializing
the DMA Buffers.
2. Initialize the EP0RA and EP0RB registers to
enable accesses to address 0 and endpoint 0
to support USB enumeration. Refer to the para-
graph titled Endpoint Initialization.
3. When addresses are received through this
channel, update the content of the DADDR.
4. If needed, write the endpoint numbers in the EA
fields in the EP1RB and EP2RB register.
4.6.5.2 Initializing DMA buffers
The DMA buffers are a contiguous zone of
memory whose maximum size is 48 bytes. They
can be placed anywhere in the memory space,
typically in RAM, to enable the reception of
messages. The 10 most significant bits of the start
of this memory area are specified by bits DA15-
DA6 in registers DMAR and IDR, the remaining
bits are 0. The memory map is shown in Figure 51.
Each buffer is filled starting from the bottom (last 3
address bits=000) up.
4.6.5.3 Endpoint Initialization
To be ready to receive:
Set STAT_RX to VALID (11b) in EP0RB to enable
reception.
To be ready to transmit:
1. Write the data in the DMA transmit buffer.
2. In register EPnRA, specify the number of bytes
to be transmitted in the TBC field
3. Enable the endpoint by setting the STAT_TX
bits to VALID (11b) in EPnRA.
Note: Once transmission and/or reception are enabled,
registers EPnRA and/or EPnRB (respectively) must
not be modified by software, as the hardware can
change their value on the fly.
When the operation is completed, they can be
accessed again to enable a new operation.
4.6.5.4 Interrupt Handling
Start of Frame (SOF)
The interrupt service routine must monitor the SOF
events and measure the interval between each
SOF event. If 3ms pass without a SOF event, the
software should set the USB interface to suspend
mode.
USB Reset (RESET)
When this event occurs, the DADDR register is
reset, and communication is disabled in all
endpoint registers (the USB interface will not
respond to any packet). Software is responsible for
reenabling endpoint 0 within 10 ms of the end of
reset. To do this you set the STAT_RX bits in the
EP0RB register to VALID.
End Suspend (ESUSP)
The CPU is alerted by activity on the USB, which
causes an ESUSP interrupt.
Correct Transfer (CTR)
1. When this event occurs, the hardware automat-
ically sets the STAT_TX or STAT_RX to NAK.
Note: Every valid endpoint is NAKed until software clears
the CTR bit in the ISTR register, independently of
the endpoint number addressed by the transfer
which generated the CTR interrupt.
Note: If the event triggering the CTR interrupt is a SETUP
transaction, both STAT_TX and STAT_RX are set
to NAK.
2. Read the PIDR to obtain the token and the IDR
to get the endpoint number related to the last
transfer.
Note: When a CTR interrupt occurs, the TP3-TP2 bits in
the PIDR register and EP1-EP0 bits in the IDR reg-
ister stay unchanged until the CTR bit in the ISTR
register is cleared.
3. Clear the CTR bit in the ISTR register.
相关PDF资料
PDF描述
ST72E734J6D0 8-BIT, UVPROM, 8 MHz, MICROCONTROLLER, CDIP42
ST72T774S9T1 8-BIT, OTPROM, 8 MHz, MICROCONTROLLER, PQFP44
ST7294C6B6 8-BIT, MROM, 4 MHz, MICROCONTROLLER, PDIP28
ST72T94C6M6 8-BIT, OTPROM, MICROCONTROLLER, PDSO28
ST72C171K2B6 8-BIT, FLASH, 8 MHz, MICROCONTROLLER, PDIP32
相关代理商/技术参数
参数描述
ST727X4-EMU2B 制造商:STMicroelectronics 功能描述:REALTIME EMULATOR BOARD - Bulk
ST727X4-EPB/US 制造商:STMicroelectronics 功能描述:PROGRAMMER - Bulk
ST-7-28 功能描述:XFRMR PWR 115V 14VAC 2.6A RoHS:是 类别:变压器 >> 功率 系列:ST 标准包装:1 系列:260 类型:标准 最大功率:65 VA 主线圈:双 副线圈:三路,中心抽头 在某电流时的串联输出电压:500 VAC @ 85mA,5 VAC @ 2A,6.3 VAC @ 2A 在某电流时的并联输出电压:- 安装类型:底座安装 尺寸/尺寸:102.36mm L x 67.31mm W 高度 - 座高(最大):66.80mm 端接类型:导线引线
ST7-28 制造商:SUPERWORLD 制造商全称:Superworld Electronics 功能描述:POWER TRANSFORMER
ST7-28B56 功能描述:电源变压器 SPLIT BOBBIN HORZ MOUNT XFMR RoHS:否 制造商:Triad Magnetics 功率额定值:12 VA 初级电压额定值:115 V / 230 V 次级电压额定值:12 V / 24 V 安装风格:SMD/SMT 一次绕组:Dual Primary Winding 二次绕组:Dual Secondary Winding 长度:2.5 in 宽度:2 in 高度:1.062 in