Skip to content

Fix SPI initialization for libopencm3 update#268

Merged
kanflo merged 1 commit intokanflo:masterfrom
avion23:fix-spi-init-libopencm3
Feb 14, 2026
Merged

Fix SPI initialization for libopencm3 update#268
kanflo merged 1 commit intokanflo:masterfrom
avion23:fix-spi-init-libopencm3

Conversation

@avion23
Copy link
Contributor

@avion23 avion23 commented Jun 29, 2025

Summary

Fixes black screen issue caused by commit c52ebac which updated libopencm3 and changed SPI reset method.

Root Cause

Commit c52ebac replaced spi_reset(SPI2) with rcc_periph_reset_pulse(RST_SPI2) during libopencm3 update. However, rcc_periph_reset_pulse() in newer libopencm3 doesn't properly complete the reset sequence, leaving SPI peripheral in undefined state and causing ILI9163C display controller initialization to fail.

Fix

Replace rcc_periph_reset_pulse(RST_SPI2) with explicit two-step reset:

  • rcc_periph_reset_hold(RST_SPI2) - Assert reset
  • rcc_periph_reset_release(RST_SPI2) - Release reset

This ensures proper reset timing and restores display functionality.

Testing

  • Tested on DPS5015 hardware with Black Magic Probe
  • Display now functions correctly after firmware flash
  • No other functionality affected

AI slop, but I tested it

Replace rcc_periph_reset_pulse() with explicit hold/release sequence
to restore display functionality after libopencm3 update.

Fixes black screen issue on DPS5015 after recent libopencm3 changes.
@kanflo kanflo merged commit e53f2a8 into kanflo:master Feb 14, 2026
@kanflo
Copy link
Owner

kanflo commented Feb 14, 2026

Thanks! (and sorry for the delay)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants