Electronic Components Datasheet Search
  British  ▼
ALLDATASHEET.CO.UK

X  

UM0290 Datasheet(PDF) 49 Page - STMicroelectronics

Part # UM0290
Description  This document presents a description
PDF  76 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0290 Datasheet(HTML) 49 Page - STMicroelectronics

Back Button 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 UM0290 Datasheet HTML 50Page - STMicroelectronics UM0290 Datasheet HTML 51Page - STMicroelectronics UM0290 Datasheet HTML 52Page - STMicroelectronics UM0290 Datasheet HTML 53Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 49 / 76 page
background image
UM0290
Mass storage demo
49/76
5.3.7
Memory management
All the memory management functions are grouped in the two files: memory.c and
memory.h. The memory management consists of two basic processes:
Management and the validation of the address range for the command Read (10) and
Write (10): this process is done by the function Address_Management_Test(). The
role of this function is to extract the real Address and memory offset in the Medium
Memory Area and test if the current transfer (Read or Write) is in the memory range. If
this is not the case, the function STALLs endpoint 1 or both endpoints (depending on
whether the transfer is Read or Write) and returns a bad status to disable the transfer
Management of the Read and Write processes: this process is done by the two
functions Read_Memory() and Write_Memory(). These two functions manage the
medium memory access. After each access, the current memory offset and the next
Access Address are updated using the length of the previous transfer.
Note:
For the STR91x the read and write transfer from/to PMA is managed by the two functions
PMA_Read() and PMA_Write() (file usb_rw.c). This two functions are optimized to speed up
the transfer of data packets with a size multiple of 32 bits (4 bytes).
5.4
How to customize the mass storage demo
The implemented firmware is a simple example used to demonstrate the STR USB IP
capability in bulk transfer. However it can be customized according to user requirements.
This customization can be done in the three layers of the implemented mass storage
protocol:
Customization of the BOT layer: the user can implement their own BOT state
machine or modify the implemented one just by modifying the two files usb_BOT.c and
usb_BOT.h and by keeping the same data transfer method.
Customization of the SCSI layer: the implemented SCSI protocol presents, more
than the supported command listed in Section 5.3.6: SCSI protocol implementation, a
list of unsupported commands. When the host sends one of these commands, a
corresponding function is called by the CBW_Decode() function like a common
command. However, all the functions related to an unsupported command are defined
by
the
function
SCSI_Invalid_Cmd()
,
(see
file
usb_scsi.c).
The
SCSI_Invalid_Cmd()
function STALLs the two endpoints (1 and 2), sets the Sense
data to invalid command key and sends a CSW with a Command Failed status. If a
user wants to support one of the previous commands they have to comment-out the



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


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
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