Renesas M16C Series User Manual page 140

16-bit single-chip microcomputer
Hide thumbs Also See for M16C Series:
Table of Contents

Advertisement

M30240 Group
• When using an isochronous transfer, set the FLUSH bit by:
• OUT FIFO data flush: When OUT_PKT_RDY flag is "1", set the FLUSH bit to "1"
• IN FIFO data flush: Use AUTO_FLUSH bit.
• Do not write to the USB internal registers (address 0300
in Suspend mode.
• Precautions for accessing the USB Interrupt Status registers 1 & 2 (USBIS1, USBIS2)
• When reading from/writing to both registers, access USBIS1 first and then USBIS2.
• When writing to these registers, use transfer instructions such as the MOV instruction. Do not use Read
Modify Write instructions such as OR or BSET because this could cause improper values to be written
back.
• Each status flag can be cleared to"0" by writing back the same value "1" which was read from the USB
Interrupt Status register. Make sure to clear only the corresponding status flag in each USB interrupt rou-
tine. Mask the other status flags so that they are not accidentally cleared.
• Example of USB Function Interrupt
C Language
ram1=USBIS1;
ram2=USBIS2;
ram2 &=0x1F;
USBIS1=ram1;
USBIS2=ram2;
Assembly Language:
mov.b USBIS1, ram1
mov.b USBIS2, ram2
and.b #1Fh, ram2
mov.b ram1, USBIS1
mov.b ram2, USBIS2
• Do not use Read, Modify, Write instructions on the following USB Control and Status registers:
• USB Endpoint 0 Control and Status (EP0CS)
• USB Endpoint x IN Control and Status (EPxICS)
• USB Endpoint x OUT Control and Status (EPxOCS)
• Refer to Section 1.5.5.1 for more information on these registers and how to modify their contents.
Rev.1.00 Sep 24, 2003 Page 122 of 360
/*Read from USB Interrupt Status register 1*/
/*Read from USB Interrupt Status register 2*/
/*Mask flags except USB Function Interrupt status flags*/
/*Write to USB Interrupt Status register 1*/
/*Write to USB Interrupt Status register 2*/
;Read from USB Interrupt Status register 1
;Read from USB Interrupt Status register 2
;Mask flags except USB Function Interrupt status flags
;Write to USB Interrupt Status register 1
;Write to USB Interrupt Status register 2
-033C
) when the USB clock is disabled
16
16
Precautions

Advertisement

Table of Contents
loading

Table of Contents