PCB Top Side Placement


Worked for 4 mins 29 sec
Thought for 12 sec
Checking PCB Placement Validation progress…
Thought for 11 sec
Reading PCB Placement Validation's report…
Thought for 13 sec — Verifying information
Getting a layout overview.
Thought for 9 sec
Completed 8 design checks — found 333 issues.
Thought for 14 sec
4/4 Run independent placement and DRC verification

Inspect board outline, stackup, footprints, and fixed constraints

Confirm top-side placement plan and edge assignments

Place all components on the top side and resolve placement violations

Run independent placement and DRC verification

Thought for 13 sec
Thought for 9 sec
Awaiting 1 background task
"PCB Placement Check" completed.
Placed all 62 components on the Top side of the unchanged 90 × 50 mm board. Independent review confirmed no body overlaps, out-of-bounds parts, edge-placement faults, or critical buck-stage findings.
Open items
  • 8 U2/U3 self-keepout false positives from each module intersecting its own antenna void.
  • 12 decoupling proximity warnings and 116 expected airwires remain.
Next steps
  1. Route the board.
  2. Optimize flagged decoupling loops during routing.
  3. Review the detailed Top-Side Placement Validation.

Firmware Starter — STM32H7A3
Scope and Source of Truth
This starter is grounded in the finished live schematic. Target: STM32H7A3V_G-I_Tx, LQFP100, STM32CubeIDE/CubeMX, STM32 HAL. It intentionally defines a clean adapter boundary for Qorvo's supported DW3xxx driver and does not invent DW3000 register writes, CIR-memory addresses, packet formats, or initialization sequences.
Toolchain
  • STM32CubeIDE with an STM32H7 HAL package supporting STM32H7A3xG.
  • Generate a CubeMX project for the exact LQFP100 device.
  • Debug/program with ST-LINK over J2 SWD.
  • Add the licensed/approved Qorvo DW3xxx driver separately. Keep vendor sources under Middlewares/Qorvo_DW3xxx/ and implement only the platform callbacks in Core/Src/dw3xxx_port.c.
Actual MCU Pin Map

Table


Function/netU1 pinHAL configurationConnected device
TX_SPI_SCKPA5SPI1_SCK AF5U2 SPICLK
TX_SPI_MISOPA6SPI1_MISO AF5U2 SPIMISO
TX_SPI_MOSIPA7SPI1_MOSI AF5U2 SPIMOSI
TX_SPI_CSNPA4GPIO output, default HIGHU2 SPICSn; external 10 kΩ pull-up
TX_UWB_IRQPC4EXTI rising-edge inputU2 GPIO8/IRQ; also J4-7
TX_UWB_RSTNPD0GPIO open-drain; release = input/high-ZU2 RSTn
TX_UWB_WAKEPD2GPIO output, default LOWU2 WAKEUP; external 100 kΩ pull-down
TX_UWB_SYNCPA0GPIO/timer function as requiredU2 GPIO0; TP4; J4-5
RX_SPI_SCKPB10SPI2_SCK AF5U3 SPICLK
RX_SPI_MISOPB14SPI2_MISO AF5U3 SPIMISO
RX_SPI_MOSIPB15SPI2_MOSI AF5U3 SPIMOSI
RX_SPI_CSNPB9GPIO output, default HIGHU3 SPICSn; external 10 kΩ pull-up
RX_UWB_IRQPC5EXTI rising-edge inputU3 GPIO8/IRQ; also J4-8
RX_UWB_RSTNPD1GPIO open-drain; release = input/high-ZU3 RSTn
RX_UWB_WAKEPD3GPIO output, default LOWU3 WAKEUP; external 100 kΩ pull-down
RX_UWB_SYNCPA1GPIO/timer function as requiredU3 GPIO0; TP5; J4-6
HOST_UART_TXPB6USART1_TX AF7J3-3
HOST_UART_RXPB7USART1_RX AF7J3-4
HOST_IRQPB8GPIO output, default LOWJ3-5
HOST_READYPB11GPIO inputJ3-6
HOST_SPI_SCKPC10SPI3_SCK AF6J3-7, optional
HOST_SPI_MISOPC11SPI3_MISO AF6J3-8, optional
HOST_SPI_MOSIPC12SPI3_MOSI AF6J3-9, optional
HOST_SPI_CSNPA15GPIO/alternate NSS as selectedJ3-10, optional
DEBUG_UART_TXPD8USART3_TX AF7J4-3
DEBUG_UART_RXPD9USART3_RX AF7J4-4
STATUS_LED_DRVPE3GPIO outputR11/LED2; active level must be confirmed on assembled board
3V3_PGnoneNot connected to U1U4 PG is exposed only at J4-10
SWDIOPA13SWDJ2-2
SWCLKPA14SWDJ2-4
SWOPB3TRACE_SWOJ2-6
MCU_NRSTNRSThardware resetJ2-10, J4-9, TP6, SW1
MCU_BOOT0BOOT0hardware boot strap10 kΩ pull-down; SW2 raises to 3V3
HSE_IN/HSE_OUTPH0/PH1RCC HSE crystalY1 STDCRA3-8M, C19/C20 10 pF
Connector Maps
  • J3 host: 1=3V3, 2=GND, 3=HOST_UART_TX, 4=HOST_UART_RX, 5=HOST_IRQ, 6=HOST_READY, 7=HOST_SPI_SCK, 8=HOST_SPI_MISO, 9=HOST_SPI_MOSI, 10=HOST_SPI_CSN.
  • J4 debug/test: 1=3V3, 2=GND, 3=DEBUG_UART_TX, 4=DEBUG_UART_RX, 5=TX_UWB_SYNC, 6=RX_UWB_SYNC, 7=TX_UWB_IRQ, 8=RX_UWB_IRQ, 9=MCU_NRST, 10=3V3_PG.
  • J2 SWD: 1=3V3 reference, 2=SWDIO, 3=GND, 4=SWCLK, 5=GND, 6=SWO, 7/8=NC, 9=GND, 10=NRST.
CubeMX Configuration
  1. RCC: crystal/ceramic resonator on PH0/PH1. Y1 is 8 MHz. Configure the PLL within STM32H7A3 datasheet limits; do not copy an H743 clock tree blindly.
  2. Enable ICACHE and DCACHE only after DMA buffer placement/cache coherency is designed. For first bring-up, non-cacheable DMA buffers or explicit clean/invalidate operations are required.
  3. SPI1 and SPI2: master, full duplex, software NSS. Start at a conservative prescaler; increase only within DWM3000 timing limits documented by Qorvo.
  4. Enable DMA for SPI2 RX/TX for CIR transfers. SPI1 DMA is optional.
  5. USART1: asynchronous host link. A practical baseline is 115200 8-N-1; both endpoints must agree.
  6. USART3: asynchronous debug console, initially 115200 8-N-1.
  7. SPI3 optional: master or slave must be agreed with ESP32-S3 firmware. Keep disabled until the baseline UART path passes.
  8. EXTI on PC4 and PC5. Give radio IRQ handling higher priority than host reporting but lower priority than critical fault handlers.
  9. GPIO startup levels: both CS HIGH, WAKE LOW, HOST_IRQ LOW. Configure reset pins safely as described below.
Reset Control Requirement
DWM3000 RSTn must not be driven push-pull high. Use an open-drain low pulse and then release the line to high impedance.

C


static void uwb_reset_assert(GPIO_TypeDef *port, uint16_t pin)
{
    GPIO_InitTypeDef g = {0};
    HAL_GPIO_WritePin(port, pin, GPIO_PIN_RESET);
    g.Pin = pin;
    g.Mode = GPIO_MODE_OUTPUT_OD;
    g.Pull = GPIO_NOPULL;
    g.Speed = GPIO_SPEED_FREQ_LOW;
    HAL_GPIO_Init(port, &g);
}

static void uwb_reset_release(GPIO_TypeDef *port, uint16_t pin)
{
    GPIO_InitTypeDef g = {0};
    g.Pin = pin;
    g.Mode = GPIO_MODE_INPUT;       /* high-Z release; never force high */
    g.Pull = GPIO_NOPULL;
    HAL_GPIO_Init(port, &g);
}
Suggested Source Tree

Text


Core/Inc/app_config.h
Core/Inc/uwb_radio.h
Core/Inc/radar_pipeline.h
Core/Inc/host_protocol.h
Core/Src/main.c
Core/Src/uwb_radio.c
Core/Src/dw3xxx_port.c
Core/Src/radar_pipeline.c
Core/Src/host_protocol.c
Middlewares/Qorvo_DW3xxx/   # vendor-supported driver, not generated here
Qorvo Driver Integration Boundary
The application uses only these abstract operations. Implement them by calling documented functions from the selected Qorvo driver release.

C


typedef enum { RADIO_TX = 0, RADIO_RX = 1 } radio_id_t;
typedef struct {
    SPI_HandleTypeDef *spi;
    GPIO_TypeDef *cs_port; uint16_t cs_pin;
    GPIO_TypeDef *rst_port; uint16_t rst_pin;
    GPIO_TypeDef *wake_port; uint16_t wake_pin;
} uwb_bus_t;

bool qdw_platform_init(radio_id_t id, const uwb_bus_t *bus);
bool qdw_probe_device(radio_id_t id);                  /* vendor API identity check */
bool qdw_configure_channel5(radio_id_t id);            /* documented vendor config */
bool qdw_start_tx_probe(radio_id_t id, uint32_t sequence);
bool qdw_arm_rx(radio_id_t id);
bool qdw_irq_service(radio_id_t id, uint32_t *events);
bool qdw_read_packet_metadata(radio_id_t id, void *dst, size_t len);
bool qdw_read_cir_window(radio_id_t id, int32_t *iq_interleaved,
                         size_t complex_samples);
dw3xxx_port.c owns CS assertion/deassertion, HAL SPI/DMA transfers, reset/wake timing hooks, critical sections, and delays. The vendor driver owns all device register definitions and documented initialization/configuration sequences.
HAL Initialization Structure
CubeMX generates the detailed MSP code. Keep application order cohesive:

C


int main(void)
{
    HAL_Init();
    SystemClock_Config();
    MX_GPIO_Init();              /* CS high, WAKE low, HOST_IRQ low */
    MX_DMA_Init();
    MX_SPI1_Init();
    MX_SPI2_Init();
    MX_USART1_UART_Init();
    MX_USART3_UART_Init();
    /* MX_SPI3_Init(); optional, enable only when host contract is fixed */

    radar_pipeline_init();
    app_radios_init();

    for (;;) {
        app_service_radio_events();
        radar_pipeline_process_ready_frames();
        host_service_tx();
        host_service_rx();
        app_watchdog_service();
    }
}
IRQ and DMA Pattern
EXTI handlers must be short. Set flags and service the Qorvo driver in thread/main context unless the selected driver explicitly supports ISR calls.

C


static volatile bool tx_irq_pending, rx_irq_pending;

void HAL_GPIO_EXTI_Callback(uint16_t pin)
{
    if (pin == TX_UWB_IRQ_Pin) tx_irq_pending = true;
    if (pin == RX_UWB_IRQ_Pin) rx_irq_pending = true;
}

void app_service_radio_events(void)
{
    uint32_t events;
    if (tx_irq_pending) {
        tx_irq_pending = false;
        if (!qdw_irq_service(RADIO_TX, &events)) fault_set(FAULT_TX_RADIO);
    }
    if (rx_irq_pending) {
        rx_irq_pending = false;
        if (!qdw_irq_service(RADIO_RX, &events)) fault_set(FAULT_RX_RADIO);
        /* On a documented RX-good/packet event, queue metadata + CIR read. */
    }
}
Frame and Processing Pipeline Skeleton
No device-specific accumulator address or undocumented read command is embedded here. qdw_read_cir_window() is implemented against the chosen Qorvo API.

C


#define CIR_BINS       256u
#define AVG_FRAMES      16u
#define BG_ALPHA_Q15   512u   /* provisional algorithm parameter; tune experimentally */

typedef struct {
    uint32_t sequence;
    uint32_t timestamp_us;
    int32_t iq[2u * CIR_BINS];
} cir_frame_t;

typedef struct {
    int64_t sum_i[CIR_BINS], sum_q[CIR_BINS];
    int32_t background[CIR_BINS];
    uint16_t count;
} radar_state_t;

static radar_state_t radar;

bool capture_packet_cir(uint32_t seq, cir_frame_t *f)
{
    f->sequence = seq;
    f->timestamp_us = app_time_us();
    return qdw_read_packet_metadata(RADIO_RX, &f->sequence, sizeof(f->sequence)) &&
           qdw_read_cir_window(RADIO_RX, f->iq, CIR_BINS);
}

void radar_accumulate(const cir_frame_t *f)
{
    for (size_t k = 0; k < CIR_BINS; ++k) {
        radar.sum_i[k] += f->iq[2u*k];
        radar.sum_q[k] += f->iq[2u*k + 1u];
    }
    radar.count++;
}

typedef struct {
    uint32_t sequence;
    uint32_t timestamp_us;
    uint16_t dominant_bin;
    uint16_t confidence_q15;
    uint32_t motion_energy;
    uint32_t fault_flags;
} processed_result_t;

bool radar_finish_average(uint32_t seq, uint32_t ts, processed_result_t *out)
{
    if (radar.count < AVG_FRAMES) return false;
    uint64_t best = 0, total = 0;
    uint16_t best_bin = 0;
    for (size_t k = 0; k < CIR_BINS; ++k) {
        int32_t ai = (int32_t)(radar.sum_i[k] / radar.count);
        int32_t aq = (int32_t)(radar.sum_q[k] / radar.count);
        uint32_t mag = (uint32_t)((int64_t)ai*ai + (int64_t)aq*aq);
        int32_t residual = (int32_t)mag - radar.background[k];
        uint32_t energy = (uint32_t)(residual < 0 ? -residual : residual);
        radar.background[k] += (int32_t)(((int64_t)BG_ALPHA_Q15 * residual) >> 15);
        total += energy;
        if (energy > best) { best = energy; best_bin = (uint16_t)k; }
        radar.sum_i[k] = radar.sum_q[k] = 0;
    }
    radar.count = 0;
    out->sequence = seq;
    out->timestamp_us = ts;
    out->dominant_bin = best_bin;
    out->motion_energy = (uint32_t)(total > UINT32_MAX ? UINT32_MAX : total);
    out->confidence_q15 = total ? (uint16_t)((best << 15) / total) : 0;
    out->fault_flags = fault_get();
    return true;
}
The numeric processing constants are software starting points, not radio-register settings. Validate bin count, fixed-point scaling, accumulator format, timestamp association, and thresholding against the documented Qorvo driver and measured data.
Processed Host Result Message
Use a versioned binary frame on USART1. Multi-byte fields should be explicitly little-endian and protected with a selected CRC implementation.

C


#define RESULT_MAGIC 0x5257u /* 'WR' little-endian on wire */
typedef struct __attribute__((packed)) {
    uint16_t magic;
    uint8_t version;
    uint8_t length;
    processed_result_t result;
    uint16_t crc16;
} host_result_frame_t;
The ESP32-S3 interface contract must define CRC polynomial, framing/escaping, timeout, baud rate, HOST_READY polarity, and HOST_IRQ behavior before production firmware is frozen.
Startup Sequence
  1. HAL, clocks, GPIO safe states, DMA, SPI, UART.
  2. Hold each radio reset low separately, then release high-Z per documented timing.
  3. Initialize/probe U2 over SPI1; report its identity over debug UART.
  4. Initialize/probe U3 over SPI2 independently.
  5. Apply documented channel-5 configuration through Qorvo's driver.
  6. Verify IRQ idle states and clear documented pending events.
  7. Start RX, issue sequenced TX probes, associate RX packet metadata with CIR reads.
  8. Accumulate frames, update background only when allowed by the experiment state, generate processed results, and send over USART1.
Boot and Recovery
  • Normal boot: BOOT0 is held low by R4.
  • ROM bootloader: hold SW2 while resetting with SW1 or NRST.
  • SW1, TP6, J2-10, and J4-9 share MCU_NRST.
  • If either radio fails, keep its CS high, WAKE low, reset safely, report a fault, and permit independent testing of the other radio.
Open Firmware Items
  • Obtain and pin the exact Qorvo DW3xxx driver/API release and license.
  • Confirm documented DWM3000 SPI maximum/startup clock requirements and reset/wake delays.
  • Define channel-5 PHY parameters, legal operating mode, packet format, preamble, cadence, and transmit duty cycle for the test jurisdiction.
  • Define CIR window size/location and accumulator sample representation strictly from Qorvo documentation.
  • Choose USART1 baud rate and finalize ESP32-S3 framing/CRC/handshake polarity.
  • Decide DMA/cache strategy and memory sections after measured CIR frame size and cadence are fixed.
  • Power-good is not connected to U1; firmware cannot read it without a schematic revision or external fixture on J4-10.
  • Scope and Source of Truth

  • Toolchain

  • Actual MCU Pin Map

  • Connector Maps

  • CubeMX Configuration

  • Reset Control Requirement

  • Suggested Source Tree

  • Qorvo Driver Integration Boundary

  • HAL Initialization Structure

  • IRQ and DMA Pattern

  • Frame and Processing Pipeline Skeleton

  • Processed Host Result Message

  • Startup Sequence

  • Boot and Recovery

  • Open Firmware Items