| Electronic Components Datasheet Search |
|
UM0290 Datasheet(PDF) 47 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0290 Datasheet(HTML) 47 Page - STMicroelectronics |
|
47 / 76 page ![]() UM0290 Mass storage demo 47/76 5.3.4 Standard request requirements To be compliant with the BOT specification the device must respond to the two following requirements after receiving same standard requests: ● When the device switches from unconfigured to configured state, the data toggle of all endpoints must be cleared. This requirement is served by the function Mass_Storage_SetConfiguration() in the file usb_prop.c. ● When the host sends a CBW command with invalid signature or invalid length, the device must keep both endpoints 1 and 2 as STALL until receiving the Mass Storage Reset class specific request. This functionality is managed by the function Mass_Storage_ClearFeature() in the file usb_prop.c. 5.3.5 BOT state machine To provide the BOT protocol, a specific state machine is implemented with 5 states, described below: ● BOT_IDLE: this state is the default state after a USB Reset, BOT Mass storage Reset or after sending a CSW. In this state the device is ready to receive a new CBW from the host. ● BOT_DATA_OUT: the device enters this state after receiving a CBW with data flow from the host to the device. ● BOT_DATA_IN: the device enters this state after receiving a CBW with data flow from the device to the host ● BOT_DATA_IN_LAST: the device moves to this state when it has to send the last part of data asked for by the host. ● BOT_CSW_SEND: the device moves to this state when it has to send the CSW. When the device is in this state and a correct IN transfer occurs, the device moves to the BOT_IDLE state to be able to receive the next CBW. ● BOT_ERROR: Error state The management of this state machine is done using the functions described below (files usb_bot.c and usb_bot.h in the firmware): ● Mass_Storage_In (); Mass_Storage_Out (): these two functions are called when a correct transfer (IN or OUT) occurs. The aim of these two functions is to provide the next step after receiving/sending a CBW, data or CSW ● CBW_Decode (): this function is used to decode the CBW and to dispatch the firmware to the corresponding SCSI command ● DataInTransfer (): this function is used to transfer the characteristic device data to the host ● Set_CSW (): this function is used to set the CSW fields with the needed parameters according to the command execution ● Bot_Abort (): this function is used to STALL the endpoints 1 or 2 (or both) according to the Error occurring in the BOT flow Note: The BOT state machine is the same for the two transfer modes (simple and double buffer mode). The difference is only related on the data transfer (managed by the function Send_Data () in the double buffer mode). |
|
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 |
| 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 |