|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
OSPI-flash bring-up + write-window pre-erase for the writable-OSPI self-loop. More...
#include <stdint.h>#include "ra8_board_ek_ra8d2.h"#include "ra8_err.h"#include "ra8_xspi.h"#include "usb_selftest_ospi_rw_steps.h"Go to the source code of this file.
Functions | |
| ra8_err_t | ospirw_ospi_provision (void) |
| Bring the OSPI flash up and erase the writable window. | |
Variables | |
| static volatile uint32_t | s_dbg_ospi_prov = (uint32_t)k_ospirw_no_mismatch |
| OSPI bring-up + window pre-erase result (0 = ready, else error). | |
| static volatile uint32_t | s_dbg_ospi_id |
| OSPI JEDEC id read back at boot (sanity probe). | |
OSPI-flash bring-up + write-window pre-erase for the writable-OSPI self-loop.
The OSPI provisioning step of the usb_selftest_ospi_rw application, split out of main.c so each translation unit stays below the 1000-line file-size cap. The device-side ThreadX worker (in main.c) calls ospirw_ospi_provision once, before USB attach, to bring the onboard IS25LX512M up in 1S-1S-1S mode and erase the 32 KiB scratch window that the host's WRITE(10) data-OUT phase later programs.
The two J-Link debug probes that record this step's outcome (s_dbg_ospi_prov / s_dbg_ospi_id) live here, beside their only writer.
Definition in file usb_selftest_ospi_rw_device.c.
|
nodiscard |
Bring the OSPI flash up and erase the writable window.
Mirrors the read-only OSPI self-loop's bring-up: U15 expander courtesy write, ra8_board_xspi_pins_init (OCTA pins + RESET pulse), ra8_xspi_init 1S-1S-1S, JEDEC-id readback, then a one-shot erase of the k_ospirw_sectors window at k_ospirw_offset so the per-write path is fast program-only. The host owns the data. The body lives in usb_selftest_ospi_rw_device.c; ospirw_device_worker in main.c calls it once before USB attach.
| k_ra8_ok | OSPI is up and the write window is erased. |
| (other) | A pins / init / erase step failed. |
Definition at line 45 of file usb_selftest_ospi_rw_device.c.
References k_ospirw_block_size, k_ospirw_erase_sector, k_ospirw_instance, k_ospirw_offset, k_ospirw_sectors, k_ra8_ok, k_ra8_xspi_lio_1s1s1s, ra8_board_io_expander_set_octospi_active(), ra8_board_xspi_pins_init(), ra8_xspi_flash_erase_sector(), ra8_xspi_flash_read_id(), ra8_xspi_init(), s_dbg_ospi_id, and s_dbg_ospi_prov.
Referenced by ospirw_device_worker().
|
static |
OSPI JEDEC id read back at boot (sanity probe).
Definition at line 43 of file usb_selftest_ospi_rw_device.c.
|
static |
OSPI bring-up + window pre-erase result (0 = ready, else error).
Definition at line 41 of file usb_selftest_ospi_rw_device.c.