English
Language : 

CC2510_15 Datasheet, PDF (168/245 Pages) Texas Instruments – Low-Power SoC (System-on-Chip) with MCU, Memory,2.4 GHz RF Transceiver, and USB Controller
CC2511F8 - Not Recommended for New Designs
accessed. See 12.1.5.1 for details on how to
set up the crystal oscillator.
CC2510Fx / CC2511Fx
SLEEP.USB_EN to 0 will reset the USB
controller.
12.16.2 USB Enable
The USB Controller must be enabled before it
is used. This is performed by setting the
SLEEP.USB_EN bit to 1. Setting
12.16.3 USB Interrupts
There are 3 interrupt flag registers with
associated interrupt enable mask registers.
Interrupt Flag Description
USBCIF
Contains flags for common USB interrupts
USBIIF
Contains interrupt flags for endpoint 0 and all the IN
endpoints
USBOIF
Contains interrupt flags for all OUT endpoints
Note: All interrupts except SOF and suspend are initially enabled after reset
Associated Interrupt
Enable Mask Register
USBCIE
USBIIE
USBOIE
Table 59: USB Interrupt Flags Interrupt Enable Mask Registers
In addition to the interrupt flags in the registers
shown in Table 59, there are two CPU interrupt
flags associated with the USB controller;
IRCON2.USBIF and IRCON.P0IF. For an
interrupt request to be generated, IEN1.P0IE
and/or IEN2.USBIE must be set to 1 together
with the desired interrupt enable bits from the
USBCIE, USBIIE, and USBOIE registers.
When an interrupt request has been
generated, the CPU will start executing the
ISR if there are no higher priority interrupts
pending. The USB controller uses interrupt #6
for USB interrupts. This interrupt number is
shared with Port 2 inputs, hence the interrupt
routine must also handle Port 2 interrupts if
they are enabled. The interrupt routine should
read all the interrupt flag registers and take
action depending on the status of the flags.
The interrupt flag registers will be cleared
when they are read and the status of the
individual interrupt flags should therefore be
saved in memory (typically in a local variable
on the stack) to allow them to be accessed
multiple times.
At the end of the ISR, after the interrupt flags
have been read, the interrupt flags should be
cleared to allow for new USB/P2 interrupts to
be detected. The port 2 interrupt status flags in
the P2IFG register should be cleared prior to
clearing IRCON2.P2IF (see Section 10.5.2).
Refer to Table 39 and Table 40 for a complete
list of interrupts, and Section 1.1 for more
details about interrupts.
12.16.3.1 USB Resume Interrupt
P0_7 does not exist on the CC2511Fx, but the
corresponding interrupt is used for USB
resume interrupt. This means that to be able to
wake up the CC2511Fx from PM1/suspend when
resume signaling has been detected on the
USB bus, IEN1.P0IE must be set to 1
together
with
PICTL.P0IENH.
PICTL.P0ICON must be 0 to enable interrupts
on rising edge. The P0 ISR should check the
P0IFG.USB_RESUME, and resume if this bit is
set to 1. If PM1 is entered from within an ISR
due to a suspend interrupt, it is important that
the priority of the P0 interrupt is set higher than
the priority of the interrupt from which PM1
was entered. See Section 12.16.9 for more
details about suspend and resume.
12.16.4 Endpoint 0
Endpoint 0 (EP0) is a bi-directional control
endpoint and during the enumeration phase all
communication is performed across this
endpoint. Before the USBADDR register has
been set to a value other than 0, the USB
controller will only be able to communicate
through endpoint 0. Setting the USBADDR
register to a value between 1 and 127 will
bring the USB function out of the Default state
in the enumeration phase and into the Address
state. All configured endpoints will then be
available for the application.
The EP0 FIFO is only used as either IN or
OUT and double buffering is not provided for
endpoint 0. The maximum packet size for
endpoint 0 is fixed at 32 bytes.
SWRS055G
Page 168 of 236