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

USB self-loop: the onboard OSPI flash exposed as a USB drive. More...

#include <stdint.h>
#include <string.h>
#include "ra8_board_ek_ra8d2.h"
#include "ra8_boot_entry.h"
#include "ra8_cgc.h"
#include "ra8_err.h"
#include "ra8_fs.h"
#include "ra8_gpio_constants.h"
#include "ra8_isr.h"
#include "ra8_port_constants.h"
#include "ra8_port_utils.h"
#include "ra8_time.h"
#include "ra8_usb.h"
#include "ra8_usb_hmsc.h"
#include "ra8_xspi.h"
#include "usb_selftest_ospi_steps.h"
#include "tx_api.h"
#include "ux_api.h"
#include "ux_dcd_ra8_usb.h"
#include "ux_device_class_storage.h"
#include "ux_device_stack.h"
Include dependency graph for main.c:

Go to the source code of this file.

Enumerations

enum  usb_langid_byte_t : uint8_t {
  k_usb_langid_en_us_lo = 0x09U ,
  k_usb_langid_en_us_hi = 0x04U
}

Functions

void _tx_timer_interrupt (void)
void SysTick_Handler (void)
 Service the SysTick exception selected by the linked application.
static UINT selftest_usbx_stack_up (void)
 Brings USBX system + FS device stack up.
static UINT selftest_msc_class_register (void)
 Registers the Mass-Storage class with the read-only MRAM LUN.
static ra8_err_t selftest_ospi_write_pattern (void)
 Erase the OSPI window and program the deterministic pattern.
static ra8_err_t selftest_ospi_provision (void)
 Bring the OSPI flash up and provision the test pattern.
static VOID selftest_device_worker (ULONG arg)
 Device-side worker: provision OSPI, bring the FS device up.
static VOID selftest_host_worker (ULONG arg)
 Host-side worker: retry the full pass until it succeeds.
VOID tx_application_define (VOID *first_unused_memory)
 ThreadX application-define hook.
static void selftest_panic_halt (void)
 Halt forever in WFI – panic stop on init failure.
static void selftest_route_usb_or_halt (void)
 Route both ports' pins: FS as device, HS as host.
static void selftest_setup_or_halt (void)
 Bring CGC + both USB clocks + SysTick + SCI8 + LEDs + pins up.
void main (void)
 Application entry: bring the board up, then hand off to ThreadX.

Variables

static volatile bool s_tx_kernel_up = false
 Set in tx_application_define; gates ThreadX tick delivery.
static const ra8_port_pin_t k_selftest_pin_fs_vbus = (ra8_port_pin_t)k_ra8_board_usbfs_pin_vbus
 USBFS VBUS sense pin (P4_07, PSEL = 0x13).
static const ra8_port_pin_t k_selftest_pin_fs_vbusen = (ra8_port_pin_t)k_ra8_board_usbfs_pin_vbusen
 USBFS VBUSEN (P5_00) – GPIO LOW for the device role.
static const ra8_port_pin_t k_selftest_pin_fs_dp = (ra8_port_pin_t)k_ra8_board_usbfs_pin_dp
 USBFS D+ (P8_14).
static const ra8_port_pin_t k_selftest_pin_fs_dm = (ra8_port_pin_t)k_ra8_board_usbfs_pin_dm
 USBFS D- (P8_15).
static const ra8_port_pin_t k_selftest_pin_hs_vbus = (ra8_port_pin_t)k_ra8_board_usbhs_pin_vbus
 USBHS_VBUS sense pin (P4_08, PSEL = 0x14).
static const ra8_port_pin_t k_selftest_pin_hs_pwr = (ra8_port_pin_t)k_ra8_board_usbhs_pin_pwr
 J7 host-power switch (PD07): HIGH = U18 supplies VBUS (UM 6.2).
static TX_THREAD s_device_thread
 ThreadX TCB for the USBX device-side worker thread.
static UCHAR s_device_stack [k_selftest_thread_stack]
 Stack backing storage for s_device_thread.
static TX_THREAD s_host_thread
 ThreadX TCB for the polled host-side worker thread.
static UCHAR s_host_stack [k_selftest_host_stack]
 Stack backing storage for s_host_thread (ra8_fs walks live here).
static UCHAR s_usbx_pool [k_selftest_usbx_pool_bytes]
 USBX memory pool (USBX uses tx_byte_pool internally).
static UCHAR s_msc_vendor_id [] = "RA8D2 "
static UCHAR s_msc_product_id [] = "SELFTEST OSPI RO"
static UCHAR s_msc_product_rev [] = "0001"
static volatile uint32_t s_dbg_ospi_id
 OSPI JEDEC id read at boot (IS25LX512M = 0x009D5A1A).
static volatile uint32_t s_dbg_ospi_prov = (uint32_t)k_selftest_no_mismatch
 OSPI provisioning result (sentinel = pending, 0 = done, else err).
static UCHAR s_device_framework_fs []
static UCHAR s_string_framework []
 USBX string descriptor table (vendor / product / serial).
static UCHAR s_language_id_framework [] = {k_usb_langid_en_us_lo, k_usb_langid_en_us_hi}
 USBX language-id table – US English.

Detailed Description

USB self-loop: the onboard OSPI flash exposed as a USB drive.

Tag
[Ring 6 / APP] {World: S}

Brings the onboard 64 MiB Octo-SPI flash (IS25LX512M, U16) up as a USB drive and verifies it against itself on-chip – no PC in the loop. The two USB ports are cabled to EACH OTHER and one firmware image runs both USB stacks PLUS the xSPI flash:

  • At boot the device side ERASES + PROGRAMS a 1 MiB region of the OSPI (offset 0x100000) with a deterministic, sector-derived pattern via ra8_xspi (the same driver flash_journal validated) – so the flash genuinely holds known content.
  • USBFS (J11) = DEVICE: a ThreadX + USBX Mass-Storage class exposes that OSPI region as a read-only synthesized FAT16 volume with one file OSPI.BIN; media-read pulls each sector straight off the flash with ra8_xspi_flash_read.
  • USBHS (J7) = HOST: the polled first-party host stack (ra8_usb_hmsc
    • ra8_fs) enumerates the device over the cable, mounts the volume, streams the data region back with raw multi-block READ(10), and checks every sector against the SAME deterministic pattern formula – so the host never touches the single xSPI controller (no contention) yet proves the OSPI erase + program + read round-trips intact over USB. A WRITE(10) into the read-only LUN is rejected.

The link runs at 12 Mbps (FS device ceiling; HS host serves an FS downstream device, RHST = FS).

Verdicts stream over SCI8 (J-Link OB CDC console, 115200) and are mirrored in J-Link-readable probes (s_dbg_*).

Pinout

OSPI: OCTA pins routed by ra8_board_xspi_pins_init (PSEL 0x1C) on xSPI CS1 (IS25LX512M). FS device: P4_07 VBUS sense, P5_00 VBUSEN GPIO LOW (device role), P8_14 D+, P8_15 D- (PSEL usb_fs). HS host: SW4-8 to Host via the U15 expander, PD07 HIGH (U18 supplies J7 VBUS), P4_08 USBHS_VBUS (PSEL usb_hs). Console: PD_02/PD_03 SCI8 (PSEL sci_async).

Author
Brighton Sikarskie
Date
2026-06-13
Since
0.1.0

Definition in file main.c.

Enumeration Type Documentation

◆ usb_langid_byte_t

enum usb_langid_byte_t : uint8_t
Enumerator
k_usb_langid_en_us_lo 

LANGID 0x0409 low byte.

k_usb_langid_en_us_hi 

LANGID 0x0409 high byte.

Definition at line 317 of file main.c.

Function Documentation

◆ _tx_timer_interrupt()

void _tx_timer_interrupt ( void )
extern

◆ main()

void main ( void )

Application entry: bring the board up, then hand off to ThreadX.

The application entry point Reset_Handler hands control to.

Both USB controllers' clocks and pins come up before the kernel so the two workers only deal with stack bring-up.

Precondition
Reset_Handler has copied .data and zeroed .bss.
SystemInit has set VTOR, FPU, and priority grouping.
Postcondition
On clean entry the CPU stays in tx_kernel_enter forever.
On any HAL init failure the function halts in WFI.
Note
Single entry point; not re-entrant.
Since
0.1.0

Definition at line 758 of file main.c.

References ra8_isr_globals_enable(), selftest_panic_halt(), and selftest_setup_or_halt().

◆ selftest_device_worker()

VOID selftest_device_worker ( ULONG arg)
static

Device-side worker: provision OSPI, bring the FS device up.

First erases + programs the OSPI window with the test pattern (selftest_ospi_provision), THEN brings USBX + the device stack + MSC class + DCD bridge up on the USBFS controller and DPRPU-attaches. Provisioning runs before attach so the volume is fully populated the moment the host can read it. 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 + CGC are up (main did them).
Postcondition
The OSPI window is provisioned and the FS device is attached.
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 522 of file main.c.

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

◆ selftest_host_worker()

VOID selftest_host_worker ( ULONG arg)
static

Host-side worker: retry the full pass until it succeeds.

Waits for the device side to attach, then loops selftest_host_pass with a retry pause until the whole config A ladder passes; afterwards parks so the verdict stays on the wire.

Parameters
[in]argThreadX entry argument (unused).
Precondition
tx_application_define created this thread (lower priority than the USBX device-side threads).
The HS host pins, expander switch, and PLL are up (main).
Postcondition
On success the pass counter and LED2 are latched.
Retries forever otherwise; each failure prints its step.
Note
Polled host stack: blocking calls, ms timeouts via ra8_time.
Since
0.1.0

Definition at line 566 of file main.c.

References k_ra8_ok, k_selftest_boot_wait_ticks, k_selftest_idle_ticks, k_selftest_retry_ticks, selftest_host_pass(), and tx_thread_sleep.

◆ selftest_msc_class_register()

UINT selftest_msc_class_register ( void )
static

Registers the Mass-Storage class with the read-only MRAM LUN.

Single LUN, write-protected, FAT16 geometry from selftest_fat_geom_t, media callbacks above.

Returns
UINT UX_SUCCESS on success.
Return values
UX_SUCCESSClass registered.
Precondition
selftest_usbx_stack_up has succeeded.
Media read/write/status callbacks are defined.
Postcondition
MSC class bound to configuration 1, interface 0.
LUN0 advertises the read-only synthesized FAT16 volume.
Note
Not re-entrant.
Since
0.1.0

Definition at line 383 of file main.c.

References k_fat_total_sectors, k_selftest_block_size, memset(), s_msc_product_id, s_msc_product_rev, s_msc_vendor_id, selftest_msc_read(), selftest_msc_status(), and selftest_msc_write().

◆ selftest_ospi_provision()

ra8_err_t selftest_ospi_provision ( void )
static

Bring the OSPI flash up and provision the test pattern.

Mirrors flash_journal's bring-up: U15 expander courtesy write, ra8_board_xspi_pins_init (OCTA pins + RESET pulse), ra8_xspi_init in 1S-1S-1S mode, JEDEC-id readback (stamped to s_dbg_ospi_id for the bench), then selftest_ospi_write_pattern.

Returns
First failing step's error, or k_ra8_ok.
Return values
k_ra8_okOSPI is up and the window holds the pattern.
Precondition
CGC is initialized (main ran ra8_cgc_init).
Single caller (the device worker, before USB attach).
Postcondition
s_dbg_ospi_id / s_dbg_ospi_prov reflect the outcome.
The 1 MiB OSPI window is erased + programmed on success.
Note
Blocking; runs once at boot before USB attach.
Since
0.1.0

Definition at line 481 of file main.c.

References k_ospi_instance, k_ra8_ok, k_ra8_xspi_lio_1s1s1s, ra8_board_io_expander_set_octospi_active(), ra8_board_xspi_pins_init(), ra8_xspi_flash_read_id(), ra8_xspi_init(), s_dbg_ospi_id, s_dbg_ospi_prov, and selftest_ospi_write_pattern().

Referenced by selftest_device_worker().

◆ selftest_ospi_write_pattern()

ra8_err_t selftest_ospi_write_pattern ( void )
static

Erase the OSPI window and program the deterministic pattern.

Erases k_ospi_erase_count 4 KiB sectors at k_ospi_test_offset, then programs the 1 MiB window with the selftest_pattern_fill bytes, one 4 KiB page-group per ra8_xspi_flash_program (the sector pattern packed 8-per-erase).

Returns
First failing flash op's error, or k_ra8_ok.
Return values
k_ra8_okThe window holds the deterministic pattern.
Precondition
ra8_xspi_init has succeeded for k_ospi_instance.
Single caller (the device worker, before USB attach).
Postcondition
On k_ra8_ok every window sector reads back its pattern.
Only the window region is touched; the rest of the chip is left.
Note
Blocking; ~256 sector erases (seconds). Runs once at boot.
Since
0.1.0

Definition at line 437 of file main.c.

References k_ospi_erase_count, k_ospi_erase_sector, k_ospi_instance, k_ospi_test_offset, k_ra8_ok, k_selftest_block_size, ra8_xspi_flash_erase_sector(), ra8_xspi_flash_program(), and selftest_pattern_fill().

Referenced by selftest_ospi_provision().

◆ selftest_panic_halt()

void selftest_panic_halt ( void )
static

Halt forever in WFI – panic stop on init failure.

Last-resort stop; only a debugger or reset recovers.

Precondition
Called only after a fatal error in boot.
Interrupts may be in any state.
Postcondition
CPU is parked.
No further code runs.
Note
Not reachable post-boot.
Since
0.1.0

Definition at line 645 of file main.c.

◆ selftest_route_usb_or_halt()

void selftest_route_usb_or_halt ( void )
static

Route both ports' pins: FS as device, HS as host.

FS device: P4_07 VBUS sense (PSEL), P5_00 VBUSEN held LOW as GPIO (peripheral routing would force host-style VBUSEN HIGH and block device enumeration), P8_14/P8_15 data. HS host: SW4-8 to Host via the U15 expander, PD07 HIGH (U18 supplies J7), P4_08 VBUS sense.

Precondition
IOPORT and the U15 expander are reachable.
Called once from selftest_setup_or_halt.
Postcondition
FS pins carry the device role, HS pins the host role.
PD07 is HIGH (J7 powered).
Note
Panic-halts on any routing failure.
Since
0.1.0

Definition at line 668 of file main.c.

References k_ra8_level_high, k_ra8_level_low, k_ra8_ok, k_ra8_psel_usb_fs, k_ra8_psel_usb_hs, k_selftest_pin_fs_dm, k_selftest_pin_fs_dp, k_selftest_pin_fs_vbus, k_selftest_pin_fs_vbusen, k_selftest_pin_hs_pwr, k_selftest_pin_hs_vbus, ra8_board_io_expander_set_usbhs_host_mode(), ra8_gpio_output_init(), ra8_pfs_route_peripheral(), and selftest_panic_halt().

◆ selftest_setup_or_halt()

void selftest_setup_or_halt ( void )
static

Bring CGC + both USB clocks + SysTick + SCI8 + LEDs + pins up.

USBFS needs the 48 MHz PLL2 reference before MSTPB11 is released; USBHS needs its 60 MHz UTMI PLL. SCI8 is the J-Link OB CDC console at 115200.

Precondition
Reset_Handler has finished C runtime init.
SystemInit has run.
Postcondition
Console prints work; both USB ports' pins and clocks are live.
LED1/LED2 are initialized.
Note
Panic-halts on any failure; called exactly once from main.
Since
0.1.0

Definition at line 714 of file main.c.

References k_ra8_board_led1, k_ra8_board_led2, k_ra8_clock_id_cpuclk0, k_ra8_ok, k_selftest_baud, ra8_board_led_init(), ra8_board_uart_console_init(), ra8_cgc_get_clock_hz(), ra8_cgc_init(), ra8_cgc_usbfs_clock_enable(), ra8_cgc_usbhs_pll_enable(), ra8_time_init(), selftest_panic_halt(), and selftest_route_usb_or_halt().

◆ selftest_usbx_stack_up()

UINT selftest_usbx_stack_up ( void )
static

Brings USBX system + FS device stack up.

One-shot USBX pool + device-stack initialization for the FS-only framework.

Returns
UINT UX_SUCCESS on success.
Return values
UX_SUCCESSStack ready.
Precondition
File-scope pool reserved.
Thread context.
Postcondition
Device stack accepts class registrations.
On failure, USBX state is undefined.
Note
Single-call; not idempotent.
Since
0.1.0

Definition at line 350 of file main.c.

References k_selftest_usbx_pool_bytes, s_device_framework_fs, s_language_id_framework, s_string_framework, and s_usbx_pool.

◆ SysTick_Handler()

void SysTick_Handler ( void )

Service the SysTick exception selected by the linked application.

Service one SysTick event for the core timebase.

Service one SysTick event for the core timebase.

Resolves to the weak core timebase handler unless a strong RTOS or application handler overrides it. The vector table references the selected implementation without owning its subsystem policy.

Precondition
Entered for a SysTick exception with a valid exception frame.
The selected handler's timebase or scheduler state is initialised.
Postcondition
The selected implementation has processed one SysTick event.
The vector table itself remains unchanged.
Note
Runs in handler mode; thread-safety follows the selected implementation.
Since
0.1.0

The weak firmware implementation advances the millisecond counter, then services linked ThreadX and USB hooks when their weak symbols and readiness state permit. The host-test implementation advances only the counter. An application may replace either weak definition with a strong handler.

Precondition
The handler is entered for one SysTick event or a host-test equivalent.
On target, ra8_time_init() configured the SysTick period.
Postcondition
s_tick_ms has advanced by exactly one.
Optional subsystem hooks run only when linked and ready.
Note
IRQ-safe; the weak symbol may be overridden by an application handler.
Since
0.1.0

Service the SysTick exception selected by the linked application.

The weak firmware implementation advances the millisecond counter, then services linked ThreadX and USB hooks when their weak symbols and readiness state permit. The host-test implementation advances only the counter. An application may replace either weak definition with a strong handler.

Precondition
The handler is entered for one SysTick event or a host-test equivalent.
On target, ra8_time_init() configured the SysTick period.
Postcondition
s_tick_ms has advanced by exactly one.
Optional subsystem hooks run only when linked and ready.
Note
IRQ-safe; the weak symbol may be overridden by an application handler.
Since
0.1.0

Service the SysTick exception selected by the linked application.

Precondition
Called from exception context (IPSR == 15).
_tx_initialize_low_level has programmed SysTick.
Postcondition
One ThreadX tick elapsed; PendSV may be pending.

Definition at line 97 of file main.c.

References _tx_timer_interrupt(), ra8_time_on_tick(), s_tx_kernel_up, and ux_dcd_ra8_usb_irq_reenable().

◆ tx_application_define()

VOID tx_application_define ( VOID * first_unused_memory)

ThreadX application-define hook.

Spawns both workers.

Device worker at priority 8 (above USBX class threads' default), host worker at 16 so the polled host loop can never starve the IRQ-driven device side.

Parameters
[in]first_unused_memorySentinel (unused; static stacks).
Precondition
Called from tx_kernel_enter after scheduler init.
Postcondition
Two auto-start worker threads are queued.
Note
Called once at boot; not thread-safe.
Since
0.1.0

Definition at line 598 of file main.c.

References k_selftest_dev_priority, k_selftest_host_priority, k_selftest_host_stack, k_selftest_thread_stack, s_device_stack, s_device_thread, s_device_thread_name, s_host_stack, s_host_thread, s_host_thread_name, s_tx_kernel_up, selftest_device_worker(), selftest_host_worker(), TX_AUTO_START, TX_NO_TIME_SLICE, and tx_thread_create.

Variable Documentation

◆ k_selftest_pin_fs_dm

const ra8_port_pin_t k_selftest_pin_fs_dm = (ra8_port_pin_t)k_ra8_board_usbfs_pin_dm
static

USBFS D- (P8_15).

Definition at line 121 of file main.c.

◆ k_selftest_pin_fs_dp

const ra8_port_pin_t k_selftest_pin_fs_dp = (ra8_port_pin_t)k_ra8_board_usbfs_pin_dp
static

USBFS D+ (P8_14).

Definition at line 118 of file main.c.

◆ k_selftest_pin_fs_vbus

const ra8_port_pin_t k_selftest_pin_fs_vbus = (ra8_port_pin_t)k_ra8_board_usbfs_pin_vbus
static

USBFS VBUS sense pin (P4_07, PSEL = 0x13).

Definition at line 112 of file main.c.

◆ k_selftest_pin_fs_vbusen

const ra8_port_pin_t k_selftest_pin_fs_vbusen = (ra8_port_pin_t)k_ra8_board_usbfs_pin_vbusen
static

USBFS VBUSEN (P5_00) – GPIO LOW for the device role.

Definition at line 115 of file main.c.

◆ k_selftest_pin_hs_pwr

const ra8_port_pin_t k_selftest_pin_hs_pwr = (ra8_port_pin_t)k_ra8_board_usbhs_pin_pwr
static

J7 host-power switch (PD07): HIGH = U18 supplies VBUS (UM 6.2).

Definition at line 127 of file main.c.

◆ k_selftest_pin_hs_vbus

const ra8_port_pin_t k_selftest_pin_hs_vbus = (ra8_port_pin_t)k_ra8_board_usbhs_pin_vbus
static

USBHS_VBUS sense pin (P4_08, PSEL = 0x14).

Definition at line 124 of file main.c.

◆ s_dbg_ospi_id

volatile uint32_t s_dbg_ospi_id
static

OSPI JEDEC id read at boot (IS25LX512M = 0x009D5A1A).

Definition at line 182 of file main.c.

Referenced by ospirw_ospi_provision(), and selftest_ospi_provision().

◆ s_dbg_ospi_prov

volatile uint32_t s_dbg_ospi_prov = (uint32_t)k_selftest_no_mismatch
static

OSPI provisioning result (sentinel = pending, 0 = done, else err).

Definition at line 184 of file main.c.

Referenced by ospirw_ospi_provision(), and selftest_ospi_provision().

◆ s_device_framework_fs

UCHAR s_device_framework_fs[]
static

Definition at line 193 of file main.c.

◆ s_device_stack

UCHAR s_device_stack[k_selftest_thread_stack]
static

Stack backing storage for s_device_thread.

Since
0.1.0

Definition at line 148 of file main.c.

◆ s_device_thread

TX_THREAD s_device_thread
static

ThreadX TCB for the USBX device-side worker thread.

Note
Single-writer (worker only).
Since
0.1.0

Definition at line 141 of file main.c.

◆ s_host_stack

UCHAR s_host_stack[k_selftest_host_stack]
static

Stack backing storage for s_host_thread (ra8_fs walks live here).

Since
0.1.0

Definition at line 163 of file main.c.

◆ s_host_thread

TX_THREAD s_host_thread
static

ThreadX TCB for the polled host-side worker thread.

Note
Single-writer (worker only).
Since
0.1.0

Definition at line 156 of file main.c.

◆ s_language_id_framework

UCHAR s_language_id_framework[] = {k_usb_langid_en_us_lo, k_usb_langid_en_us_hi}
static

USBX language-id table – US English.

Since
0.1.0

Definition at line 327 of file main.c.

◆ s_msc_product_id

UCHAR s_msc_product_id[] = "SELFTEST OSPI RO"
static

Definition at line 174 of file main.c.

◆ s_msc_product_rev

UCHAR s_msc_product_rev[] = "0001"
static

Definition at line 175 of file main.c.

◆ s_msc_vendor_id

UCHAR s_msc_vendor_id[] = "RA8D2 "
static

Definition at line 173 of file main.c.

◆ s_string_framework

UCHAR s_string_framework[]
static

USBX string descriptor table (vendor / product / serial).

Each entry: 2 bytes lang-id, 1 byte string index, 1 byte length, then ASCII bytes.

Since
0.1.0

Definition at line 258 of file main.c.

◆ s_tx_kernel_up

volatile bool s_tx_kernel_up = false
static

Set in tx_application_define; gates ThreadX tick delivery.

main() starts SysTick (ra8_time_init) BEFORE tx_kernel_enter, and this app's setup window is long (the U15 expander I2C transaction blocks for milliseconds), so the tick WILL fire pre-kernel. Feeding _tx_timer_interrupt into ThreadX's still-zeroed timer state walks a bogus expiration list and bus-faults (observed: IMPRECISERR HardFault from SysTick).

Since
0.1.0

Definition at line 94 of file main.c.

◆ s_usbx_pool

UCHAR s_usbx_pool[k_selftest_usbx_pool_bytes]
static

USBX memory pool (USBX uses tx_byte_pool internally).

Since
0.1.0

Definition at line 170 of file main.c.