Application Context Switch and FTL Management in Storage System

The inactivity timer and physical switch on external storage devices facilitate seamless switching between native and custom applications by automatically re-enumerating and optimizing FTL routing, enhancing user experience and performance.

US20260377334A1Pending Publication Date: 2026-11-26SANDISK TECHNOLOGIES LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
US19/217953
Authority / Receiving Office
US · United States
Patent Type
Applications(United States)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

There is a need for improved switching between native and custom application usage of an external storage device, as existing methods require manual disconnection and reconnection to switch between modes, leading to a glitchy user experience.

Method used

Implementing an inactivity timer and/or a physical switch on the external storage device to automatically switch between native and custom application modes, with the controller detecting button or switch selection to re-enumerate the device and change FTL routing meta-blocks, allowing seamless transitions.

Benefits of technology

Enables seamless switching between native and custom applications without manual intervention, improving user experience and optimizing performance by intelligently managing memory device operations based on application mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US20260377334A1-D00000_ABST
    Figure US20260377334A1-D00000_ABST
Patent Text Reader

Abstract

An external device, such as a data storage device, can be connected to a host device using the iPod / interface accessory protocol (iAP). The external device can be used with both a native application (App) of the host device and a custom App added to the host device. To switch the external device from using the native App to the custom app, an external switch or an inactivity timer can be used. The inactivity timer has a customizable timer that will cause the external device to reset to using the custom App. The external switch will perform the same function. In so doing, the external device can easily switch between native App and custom App usage.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND OF THE DISCLOSUREField of the Disclosure

[0001] Embodiments of the present disclosure generally relate to switching between native and custom application (App) usage of an external storage device.Description of the Related Art

[0002] Data storage devices or solid state devices (SSDs) are used to store data for a host device. The host device will often send new data to the controller of the data storage device to be written to a memory device of the data storage device. The host device will also send read commands to the controller to instruct the controller to read data from the memory device and provide the data back to the host device.

[0003] A specification that has been released by Apple is called iPod / interface accessory protocol (iAP), and iAP requires a hardware (HW) made for iPhone (MFi) which is made for authentication on iAP supported host devices. MFi is an authentication HW, and MFi has to be present in the printed circuit board (PCB) of the accessory, for example a storage drive, to perform an authentication sequence with a host device (e.g., iPhone or iPad). Once the authentication is successful, the iAP supported host device will deem that particular accessory as Apple authenticated or an Apple certified device and allow direct access at the universal serial bus (USB) link level to the accessory which enables the accessory developer to provide custom features which otherwise will not be available without the authentication.

[0004] Authentication gives access directly to a third party application sitting on the iOS to that particular authenticated accessory, allows the authenticated accessory to have specific features like auto backup, security, etc. which cannot be performed without the authentication. So the authentication is how Apple restricts multiple accessories to have full access to the Apple software stack. Once the authentication is performed by the accessory, then the third party application sitting on the sis allowed to have full access to the accessory at the USB link level.

[0005] One common accessory to use is external storage. External storage can be used for a native application (App) or custom Apps. Custom Apps are Apps that are specifically tailored to use the accessory or are Apps that are installed on the host device that can use the accessory. Native Apps are Apps that are permanently installed on the host device such as a camera App on a mobile device. Switching between native Apps and custom Apps using the external storage is a challenge.

[0006] Therefore, there is a need in the art for improved switching between native App and custom App usage of an external storage device.SUMMARY OF THE DISCLOSURE

[0007] An external device, such as a data storage device, can be connected to a host device using the iPod / interface accessory protocol (iAP). The external device can be used with both a native application (App) of the host device and a custom App added to the host device. To switch the external device from using the native App to the custom app, an external switch or an inactivity timer can be used. The inactivity timer has a customizable timer that will cause the external device to reset to using the custom App. The external switch will perform the same function. In so doing, the external device can easily switch between native App and custom App usage.

[0008] In one embodiment, a data storage device comprises: a memory device, and a controller coupled to the memory device, wherein the controller is configured to: detect selection of a first button or switch; re-enumerate the device with information for a native App; change a flash translation layer (FTL) routing meta-block; and start an inactivity timer.

[0009] In another embodiment, a data storage device comprises: a memory device, and a controller coupled to the memory device, wherein the controller is configured to: detect toggling of a physical button or moving of a physical switch, wherein the physical button or physical switch is disposed on a casing of the data storage device, wherein prior to the detecting, the device is enumerated with information for a first App; re-enumerate the device with information for a second App, wherein the second App is different from the first App; and change a FTL routing meta-block.

[0010] In another embodiment, a data storage device comprises: a housing; a physical button or switch coupled to the housing; means to store data disposed in the housing; and a controller disposed in the housing and coupled to the means to store data, wherein the controller is configured to: detect selection of the physical button or switch; re-enumerate the data storage device; and store data in the means to store data, wherein a storing location in the means to store data changes based upon the re-enumerating.BRIEF DESCRIPTION OF THE DRAWINGS

[0011] So that the manner in which the above recited features of the present disclosure can be understood in detail, a more particular description of the disclosure, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this disclosure and are therefore not to be considered limiting of its scope, for the disclosure may admit to other equally effective embodiments.

[0012] FIG. 1 is a schematic block diagram illustrating a storage system in which a data storage device may function as a storage device for a host device, according to certain embodiments.

[0013] FIG. 2 is a schematic illustration of an iOS environment according to one embodiment.

[0014] FIG. 3 is a schematic illustration of an iOS environment according to another embodiment.

[0015] FIG. 4 is a flowchart illustrating switching between a native application (App) and a custom App for an external device according to one embodiment.

[0016] FIG. 5 is a flowchart illustrating switching between a native App and a custom App for an external device according to another embodiment.

[0017] FIG. 6 is a USB device according to one embodiment.

[0018] FIG. 7 is a USB device according to another embodiment.

[0019] To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to the figures. It is contemplated that elements disclosed in one embodiment may be beneficially utilized on other embodiments without specific recitation.DETAILED DESCRIPTION

[0020] In the following, reference is made to embodiments of the disclosure. However, it should be understood that the disclosure is not limited to specifically described embodiments. Instead, any combination of the following features and elements, whether related to different embodiments or not, is contemplated to implement and practice the disclosure. Furthermore, although embodiments of the disclosure may achieve advantages over other possible solutions and / or over the prior art, whether or not a particular advantage is achieved by a given embodiment is not limiting of the disclosure. Thus, the following aspects, features, embodiments, and advantages are merely illustrative and are not considered elements or limitations of the appended claims except where explicitly recited in a claim(s). Likewise, reference to “the disclosure” shall not be construed as a generalization of any inventive subject matter disclosed herein and shall not be considered to be an element or limitation of the appended claims except where explicitly recited in a claim(s).

[0021] An external device, such as a data storage device, can be connected to a host device using the iPod / interface accessory protocol (iAP). The external device can be used with both a native application (App) of the host device and a custom App added to the host device. To switch the external device from using the native App to the custom app, an external switch or an inactivity timer can be used. The inactivity timer has a customizable timer that will cause the external device to reset to using the custom App. The external switch will perform the same function. In so doing, the external device can easily switch between native App and custom App usage.

[0022] FIG. 1 is a schematic block diagram illustrating a storage system 100 having a data storage device 106 that may function as a storage device for a host device 104, according to certain embodiments. For instance, the host device 104 may utilize a non-volatile memory (NVM) 110 included in data storage device 106 to store and retrieve data. The host device 104 comprises a host dynamic random access memory (DRAM) 138. In some examples, the storage system 100 may include a plurality of storage devices, such as the data storage device 106, which may operate as a storage array. For instance, the storage system 100 may include a plurality of data storage devices 106 configured as a redundant array of inexpensive / independent disks (RAID) that collectively function as a mass storage device for the host device 104.

[0023] The host device 104 may store and / or retrieve data to and / or from one or more storage devices, such as the data storage device 106. As illustrated in FIG. 1, the host device 104 may communicate with the data storage device 106 via an interface 114. The host device 104 may comprise any of a wide range of devices, including computer servers, network-attached storage (NAS) units, desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called “smart” phones, so-called “smart” pads, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming device, or other devices capable of sending or receiving data from a data storage device.

[0024] The host DRAM 138 may optionally include a host memory buffer (HMB) 150. The HMB 150 is a portion of the host DRAM 138 that is allocated to the data storage device 106 for exclusive use by a controller 108 of the data storage device 106. For example, the controller 108 may store mapping data, buffered commands, logical to physical (L2P) tables, metadata, and the like in the HMB 150. In other words, the HMB 150 may be used by the controller 108 to store data that would normally be stored in a volatile memory 112, a buffer 116, an internal memory of the controller 108, such as static random access memory (SRAM), and the like. In examples where the data storage device 106 does not include a DRAM (i.e., optional DRAM 118), the controller 108 may utilize the HMB 150 as the DRAM of the data storage device 106.

[0025] The data storage device 106 includes the controller 108, NVM 110, a power supply 111, volatile memory 112, the interface 114, a write buffer 116, and an optional DRAM 118. In some examples, the data storage device 106 may include additional components not shown in FIG. 1 for the sake of clarity. For example, the data storage device 106 may include a printed circuit board (PCB) to which components of the data storage device 106 are mechanically attached and which includes electrically conductive traces that electrically interconnect components of the data storage device 106 or the like. In some examples, the physical dimensions and connector configurations of the data storage device 106 may conform to one or more standard form factors. Some example standard form factors include, but are not limited to, 3.5” data storage device (e.g., an HDD or SSD), 2.5” data storage device, 1.8” data storage device, peripheral component interconnect (PCI), PCI-extended (PCI-X), PCI Express (PCIe) (e.g., PCIe x1, x4, x8, x16, PCIe Mini Card, MiniPCI, etc.). In some examples, the data storage device 106 may be directly coupled (e.g., directly soldered or plugged into a connector) to a motherboard of the host device 104.

[0026] Interface 114 may include one or both of a data bus for exchanging data with the host device 104 and a control bus for exchanging commands with the host device 104. Interface 114 may operate in accordance with any suitable protocol. For example, the interface 114 may operate in accordance with one or more of the following protocols: advanced technology attachment (ATA) (e.g., serial-ATA (SATA) and parallel-ATA (PATA)), Fibre Channel Protocol (FCP), small computer system interface (SCSI), serially attached SCSI (SAS), PCI, and PCIe, non-volatile memory express (NVMe), OpenCAPI, GenZ, Cache Coherent Interface Accelerator (CCIX), Open Channel SSD (OCSSD), iAP over USB for wired protocols, bluetooth for wireless protocols, and any other protocols over which iAP is supported, or the like. Interface 114 (e.g., the data bus, the control bus, or both) is electrically connected to the controller 108, providing an electrical connection between the host device 104 and the controller 108, allowing data to be exchanged between the host device 104 and the controller 108. In some examples, the electrical connection of interface 114 may also permit the data storage device 106 to receive power from the host device 104. For example, as illustrated in FIG. 1, the power supply 111 may receive power from the host device 104 via interface 114.

[0027] The NVM 110 may include a plurality of memory devices or memory units. NVM 110 may be configured to store and / or retrieve data. For instance, a memory unit of NVM 110 may receive data and a message from controller 108 that instructs the memory unit to store the data. Similarly, the memory unit may receive a message from controller 108 that instructs the memory unit to retrieve data. In some examples, each of the memory units may be referred to as a die. In some examples, the NVM 110 may include a plurality of dies (i.e., a plurality of memory units). In some examples, each memory unit may be configured to store relatively large amounts of data (e.g., 128MB, 256MB, 512MB, 1GB, 2GB, 4GB, 8GB, 16GB, 32GB, 64GB, 128GB, 256GB, 512GB, 1TB, etc.).

[0028] In some examples, each memory unit may include any type of non-volatile memory devices, such as flash memory devices, phase-change memory (PCM) devices, resistive random-access memory (ReRAM) devices, magneto-resistive random-access memory (MRAM) devices, ferroelectric random-access memory (F-RAM), holographic memory devices, and any other type of non-volatile memory devices.

[0029] The NVM 110 may comprise a plurality of flash memory devices or memory units. NVM Flash memory devices may include NAND or NOR-based flash memory devices and may store data based on a charge contained in a floating gate of a transistor for each flash memory cell. In NVM flash memory devices, the flash memory device may be divided into a plurality of dies, where each die of the plurality of dies includes a plurality of physical or logical blocks, which may be further divided into a plurality of pages. Each block of the plurality of blocks within a particular memory device may include a plurality of NVM cells. Rows of NVM cells may be electrically connected using a word line to define a page of a plurality of pages. Respective cells in each of the plurality of pages may be electrically connected to respective bit lines. Furthermore, NVM flash memory devices may be 2D or 3D devices and may be single level cell (SLC), multi-level cell (MLC), triple level cell (TLC), or quad level cell (QLC). The controller 108 may write data to and read data from NVM flash memory devices at the page level and erase data from NVM flash memory devices at the block level.

[0030] The power supply 111 may provide power to one or more components of the data storage device 106. When operating in a standard mode, the power supply 111 may provide power to one or more components using power provided by an external device, such as the host device 104. For instance, the power supply 111 may provide power to the one or more components using power received from the host device 104 via interface 114. In some examples, the power supply 111 may include one or more power storage components configured to provide power to the one or more components when operating in a shutdown mode, such as where power ceases to be received from the external device. In this way, the power supply 111 may function as an onboard backup power source. Some examples of the one or more power storage components include, but are not limited to, capacitors, super-capacitors, batteries, and the like. In some examples, the amount of power that may be stored by the one or more power storage components may be a function of the cost and / or the size (e.g., area / volume) of the one or more power storage components. In other words, as the amount of power stored by the one or more power storage components increases, the cost and / or the size of the one or more power storage components also increases.

[0031] The volatile memory 112 may be used by controller 108 to store information. Volatile memory 112 may include one or more volatile memory devices. In some examples, controller 108 may use volatile memory 112 as a cache. For instance, controller 108 may store cached information in volatile memory 112 until the cached information is written to the NVM 110. As illustrated in FIG. 1, volatile memory 112 may consume power received from the power supply 111. Examples of volatile memory 112 include, but are not limited to, random-access memory (RAM), dynamic random access memory (DRAM), static RAM (SRAM), and synchronous dynamic RAM (SDRAM (e.g., DDR1, DDR2, DDR3, DDR3L, LPDDR3, DDR4, LPDDR4, and the like)). Likewise, the optional DRAM 118 may be utilized to store mapping data, buffered commands, logical to physical (L2P) tables, metadata, cached data, and the like in the optional DRAM 118. In some examples, the data storage device 106 does not include the optional DRAM 118, such that the data storage device 106 is DRAM-less. In other examples, the data storage device 106 includes the optional DRAM 118.

[0032] Controller 108 may manage one or more operations of the data storage device 106. For instance, controller 108 may manage the reading of data from and / or the writing of data to the NVM 110. In some embodiments, when the data storage device 106 receives a write command from the host device 104, the controller 108 may initiate a data storage command to store data to the NVM 110 and monitor the progress of the data storage command. Controller 108 may determine at least one operational characteristic of the storage system 100 and store at least one operational characteristic in the NVM 110. In some embodiments, when the data storage device 106 receives a write command from the host device 104, the controller 108 temporarily stores the data associated with the write command in the internal memory or write buffer 116 before sending the data to the NVM 110. Controller 108 may include circuitry or processors configured to execute programs for operating the data storage device 106.

[0033] The controller 108 may include an optional second volatile memory 120. The optional second volatile memory 120 may be similar to the volatile memory 112. For example, the optional second volatile memory 120 may be SRAM. The controller 108 may allocate a portion of the optional second volatile memory to the host device 104 as controller memory buffer (CMB) 122. The CMB 122 may be accessed directly by the host device 104. For example, rather than maintaining one or more submission queues in the host device 104, the host device 104 may utilize the CMB 122 to store the one or more submission queues normally maintained in the host device 104. In other words, the host device 104 may generate commands and store the generated commands, with or without the associated data, in the CMB 122, where the controller 108 accesses the CMB 122 in order to retrieve the stored generated commands and / or associated data.

[0034] FIG. 2 is a schematic illustration 200 of an iOS environment, such as for an iPhone. A custom App has a toggle button to allow a user to switch from using an external device with the custom App, to using the external device with the native iOS Apps such as files, camera, etc. for taking pictures or video recording. There is currently no way to toggle back to the custom App because the toggle button is only a one way toggle, from custom App mode to native App mode.

[0035] FIG. 3 is a schematic illustration 300 of an iOS environment according to another embodiment. FIG. 3 illustrates the same iOS environment illustrated in FIG. 2, but shows that the solution is an inactivity timer expiring that causes a switch back to the custom App mode from the native App mode. There is also a FTL workload detection occurring in both the native App as well as the custom App. The FTL workload will be discussed in greater detail below, but at a high level, the FTL workload detects live video recording, which is the typical workload for the native App to use the external device while auto backup is the typical workload for the custom App. As discussed below, there will be FTL workload detection and tracking.

[0036] In the embodiments discussed herein, there is an external storage with a made for iPhone (MFi) coprocessor sitting on the external storage. There is also a hardware (HW) sitting on the printed circuit board (PCB) that allows an authentication called iAP authentication with the iOS. The iOS is either on an iPhone or an iPad or other Apple product. Once authentication is successful, the iOS essentially grants a third party App sitting on the iOS to have custom access to the external storage (also referred to as a drive or accessory or external accessory), which enables specific features such as auto backup security and any accessory specific features that can be used. The authentication will essentially open up a custom tunnel between the App and external storage to enable specific features like auto backup, video recording, etc.

[0037] The protocol that is used after iAP authentication is referred to as external accessory (EA). The terms storage device, accessory, device, and drive may be interchangeably throughout the document. The tunnel is what is used to communicate between the custom App and the drive. When a user wants to switch to the native Apps on the iOS device from a custom App for the drive, there is an issue that arises. The drive is available in the custom App, but the drive is not visible in the native Apps in the iOS. So if the user wants to perform a data transfer using the native files App or to record using the native camera App which is present in the iPhone, the drive will essentially not be visible in those native Apps.

[0038] One solution is to uninstall the custom App and reconnect the drive for the iOS device to detect the drive in the native Apps, which is not a very good user experience. Another solution is an implementation in which if the drive is visible in the custom App, a button is toggled in the custom app for the drive to re-enumerate or switch back to the native Apps by displaying different descriptors. Stated another way, the drive will basically say that the drive doesn’t have a MFi chip and enumerate the drive as a normal USB drive. The drive will come up in the native files App or the native camera App.

[0039] However, there is not a method in which the drive can switch from the native App to the custom App. In order to switch from the native App to the custom App, currently, the user will have to remove and reconnect the drive back to the host device (e.g., iOS device). The embodiments discussed herein involve seamlessly bringing the drive back from the native App mode to the custom App mode. It is to be noted that the phrase native App and native App mode are used interchangeably herein. Similarly, it is to be noted that the phrase custom App and custom App mode are used interchangeably herein

[0040] Interface Accessory Protocol (IAP2) is a protocol stack maintained by Apple that allows drive connected to the iOS (e.g., iPhones, iPads, and iPods) to authenticate as an Apple certified accessory. The authentication is achieved through a MFi co-processor used by the drive to authenticate the drive to the Apple device. The IAP protocol further allows the drive to communicate with a custom App using a vendor specific protocol (EA protocol) after the authentication is done by the iOS, which allows the drive manufacturers to give additional features for the drive. An example is a USB pen drive which performs IAP authentication using the MFi co-processor and launches a custom App on the iOS which allows the drive to give additional features like auto-backup, private folder access, etc.

[0041] The embodiments herein provide a solution for the situation where the host system (e.g., iOS) is capable of iAP authentication; the host system is capable of recording videos to the external storage directly; and the accessory is connected to the host system via a USB bus. An example platform is iPhone 15 Pro / Pro Max.

[0042] When the drive is communicating with the custom App using the EA protocol for purposes such as storage backup, iOS will not allow the user to access the drive from the native iOS Apps (e.g., Files, Camera, etc.), which means that the drive will be displayed to the user only through the custom App but not on the native iOS Apps.

[0043] One solution is to use a virtual (i.e., not physical) toggle button on the custom App which will disconnect the drive from the iOS and reconnect the drive back to the iOS with different identification information so that the drive will show up in the native Apps and not on the custom App. The process works as explained below. Initially, the drive is connected to the iOS. The drive will be available for the user to access through the custom App, which will perform the USB descriptor to be able to do the drive authentication with a configuration descriptor with iAP / drive interface and other descriptors. The user then toggles a button on the custom App to switch to the native App mode. The custom App will send a special command to the drive to re-enumerate with different identification information that will be the configuration descriptor with native interface (UAS / BOT) and other descriptors. The drive will now be available in the native iOS Apps for access.

[0044] Thus, the custom App to the native App switch is possible, but there are no solutions to switch from the native App to the custom App unless the user manually unplugs the drive from the USB port and plugs the drive back again because there is no control on the native App for the drive developer to switch to the custom App mode. Such creates a glitchy experience for the user. One of the problematic scenarios is when the user is recording a video to an external storage drive (e.g., drive) through the native camera App and wants to switch to the custom App to lock the EA and will have to manually power cycle the drive to lock drive.

[0045] Using an inactivity timer can solve the switching back to custom App mode from native App mode. When the drive determines through an inactivity timer that the live recording data from the host system has time-elapsed, the drive automatically triggers an enumeration (to the host system) such that the host device can switch the context to the custom App. The proposed system enables a seamless possibility to switch to the custom App from the native App without any glitchy experience. The end user always has the option of moving to native App from the custom App through the software switch provided by the custom App itself or using a mechanical button or switch as discussed below.

[0046] Also discussed herein are FTL block management mechanisms while dealing with the enumeration parameters wherein the FTL controller is configured to route data to different meta-block during live-recording (real-time) when the drive enumerates using a second set of parameters (enumeration 2) (e.g., native App usage) than a meta-block that is used during enumeration using first set of parameters for non-real time auto-backup (enumeration 1) (e.g., custom App usage). The FTL block management vastly optimizes garbage collection in the backend thereby reducing write amplification and improving the quality of service (QoS) of the system.

[0047] Additionally, the FTL controller of the drive that enumerates the host system for live recording and back up creates at least two pools of logical meta-blocks based on the memory health. Also, the memory device (e.g., NAND) trim capabilities of the physical blocks associated to the logical block uses a healthier pool and a fast trim for live-recording enumeration and uses the other pool during back up enumeration. Independently, an enumeration can be user-triggered by providing a mechanical toggle button or switch on the drive to switch between the application modes in which case, the FTL handling by the drive would be like the proposed FTL handling in the auto-trigger method based on the workload. The mechanical toggle will be discussed below.

[0048] As noted above, one solution is to use an inactivity timer. The inactivity timer solution takes advantage of the inactivity on the user / host to switch from the native App mode to the custom App mode. By default, when the drive is connected to the iOS, the drive will come up in the custom App and the user has the option to switch to the native App mode. The proposed solution allows the user to set a timer, which is referred to as an inactivity timer, for the drive in the custom App. Once the inactivity timer has been set, the inactivity timer settings are forwarded to the drive to be stored in the NVM. The user can now switch to the native Apps such as by making use of the toggle button available on the custom App or the mechanical button or switch on the drive. The FW, once the drive enters the native App mode, will start a timer to detect the inactivity for the drive. If any media access commands are sent to / from the drive, the inactivity timer will be reset. It is to be noted that commands from the drive will be possible only with a user intervention like copying data / recording videos to the drive. If the inactivity timer expires, the drive will raise an interrupt to the FW to indicate that the user has not given any workload to the drive. The interrupt causes the drive to set an internal flag in the NVM which indicates that on next boot-up (i.e., without power cut), the drive will advertise as an Apple certified drive, prompting the iOS to launch the custom App.

[0049] The user can always use the toggle button on the custom App or a mechanical button or switch to return to the native App mode. The entire flow is explained in FIG. 4. FIG. 4 is a flowchart 400 illustrating switching between a native App and a custom App for a drive according to one embodiment. The process starts at block 402 followed by the storage device being available in the custom App at block 404. The user can then toggle the button available in the custom App at block 406 to cause the storage device to be available in the native App. The drive then re-enumerates with the identification information for the MSC or native App at block 408. The FTL routing meta-block in the drive is changed to allow for the recording of video or anything in general from the native App to the drive at block 410. The inactivity timer is then started at block 412 followed by a determination of whether there are any active data transfers at block 414. If there are active data transfers, then the process circles back to block 412, but if there are no active data transfers, then a determination is made at block 416 regarding whether the inactivity timer has expired. If the inactivity timer has not expired, then the process circles back to block 414, but if the inactivity timer has expired, then the drive re-enumerates with the identification for the drive or custom App. The FTL routing meta-block allocated for the auto backup is then changed at block 420 and the process repeats back to block 404.

[0050] Stated another way, the drive initially is plugged into the Apple device (e.g., iPhone). The drive initially enumerates in the custom App and is usable with the iPhone through the custom App as, for example, an extra storage device for auto backup operations. At some point in time, the user sets an inactivity timer for the drive. The inactivity timer functions only when the drive is enumerated with the native Apps. The inactivity timer can be set for any period of time of the user’s choosing, and can be changed by the user.

[0051] At another point in time, the user decides to use the drive with native Apps. The user then can use the virtual, toggle switch / button in the Custom App or use the physical button or switch on the drive (discussed below) to cause the drive to re-enumerate to the native Apps. When used with the native Apps, the drive can be used for direct storage from the native Apps, such as for video recording, where the drive is, in essence, an external storage location functioning identical to any internal storage within the host device. The FTL routing meta-block on the drive is routed to functioning with the host device, such as for direct storage from the host device. At another point in time, the inactivity timer expires. Thereafter, the drive re-enumerates with the custom App and the FTL routing meta-block on the drive is routed to functioning with the custom App. If the user again wishes to enumerate the drive with the native App, then the user can use the virtual toggle switch in the custom App or simply use the physical button / switch on the drive.

[0052] Basically, as soon as the user connects the drive which supports iAP to the host device, the drive will always come up in the custom app. The user will have an option to configure an inactivity timer for any period of time such as one minute, five minutes, ten minutes, etc. so that when the drive is idle for the configured time in the native Apps, the drive will switch back to the custom App. As an example, if the user configures the inactivity timer in the custom App, but wants to do some recording using the native camera App, the user toggles to the native camera App and once the recording is done, the user leaves the drive idle and once the timer expires, the drive will automatically switch back by doing a reset internally and then come back in the custom App to seamlessly transfer between the native App and the custom App.

[0053] Another option is to have a mechanical button or switch on the drive and thus replace the manual power cycle by the user with a mechanical button on the drive that can switch between the two modes (i.e., custom App and native iOS Apps). FIG. 5 is a flowchart 500 illustrating switching between a native App and a custom App for a drive according to another embodiment. FIG. 6 is a USB device 600 according to one embodiment. FIG. 7 is a USB device 700 according to another embodiment.

[0054] As shown in FIG. 5, the process starts at block 502 and the drive is available in the custom App for usage at block 504. The user then toggles the mechanical button or switch on the drive at block 506 and the drive enumerates with the identification information for the MSC or native App at block 508. The FTL routing meta-block in the drive is changed to allow for the recording of video or anything in general from the native App to the drive at block 510. At some point in time, the user then toggles the mechanical button again at block 512. The drive re-enumerates with the identification for the drive or custom App at block 514. The FTL routing meta-block allocated for the auto backup is then changed at block 516 and the process repeats back to block 504.

[0055] Stated another way, the drive initially is plugged into the host device (e.g., iPhone). The drive initially enumerates in the custom App and is usable with the host device through the custom App as, for example, an extra storage device for auto backup operations. At some point in time, the user decides to use the drive with native Apps. The user then can use the virtual toggle switch / button in the custom App or use the physical button or switch on the drive to cause the drive to re-enumerate to the native Apps. When used with the native Apps, the drive can be used for direct storage from the native Apps, such as for video recording, where the drive is, in essence, an external storage location functioning identical to any internal storage within the host device. The FTL routing meta-block on the drive is routed to functioning with the host device, such as for direct storage from the host device. At another point in time, the user decides to use the drive with the custom App and uses the physical button or switch on the drive to cause the drive to re-enumerates with the custom App and the FTL routing meta-block on the drive is routed to functioning with the custom App. If the user again wishes to enumerate the drive with the native App, then the user can use the virtual toggle switch in the custom App or simply use the physical button / switch on the drive.

[0056] There is a mechanical button on the drive as shown in illustration 600 of FIG. 6 or a switch that moves between “A” and “B” as shown in illustration 700 of FIG. 7. The drive shown in FIGS. 6 and 7 can be the data storage device 106. There can be an option of extending the functionality of the mechanical button by not only switching back from the native App to the custom App, but the user can switch back directly from the custom App to the native App also. Basically, the user connects the drive to the host device and the drive comes up in the custom App directly. The user can toggle the button (or switch) on the drive, which will essentially send an interrupt or send a signal to the ASIC, and that interrupt or signal will be translated into a reset and then the drive come up in the other mode. The button or switch is basically a toggle between the two modes. There's no active logic, the drive just keeps toggling between the two modes (i.e., native App mode and custom App mode) on every press of the mechanical button or switch of the mechanical switch. The user toggles the mechanical button or switch and the drive re-enumerates with the identification information corresponding for the appropriate App. The user can toggle the button or switch again and the drive will re-enumerate with the identification information for the other App to seamlessly move between the native mode to the custom mode.

[0057] The FW is aware of the current state of operation (i.e., custom App or native iOS Apps). When the user toggles the mechanical button or switch available on the drive, the FW will set a flag in the NVM to signify which identification information (i.e., descriptors) should be advertised to the host device on re-enumeration. The FW will then trigger an internal reset prompting the host device to query for the drive identification information again which will ensure that the drive will come in the other possible mode (i.e., custom App -> native App or vice-versa).

[0058] The solutions proposed have an aspect in common, the meta-block routing. Since the FW is always aware of the mode of operation (i.e., native App or custom App), the FTL can be optimized to give greater performance when the native App is used where cases like pro-resolution video recording is expected. The performance improvement is achieved with the following scheme: the FTL maintains two memory device (e.g., NAND) trims, one with faster blocks and the other with slower blocks. The blocks are allocated to the faster and the slower trim with known bit error rate (BER) based classification methods. The faster trim is used by the native App mode and the slower trim is used for the custom App mode. The FTL will switch the routing meta-blocks based on the current mode of operation (i.e., native App or custom App).

[0059] The advantage of the block segregation is that the drive can give higher performance with the native App mode where live video recording can be expected by using blocks with low BER etc. whereas the comparatively slower performance is acceptable in case of the custom App mode where auto-backup traffic is expected.

[0060] Since the drive is always aware of what mode the drive is going to come up in, either native App mode or custom App mode, the drive can take advantage of the awareness to do intelligent memory device (e.g., NAND) management. The custom App is primarily targeted for auto backup schemes so for whatever Apps are released in the market with respect to auto backup schemes, custom App implementation typically targets auto backup which means the drive is archiving data and does not have a timing requirement. The data can be backed up slow or fast, but the data has to be backed up reliably. Reliable backup is the only condition for auto backup, whereas the native Apps tend to use the drive in the native camera Apps in the iOS which is usually 4K resolution at 60 frames per second (fps) or 4K at 120fps recording which are recording modes that directly record to the external storage medium (e.g., drive) and does not record to the iPhone's internal storage medium. The requirement from the drive in the native App is that there should not be even an instantaneous drop in performance of the drive. As soon as the host device sends the data to the drive, the drive should be able to quickly store the data into the memory device (e.g., NAND) and be ready for the next command.

[0061] For 4K 60fps, there should be a 220 megabits per second (Mbps) requirement, and for 4K 120fps there should be a 440 Mbps requirement without any instantaneous drop in performance. Even a small drop in performance below 440 Mbps or below 220 Mbps is not acceptable. If there is a drop, some data that is being recorded is bound to miss. Thus, while editing, or during playback, the particular region or frame missed will have a glitch (i.e., one frame will be missing). So the assumption in which the FTL optimization is done is based upon the 4K 60fps and 4K 120fps expectations.

[0062] Essentially, the FTL will always maintain two memory device (e.g., NAND) portions, one with a faster block and one with a slower block. The blocks will be allocated with already known BER based classification methods. The drive can classify the blocks according to that slow and fast with the faster blocks used by the native App mode to meet the timing expectation. The slower blocks are used for the custom App mode because the data in custom App mode is archived data and reliability is the only concern. Essentially there will be a performance difference between the custom App and the native App, but the performance difference takes care of different requirements for both modes which is possible because the drive is aware of the mode in which the drive is operating.

[0063] In one example, assume the drive comes up in the custom App mode and the user toggles the button available in the custom App or the mechanical button or switch on the drive. The FTL routing meta-block is allocated for video recording, which allows the user to record data at a much faster pace without any frame drops. Once the recording is done, the inactivity timer can kick in. If there are no active transfers, the inactivity timer will expire and the drive will come back in the custom App mode. The FTL routing meta-block will be changed for the auto backup, which is slower, and then the entire cycle is repeated.

[0064] By using an inactivity timer, a button, and / or a switch, a seamless transition of control of a drive between various Apps avoids glitchy user experiences. The seamless transition leads to better drive performance and data distribution since the workload can be detected and routed accordingly by the FW. Therefore, the timer, button, and / or switch solution improves switching between native and custom Apps for an external storage device.

[0065] In one embodiment, a data storage device comprises: a memory device, and a controller coupled to the memory device, wherein the controller is configured to: detect selection of a first button or switch; re-enumerate the device with information for a native App; change a FTL routing meta-block; and start an inactivity timer. The detecting occurs while the data storage device is enumerated with a custom App that is different from the native App. The first button or switch is disposed in the custom App. The first button or switch is a physical button or switch. The controller is configured to re-enumerate the device with information for a custom App after detecting the inactivity timer has expired. The controller is configured to assign blocks having a first BER to the native App and blocks having a second BER to non-native Apps that is different than the first BER. The first BER is less than the second BER. The controller is configured to re-enumerate the device with information for a custom App after detecting a second button or switch has been selected. The second button or switch is separate and distinct from the first button or switch. The controller is configured to enumerate the data storage device with information for a custom App when the data storage device is initially connected to a host device.

[0066] In another embodiment, a data storage device comprises: a memory device, and a controller coupled to the memory device, wherein the controller is configured to: detect toggling of a physical button or moving of a physical switch, wherein the physical button or physical switch is disposed on a casing of the data storage device, wherein prior to the detecting, the device is enumerated with information for a first App; re-enumerate the device with information for a second App, wherein the second App is different from the first App; and change a FTL routing meta-block. The controller is configured to detect toggling of the physical button or moving of the physical switch after the changing, and wherein the controller is configured to re-enumerate the device with the information for the first App. The controller is configured to change the FTL routing meta-block to a first block from a second block. The first block has a first BER and the second block has a second BER, wherein the second BER is different than the first BER. The second BER is less than the first BER. The data storage device is configured for direct storage after re-enumerating with the information for the second App. The first App is a custom App and wherein the second App is a native App.

[0067] In another embodiment, a data storage device comprises: a housing; a physical button or switch coupled to the housing; means to store data disposed in the housing; and a controller disposed in the housing and coupled to the means to store data, wherein the controller is configured to: detect selection of the physical button or switch; re-enumerate the data storage device; and store data in the means to store data, wherein a storing location in the means to store data changes based upon the re-enumerating. The storing location is changed from a location having a first BER to a location having a different, second BER. The controller is configured to operate an inactivity timer, wherein the controller is configured to send an interrupt signal in response to an inactivity timer expiring or exceeding a predetermined threshold.

[0068] While the foregoing is directed to embodiments of the present disclosure, other and further embodiments of the disclosure may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.

Claims

1. A data storage device, comprising:a memory device; anda controller coupled to the memory device, wherein the controller is configured to:detect selection of a first button or switch;re-enumerate the device with information for a native application (App);change a flash translation layer (FTL) routing meta-block; andstart an inactivity timer.

2. The data storage device of claim 1, wherein the detecting occurs while the data storage device is enumerated with a custom App that is different from the native App.

3. The data storage device of claim 2, wherein the first button or switch is disposed in the custom App.

4. The data storage device of claim 1, wherein the first button or switch is a physical button or switch.

5. The data storage device of claim 1, wherein the controller is configured to re-enumerate the device with information for a custom App after detecting the inactivity timer has expired.

6. The data storage device of claim 1, wherein the controller is configured to assign blocks having a first bit error rate (BER) to the native App and blocks having a second BER to non-native Apps that is different than the first BER.

7. The data storage device of claim 6, wherein the first BER is less than the second BER.

8. The data storage device of claim 1, wherein the controller is configured to re-enumerate the device with information for a custom App after detecting a second button or switch has been selected.

9. The data storage device of claim 8, wherein the second button or switch is separate and distinct from the first button or switch.

10. The data storage device of claim 1, wherein the controller is configured to enumerate the data storage device with information for a custom App when the data storage device is initially connected to a host device.

11. A data storage device, comprising:a memory device; anda controller coupled to the memory device, wherein the controller is configured to:detect toggling of a physical button or moving of a physical switch, wherein the physical button or physical switch is disposed on a casing of the data storage device, wherein prior to the detecting, the device is enumerated with information for a first application (App);re-enumerate the device with information for a second App, wherein the second App is different from the first App; andchange a flash translation layer (FTL) routing meta-block.

12. The data storage device of claim 11, wherein the controller is configured to detect toggling of the physical button or moving of the physical switch after the changing, and wherein the controller is configured to re-enumerate the device with the information for the first App.

13. The data storage device of claim 12, wherein the controller is configured to change the FTL routing meta-block to a first block from a second block.

14. The data storage device of claim 13, wherein the first block has a first bit error rate (BER) and the second block has a second BER, wherein the second BER is different than the first BER.

15. The data storage device of claim 14, wherein the second BER is less than the first BER.

16. The data storage device of claim 11, wherein the data storage device is configured for direct storage after re-enumerating with the information for the second App.

17. The data storage device of claim 11, wherein the first App is a custom App and wherein the second App is a native App.

18. A data storage device, comprising:a housing;a physical button or switch coupled to the housing;means to store data disposed in the housing; anda controller disposed in the housing and coupled to the means to store data, wherein the controller is configured to:detect selection of the physical button or switch;re-enumerate the data storage device; andstore data in the means to store data, wherein a storing location in the means to store data changes based upon the re-enumerating.

19. The data storage device of claim 18, wherein the storing location is changed from a location having a first bit error rate (BER) to a location having a different, second BER.

20. The data storage device of claim 18, wherein the controller is configured to operate an inactivity timer, wherein the controller is configured to send an interrupt signal in response to an inactivity timer expiring or exceeding a predetermined threshold.