поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

UM0290 датащи(PDF) 45 Page - STMicroelectronics

номер детали UM0290
подробное описание детали  This document presents a description
PDF  76 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0290 датащи(HTML) 45 Page - STMicroelectronics

Back Button UM0290 Datasheet HTML 41Page - STMicroelectronics UM0290 Datasheet HTML 42Page - STMicroelectronics UM0290 Datasheet HTML 43Page - STMicroelectronics UM0290 Datasheet HTML 44Page - STMicroelectronics UM0290 Datasheet HTML 45Page - STMicroelectronics UM0290 Datasheet HTML 46Page - STMicroelectronics UM0290 Datasheet HTML 47Page - STMicroelectronics UM0290 Datasheet HTML 48Page - STMicroelectronics UM0290 Datasheet HTML 49Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 45 / 76 page
background image
UM0290
Mass storage demo
45/76
For the bulk pipes (endpoints 1 and 2) the configuration depends on the transfer mode. For
the simple buffered mode the endpoint configuration consists of these steps:
Configure the endpoint 1 as bulk IN
Configure the endpoint 1 Tx count and data buffer address in the BTABLE (file
usb_conf.h)
Disable the endpoint 1 Rx
Configure the endpoint 1 Tx status to NAK
Configure the endpoint 2 as bulk OUT
Configure the endpoint 2 Rx count and data buffer address in the BTABLE (file
usb_conf.h)
Disable the endpoint 2 Tx
Configure the endpoint 2 Rx status to VALID
In the double buffer mode, each unidirectional endpoint uses two buffers in the Packet
Memory Area (PMA). For additional information about the double buffer transfer mode
please refer to the STR71x/91x Reference Manual, USB SLAVE INTERFACE, section
Double-Buffered Endpoints.
To configure the bulk endpoint in double buffer mode, it is necessary to use the same steps
as with the simple buffer mode and to modify the transfer mode by setting the EP_KIND bit
in the USB_EPxR register of each bulk endpoint. Also, provide for each bulk endpoint tow
data buffer (ENDPx_BUF0Addr and ENDPx_BUF1Addr, x can be 1 or 2 according to the
endpoint number) in the BTABLE (file usb_conf.h).
To manage the double buffer Endpoint configuration the firmware uses dedicated functions:
SetEPDoubleBuff(): to set the
EP_KIND bit in the USB_EPxR register
SetEPDblBuffCount(): used to set the double buffer endpoint count
SetEPDblBuffAddr(): used to set the buffer address
Data Management
Data transfer management depends on the transfer mode. In fact, for the simple buffer
mode, only one data buffer is used for each endpoint. So the data management consists of
the transfer of the needed data directly from the specified data buffer address in the PMA,
according to the related endpoint (IN: ENDP1TXADDR; OUT: ENDP2RXADDR). For these
transfers, the following two functions are used (file usb_mem.c):
PMAToUserBufferCopy (): this function transfers the specified number of bytes from
the Packet Memory Area to the internal RAM. This function is used copy the data sent
by the host to the device.
UserToPMABufferCopy (): this function transfers the specified number of bytes from
the internal RAM to the Packet Memory Area. This function is used to send the data
from the device to the host.
However, for the double buffer mode, each endpoint uses two data buffers in the Packet
Memory Area. So, to transfer the data from/to the PMA, it is necessary to take care of the
current usage of each buffer. In fact, the firmware has to manage the swap between the
ENDPx_BUF0Addr and ENDPx_BUF1Addr. The swap depends directly on the firmware and
IP buffer usage, so before the access to the PMA (for write operations) the firmware tests
the SW_BUF bit or/and the DTOG bit to select the free buffer.
This operation is managed in the demo by the EP2_OUT_Callback() function for data out
transfer and by both Send_Data() and EP1_IN_Callback() function for data in transfer.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com