Datasheet

PIC24FJ256GB110 FAMILY
DS80369P-page 12 2008-2013 Microchip Technology Inc.
36. Module: UART
When using UTXISEL<1:0> = 01 (interrupt when
last character is shifted out of the Transmit Shift
Register), and the final character is being shifted
out through the Transmit Shift Register, the TX
interrupt may occur before the final bit is shifted
out.
Work around
If it is critical that the interrupt processing occurs
only when all transmit operations are complete,
after which, the following work around can be
implemented:
Hold off the interrupt routine processing by adding
a loop at the beginning of the routine that polls the
Transmit Shift Register empty bit, as shown in
Example 2.
Affected Silicon Revisions
37. Module: USB (Device Mode)
In previous literature for this module, the
EPSTALL bits (U1EPn<1>) are described as
being only stall status indicator bits in Device
mode. In actual implementation, the EPSTALL
bits function as both status and control bits.
If the EPSTALL bit for endpoint ‘n’ is set (either
by the SIE hardware or manually in firmware),
both the IN and OUT endpoints, associated with
the endpoint, will send STALL packets when the
endpoint’s UOWN bit (BDnSTAT<15>) is also
set.
Work around
For Host Applications: No work around is
needed as hosts do not send STALL packets.
For Device Mode Applications: When it is neces-
sary to stop sending STALL packets on an
endpoint, clear the endpoint’s respective
BSTALL (BDnSTAT<10>) and EPSTALL bits. If
the application firmware was developed based
on one of the examples in the Microchip USB
framework, this is already the default behavior of
the USB stack firmware (except Version 2.8); no
further work around is normally needed.
If a Device mode application was based upon
Version 2.8 of the USB framework, and the
application uses STALL packets on any of the
application endpoints (1-15), it is suggested to
update the application to the latest version.
Affected Silicon Revisions
EXAMPLE 2: DELAYING THE ISR BY POLLING THE TRMT BIT
A3 A5 A6
XX
X
A3 A5 A6
XX
X
// in UART2 initialization code
...
U2STAbits.UTXISEL0 = 1; // Set to generate TX interrupt when all
U2STAbits.UTXISEL1 = 0; // transmit operations are complete.
...
U2TXInterrupt(void)
{
while(U2STAbits.TRMT==0); // wait for the transmit buffer to be empty
... // process interrupt