參數(shù)資料
型號: uPSD3234
廠商: 意法半導(dǎo)體
英文描述: Flash Programmable System Device with 8032 Microcontroller Core(嵌入高速“8032微控制器核”的Flash型可編程系統(tǒng)器)
中文描述: 閃存可編程系統(tǒng)器件與8032微控制器內(nèi)核(嵌入高速“8032微控制器核”的閃存型可編程系統(tǒng)器)
文件頁數(shù): 23/54頁
文件大?。?/td> 736K
代理商: UPSD3234
23/54
AN1886 - APPLICATION NOTE
HID device using Feature reports
, HidD_GetFeature,
and
Input reports,
ReadFile.
All of these routines ex-
pect data buffers to include an extra header byte that is used to specify what type of report is being trans-
ferred. The application defines a helper structure called
REPORT_BUF
that puts this extra report ID byte
in front of an
MCU_CMD
structure.
REPORT_BUF
structures are then passed to and from
WriteFile
and
HidD_GetFeature
calls.
The size chosen for the Feature and Output reports (64 bytes) is arbitrary. A larger size improves efficien-
cy for large transfers: there is less overhead per block of command data. However, with large reports,
there are more wasted bytes for smaller command structures.
Note: LCD mirror data is passed to the application from the firmware as 8-byte Input reports with no higher
level structure defined on top.
SUSPEND Mode and RESUME Mode Handling Mechanism
Since version 2.0_XP (December 2003), the USB demo supports SUSPEND mode. The suspend mode
handling mechanism uses the following code for service code, found in the USB interrupt service routine,
and requires the
SUSPND
interrupt to have been enabled.
if (SUSPND) // Handle suspend interrupt
{
SUSPND = 0; // keep USB logic functional
GoOnSuspend = 1; // set global flag
UIEN &= ~uSUSPNDIE; // disable INT
TF2 = 1; // Activate execution of the rest of USB ISR
}
If
USBSuspend
is detected (a constant idle state on the USB lines for more than 3ms), then the
SUSPND
flag is set. Setting this bit stops the clock to USB, and causes the USB module to enter Suspend mode.
Because this event can be serviced at some other place in the code, with the auxiliary bit (
GoOnSuspend
)
set and the
SUSPND
flag cleared, another mechanism to reach the still functional USB part is used (albeit
not in the next interrupt after this source has been enabled). Afterwards, when the application has more
time, the physical suspension of the device is possible.
The
GoOnSuspend
event is checked in the subsequent auxiliary USB service routine when it is possible:
// The following 3 lines can be deleted if you don’t plan to use Suspend
if (GoOnSuspend) //Service USB INT Suspend
{
OnUSBSuspend();
}
The default handler, for this event, performs the physical suspend task, and is located in
main.c
, and is
shown in
APPENDIX J.
.
This default handler, in the USB demonstration program:
writes information to the display, announcing the start of the Suspend mode
disables all interrupts, except USB
enables the USB Resume interrupt source
enters the Idle mode of the μPSD (
PCON |
= 1).
In this state, no instructions are executed, and the μPSD waits for any enabled interrupt. When a USB
interrupt is detected, the μPSD continues execution, by restoration of the USB part, by clearing the
SUS-
PND
and
RESUMF
bits, restoring and enabling other previous interrupts, and clearing the display.
相關(guān)PDF資料
PDF描述
uPSD3251(中文) Flash Programmable System Devices with 8032 Microcontroller Core(帶8032微控制器內(nèi)核的Flash可編程系統(tǒng)設(shè)備)
uPSD3251 Flash Programmable System Devices with 8032 Microcontroller Core(帶8032微控制器內(nèi)核的Flash可編程系統(tǒng)設(shè)備)
uPSD3253AV-24T1T Flash Programmable System Devices with 8032 Microcontroller Core
UPSD3253B Two and Three Channel Codewheels
UPSD3253BV Flash Programmable System Devices with 8032 Microcontroller Core
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
UPSD32348V24V6ES 制造商:ST MICRO 功能描述:*
UPSD3234A 制造商:STMICROELECTRONICS 制造商全稱:STMicroelectronics 功能描述:Flash Programmable System Devices with 8032 Microcontroller Core
UPSD3234A-24T1 制造商:STMICROELECTRONICS 制造商全稱:STMicroelectronics 功能描述:Flash Programmable System Device with 8032 Microcontroller Core
UPSD3234A-24T1T 制造商:STMICROELECTRONICS 制造商全稱:STMicroelectronics 功能描述:Flash Programmable System Devices with 8032 Microcontroller Core and 64Kbit SRAM
UPSD3234A-24T6 制造商:STMICROELECTRONICS 制造商全稱:STMicroelectronics 功能描述:Flash Programmable System Device with 8032 Microcontroller Core