How to Communicate with USB Memory through the SSI . system

How to Communicate with USB Memory through the SSI . system

Recently, because I had to learn the ability to porting USB Memory Driver to NORTi, I had the opportunity to find out and confirm on the code some things related to USB memory devices (or we still call it USB Flash Memory). “USB Flash Memory” includes USB: is the name of the interface, both soft and hard; Flash : is the material of memory chips, Memory : refers to memory devices in general.

In some previous posts, I also wrote about some key points of USB communication.

Basically, the software that the programer can write for the USB is mostly determined after the signal step. That is, the low-level application side (that is, the driver) will use the provided bars and interrupts to setup, receive data, send data, and detect connections.

On the user side, we will see that there are several types of devices that use USB such as mice, keyboards, memory devices (we still call them USB).

This article will talk a little bit about memory devices using USB or USB Memory interfaces.

1. Configure Process
It is the process from plugging in until the host software understands this is a memory device.

This process only identifies this as a Mass Storage Class device, which can be stored.

Which only specifies that this is a memory device, somehow accessible (read, write) by address or Block.

During this Configure process, the USB Memory side controller will communicate with the host side software. It will send the necessary parameters for the Host to recognize it and give appropriate communication.

One of the most important parameters is the script that communicates with the Controller on the USB Memory.

<There will be a table here>

2. What data transmissions are used?
As mentioned above, most USB drives today will support SCSI instruction set communication.

That is, through the hardware bus, the Host side will send commands in the SCSI script to the Controller on USB Memory to get information, read, write…

The job of the Host-side Driver is to use these instructions to access the correct memory area.

In order for the above application to easily use USB, people often install a File system on USB Memory. Usually FAT16, FAT32..

3. How to access the memory device.
The USB Memory side controller will allow the Driver side access to each Flash memory unit.

We also know that Flash itself is a type of memory where every write operation must be accompanied by a previous data erase operation. Units for reading, writing, and erasing are specified on each type of memory chip, normally USB Memory will use a unit of 512 bytes. Many types of memory chips with small capacity will use units of 256 Bytes, 4Kilo Bytes, 64Kbytes.

The Driver side (talking about software) will send requests to the Controller side of the USB Memory through Commands. These commands must be understood by both the Controller side of the USB Memory to be properly executed. Usually one will rely on a well-defined set of commands.

  • Share

admin

Leave a Reply

Your email address will not be published.