ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
usb_selftest_device.h File Reference

Device-side worker entry of the soak self-test. More...

#include "tx_api.h"
Include dependency graph for usb_selftest_device.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

VOID selftest_device_worker (ULONG arg)
 Device-side worker: bring the FS device MSC stack up, then park.

Detailed Description

Device-side worker entry of the soak self-test.

The USBFS device half (USBX MSC over a read-only FAT16 MRAM volume) runs on its own ThreadX worker; this declares that worker so tx_application_define in main.c can spawn it. Defined in usb_selftest_device.c. ThreadX/USBX only, so the declaration is gated out of a (hypothetical) off-target build.

Since
0.1.0

Definition in file usb_selftest_device.h.

Function Documentation

◆ selftest_device_worker()

VOID selftest_device_worker ( ULONG arg)

Device-side worker: bring the FS device MSC stack up, then park.

Parameters
[in]argThreadX entry argument (unused).
Precondition
tx_application_define created this thread.
USB-FS pins + 48 MHz clock are up (main did both).
Postcondition
The FS device is attached and serviceable (USBX runs the BBB/SCSI state machine on its own class threads).
Since
0.1.0

Device-side worker: bring the FS device MSC stack up, then park.

USBX system + device stack + MSC class + DCD bridge on the USBHS controller, then DPRPU attach. The FS host downstream forces a full-speed link, so the stack serves the FS-fallback framework. USBX runs the SCSI/BBB state machine on its own class threads after this.

Parameters
[in]argThreadX entry argument (unused).
Precondition
tx_application_define created this thread.
USB-HS pins + UTMI PLL are up (main did both).
Postcondition
The HS device is attached and serviceable.
On any bring-up failure the thread exits (probes show where).
Note
Runs once; loops forever on success.
Since
0.1.0

Device-side worker: bring the FS device MSC stack up, then park.

Device-side worker: bring the HS device stack up, then park.

USBX system + device stack + MSC class + DCD bridge on the USBFS controller, then DPRPU attach. USBX runs the SCSI/BBB state machine on its own class threads after this.

Parameters
[in]argThreadX entry argument (unused).
Precondition
tx_application_define created this thread.
USB-FS pins + 48 MHz clock are up (main did both).
Postcondition
The FS device is attached and serviceable.
On any bring-up failure the thread exits (probes show where).
Note
Runs once; loops forever on success.
Since
0.1.0

Definition at line 761 of file usb_selftest_fs_host_fatdisk.c.

References k_ra8_ok, k_ra8_usb_speed_fs, k_selftest_idle_ticks, ra8_usb_device_attach(), selftest_msc_class_register(), selftest_usbx_stack_up(), tx_thread_sleep, and ux_dcd_ra8_usb_initialize().