ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
usb_selftest_ospi_rw_steps.h
Go to the documentation of this file.
1
29
30#pragma once
31
32#include <stdint.h>
33
34#include "ra8_err.h"
35
36#ifndef RA8_OFF_TARGET
37#include "tx_api.h"
38#endif
39
40/* -------------------------------------------------------------------------- */
41/* Tunables (shared by main.c and the host-side step routines) */
42/* -------------------------------------------------------------------------- */
43
60
72
77typedef enum : uint32_t {
81
103
115
139[[nodiscard]] ra8_err_t ospirw_ospi_provision(void);
140
141#ifndef RA8_OFF_TARGET
161VOID ospirw_host_worker(ULONG arg);
162#endif /* !RA8_OFF_TARGET */
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
unsigned long ULONG
ThreadX-compatible unsigned long (host stub).
ospirw_config_t
Compile-time settings: threads, pool, console, cadence.
@ k_ospirw_thread_stack
Device worker stack (bytes).
@ k_ospirw_idle_ticks
Parked-loop back-off (ticks).
@ k_ospirw_usbx_pool_bytes
USBX memory pool (bytes).
@ k_ospirw_retry_ticks
Pause between ladder retries.
@ k_ospirw_dev_priority
Device bring-up worker priority.
@ k_ospirw_baud
J-Link OB CDC log baud.
@ k_ospirw_host_priority
Host worker priority (below USBX).
@ k_ospirw_host_stack
Host worker stack (bytes).
@ k_ospirw_boot_wait_ticks
Host start delay (1 ms ticks).
@ k_ospirw_print_cap
Bound for console-string scans.
ra8_err_t ospirw_ospi_provision(void)
Bring the OSPI flash up and erase the writable window.
ospirw_mask_t
Bit-mask constants used by the text formatters.
@ k_ospirw_nibble_mask
4-bit nibble mask.
@ k_ospirw_dec_radix
Base for decimal conversion.
ospirw_phase_t
J-Link probe values marking host-ladder progress.
@ k_ospirw_phase_pass
All LUNs verified.
@ k_ospirw_phase_boot
Host thread not started.
@ k_ospirw_phase_init
ra8_usb_hmsc_init issued.
@ k_ospirw_phase_verify
Reading + checking LUNs.
@ k_ospirw_phase_enum
Enumerating.
VOID ospirw_host_worker(ULONG arg)
Host-side worker: retry the full pass until it succeeds.
ospirw_geom_t
LUN geometry + verification constants.
@ k_ospirw_burst_bytes
8 x 512 B burst buffer.
@ k_ospirw_no_mismatch
Probe: no mismatch.
@ k_ospirw_byte_mask
Byte mask.
@ k_ospirw_pat_lun_mul
Per-LUN pattern multiplier.
@ k_ospirw_target_lun0
First LUN index.
@ k_ospirw_pat_bias
Pattern constant bias.
@ k_ospirw_mismatch_lun_shift
s_dbg_mismatch: LUN in bits 31:24.
@ k_ospirw_block_size
SCSI logical block size.
@ k_ospirw_offset
2 MiB into the chip (scratch).
@ k_ospirw_instance
xSPI controller instance.
@ k_ospirw_burst_blocks
Blocks per READ(10) burst.
@ k_ospirw_count
Logical units exposed (single writable).
@ k_ospirw_sectors
512-byte sectors (OSPI window = 32 KiB).
@ k_ospirw_pat_lba_mul
Per-LBA pattern multiplier.
@ k_ospirw_erase_sector
IS25LX512M 4 KiB erase sector.
ospirw_hex_t
Hex/decimal text-formatter sizing constants.
@ k_ospirw_dec_chars_u32
Max digits for a 32-bit count.
@ k_ospirw_nibble_bits
Bits per hex nibble.
@ k_ospirw_hex_chars_u16
16-bit value -> "ABCD".
@ k_ospirw_hex_digit_split
Threshold between '0-9'/'A-F'.
@ k_ospirw_hex_chars_u32
32-bit value -> "ABCDEF01".