PIC24FJ128GB MICROCHIP [Microchip Technology], PIC24FJ128GB Datasheet - Page 200

no-image

PIC24FJ128GB

Manufacturer Part Number
PIC24FJ128GB
Description
64/80/100-Pin, 16-Bit Flash Microcontrollers with USB On-The-Go (OTG)
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC24FJ128GB106-I/MR
Manufacturer:
MICROCHIP
Quantity:
54 574
Part Number:
PIC24FJ128GB106-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GB106-I/PT
0
Part Number:
PIC24FJ128GB106T-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GB106T-I/PT
0
Part Number:
PIC24FJ128GB108-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GB108T-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GB110-I/PF
Manufacturer:
Microchip Technology
Quantity:
10 000
Company:
Part Number:
PIC24FJ128GB210-I/PT
Quantity:
119
PIC24FJ256GB110 FAMILY
17.1.1
Because the buffers and their BDs are shared between
the CPU and the USB module, a simple semaphore
mechanism is used to distinguish which is allowed to
update the BD and associated buffers in memory. This
is done by using the UOWN bit as a semaphore to
distinguish which is allowed to update the BD and
associated buffers in memory. UOWN is the only bit
that is shared between the two configurations of
BDnSTAT.
When UOWN is clear, the BD entry is “owned” by the
microcontroller core. When the UOWN bit is set, the BD
entry and the buffer memory are “owned” by the USB
peripheral. The core should not modify the BD or its
corresponding data buffer during this time. Note that
the microcontroller core can still read BDnSTAT while
the SIE owns the buffer and vice versa.
The buffer descriptors have a different meaning based
on the source of the register update. Register 17-1 and
Register 17-2 show the differences in BDnSTAT
depending on its current “ownership”.
REGISTER 17-1:
DS39897B-page 198
bit 15
bit 7
Legend:
R = Readable bit
-n = Value at POR
bit 15
bit 14
bit 13-10
bit 9-0
UOWN
R/W-x
R/W-x
BC7
BUFFER OWNERSHIP
UOWN: USB Own bit
1 = The USB module owns the BD and its corresponding buffer; the CPU must not modify the BD or
DTS: Data Toggle Packet bit
1 = Data 1 packet
0 = Data 0 packet
PID3:PID0: Packet Identifier bits (written by the USB module)
In Device mode:
Represents the PID of the received token during the last transfer.
In Host mode:
Represents the last returned PID, or the transfer status indicator.
BC9:BC0: Byte Count
This represents the number of bytes to be transmitted or the maximum number of bytes to be received
during a transfer. Upon completion, the byte count is updated by the USB module with the actual
number of bytes transmitted or received.
R/W-x
R/W-x
DTS
BC6
the buffer
BDnSTAT: BUFFER DESCRIPTOR n STATUS REGISTER PROTOTYPE, USB
MODE (BD0STAT THROUGH BD63STAT)
W = Writable bit
‘1’ = Bit is set
R/W-x
R/W-x
PID3
BC5
R/W-x
R/W-x
PID2
BC4
Preliminary
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
R/W-x
R/W-x
When UOWN is set, the user can no longer depend on
the values that were written to the BDs. From this point,
the USB module updates the BDs as necessary, over-
writing the original BD values. The BDnSTAT register is
updated by the SIE with the token PID and the transfer
count is updated.
17.1.2
The USB OTG module uses a dedicated DMA to
access both the BDT and the endpoint data buffers.
Since part of the address space of the DMA is dedi-
cated to the Buffer Descriptors, a portion of the memory
connected to the DMA must comprise a contiguous
address space properly mapped for the access by the
module.
PID1
BC3
DMA INTERFACE
R/W-x
R/W-x
PID0
BC2
© 2008 Microchip Technology Inc.
x = Bit is unknown
R/W-x
R/W-x
BC9
BC1
R/W-x
R/W-x
BC8
BC0
bit 8
bit 0

Related parts for PIC24FJ128GB