Share this

USB boot technology for embedded real-time systems

2026-04-06 05:44:14 · · #1
Introduction Currently, embedded real-time systems designed based on VxWorks are widely used. There are various methods for booting embedded real-time systems; Wind River's reference BSP (Board Support Package) provides several boot methods. The authors have also proposed several boot methods for VxWorks-based embedded systems. These methods can be appropriately selected according to specific application requirements. The authors have also implemented these methods when developing Cable Modems. A common problem with these methods is that while they can update the image file in the onboard program memory, the program memory cannot be expanded once designed. In practical applications, due to the enhanced functionality of embedded systems, the size of the system image file will continuously increase, exceeding the program storage space of the target board, thus preventing the new image file from being burned onto the target board. With the development of USB technology, USB flash drives have been widely used in PC systems, basically replacing floppy disks, and PC systems can boot from USB flash drives. Because USB flash drives are stable, small in size, and have fast access speeds, they are also very suitable as storage devices for embedded real-time systems. This provides a new approach to booting embedded real-time systems: booting from a USB flash drive. This method has low requirements for program storage space on the embedded real-time system board. Only the Bootrom program of the embedded real-time system needs to be stored in Flash memory. The system image file is placed on a USB flash drive, enabling the real-time operating system to be loaded from the USB flash drive. This paper presents the embedded host hardware structure, software protocol stack, and main program flow for implementing USB flash drive booting of an embedded real-time system, and discusses the feasibility of implementing USB flash drive booting of an embedded real-time system. 1 Hardware Structure and Driver of Embedded USB Host Controller Embedded systems are systems with tightly integrated hardware and software. To achieve booting from a USB flash drive, a USBHOST host controller must be added around the embedded microprocessor in terms of hardware; in terms of software, a host controller driver (HCD), a USB driver, a USB Client driver, and an application program must be designed. 1.1 Embedded USB Host Hardware Structure The hardware structure of the embedded USB host is relatively simple, requiring only the addition of a USB host control chip outside the embedded microprocessor. In this project, the embedded microprocessor used is Motorola's MPC860T, and the USB host control chip used is the SL811HS chip. The SL811HS chip is a USB control chip produced by Cypress that supports full-speed data transmission. The chip contains a USB host and host/slave controller, supports full-speed and low-speed data transmission, and can automatically identify full-speed or low-speed devices. The interface provided by the SL811HS conforms to the USB 1.1 standard. For more detailed usage of the SL811HS, please refer to reference [3]. The system hardware structure using the SL811HS as an embedded USB host controller is shown in Figure 1. 1.2 Software structure on the embedded USB host To enable operation of its USB peripherals, the embedded host must have the three software structure layers shown in Figure 2: USB host controller driver (HCD), USB host driver (USBD), and USB device driver. At the bottom of the protocol stack is the USB host controller USB HC (USBHost Controller), which is the hardware part that controls each USB device in the host system. There are two main types of USB host controllers: one is the Universal Host Controller Interface (UHCI), and the other is the Open Host Controller Interface (OHCI). Hardware manufacturers typically design USB host controllers based on these two specifications. Each type of host controller has a hardware-independent USB host controller driver (HCD). Wind River provides two types of drivers: usbHedUhciLib (UHCl host controller library) and usbHcdOhciLib (OHCI host controller library). The interface between the USB host driver (USBD) and the HCD allows for one or more underlying host controllers, and Wind River's USBD can connect multiple USB HCDs simultaneously. This design feature allows developers to build complex USB systems. The USBD is a hardware-independent module built on top of the HCD. The USBD manages each USBD device connected to the host, providing a path for communication with higher levels. It also handles automatic USBD power management and bandwidth management; furthermore, the USBD manages the USB Hub. The proper functioning of the Hub is one of the criteria for evaluating the USBD; therefore, Wind River's USBD designers aimed to make the USBD transparently implement the Hub's functionality. This means that the USBD can also handle the dynamic plugging and unplugging of the USB Hub and devices. The USB client module is at the top of the USBD host driver protocol stack. The USB class driver is a typical example of the client module. The USBD class driver is responsible for managing different types of devices connected to the USBD, which rely on the USBD to provide a communication path with each device. Other examples of the USB client module are those applications that use the USBD to communicate with USB devices. 2 Embedded Real-Time System USB Disk Boot Software Program Design In order to realize the operation of the USB disk, in the embedded real-time system designed based on VxWorks, the program that needs to be designed includes: USB host controller driver, USBD host driver, USB block storage device driver, file system installation, and application program to read and write USB disk device through the file system, as shown in Figure 3. Therefore, to realize booting from the USB disk, four functions need to be added to the usrRoot function in the bootConfig.c file. (1) Initialize the USB host controller function Initialize the HCD (USB Host Controller Driver) function, that is, initialize the SL811HS and connect it to the specified bus: LOCAL int fn-cAttach(pHRB_ATTACH pHrb). This function initializes the SL811 control chip with SL811Init(). The function `taskSpawn("tSl81lint", 0, 0, 0x4000, (FUNCPTR)intThread, (int)pHost, 0, 0, 0, 0, 0, 0, 0, 0)` creates the `intThread` task to handle the interrupt. Here, `intThread` calls `OSS_SEM_TAKE(pHost->in-tPending, interval)` to block and synchronize with the interrupt service routine `intHandle`. The function `processSl811hInterrupt()` is called to handle the hardware interrupt, reading the interrupt status register to determine the interrupt type. The function `UHC_INT_CONNECT(pHost, intHandler, pHost, &s)` is called to connect to the SL811 main controller chip interrupt. `UHC_INT_CONNECT` is a macro definition. The function `intHandler` completes the interrupt handling and calls `OSS_SEM_GIVE(pHost->imPending)` to release the binary semaphore used for synchronization between the interrupt and the task. (2) The function usbdInitialize() initializes the internal USBD data structure and calls the entry points of other USB driver stack modules in sequence. The function usbdInitialize() calls usbdHcdAttach(execFunc, &s1811IOCfg, pToken) to connect the HCD to the USBD. Here, execFunc is the function usbHcdSl811hExee(). The function usbdInitialize() calls USBEnumerate(USBD_CLIENT_HANDLE clientHandle, FILE *fout) to list all USB host controllers, hubs and USB devices connected to the system. (3) The function usbBulkDevInit() initializes the USB storage device and installs the DOS file system. The function usbBulkDevlnit calls the functions usbdClientRegister("BULK_CLASS", &usbdHandle) and usbdDynamicAt-tachRegister(usbdHandle, USB_CLASS_MASS_STORAGE, USB_SUBCLASS_SCSLCOMMAND_SET, USB_INTERFACE_PROTOCOL_BULK_ONLY, usbBulkDc-vAttachCallback) to establish a connection with the USB drive and register callback routines. The function usbBulkDevlnit calls the function OSS_THREAI_CREATE(bulkClientThread, (pVOID) fout, OSS_PRIORITYINTERRUPT, "tBulkClnt", &bulkTaskId) to create a task that manages the insertion and removal of the USB drive. The bulkCliemThread routine calls pBulkBlkDev=(BLK_DEV*)usbBulkBlkDevCreate(bulkNodeld, NULL, NULL, USB_SCSI_FLAG_READ_WRITEl0); to install the USB device. It calls pBulkDosVol=dosFsDevInit("/ud0/", pBulkBlkDev, NULL); to install the DOS file system. (4) The function design of loading the image file from the USB flash drive is USBDLoad(), which realizes the loading of the image file VxWorks from the USB flash drive. The USBDLoad() function mainly includes the following statements: Modify the bootLoad function in the bootConfig.c file to add support for booting from the USB flash drive. The following statements are mainly added: 3 Summary The embedded real-time system can be booted from the USB flash drive on the embedded experimental board designed based on MPC860 and VxWorks. The significant advantages of booting an embedded real-time system from a USB flash drive are mainly reflected in: convenient system image file updates (simply replace the image file on the USB flash drive, no need to re-burn); fast boot (fast USB interface transfer speed); compatibility with various real-time operating systems (the image file stored on the USB flash drive can also be developed using other embedded real-time operating systems, such as PSOS, Nucleus, etc.); and low Flash storage requirements (Flash memory mainly stores the Bootrom program, while the system image file is stored on the USB flash drive). Of course, in practical applications, data collected by the embedded real-time system can also be saved to the USB flash drive, which facilitates resource sharing between embedded devices and PCs.
Read next

CATDOLL 138CM Tami TPE

Height: 138cm Weight: 26kg Shoulder Width: 30cm Bust/Waist/Hip: 65/61/76cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22