From b764c82e216b394fedc01b3e09520debc537f86c Mon Sep 17 00:00:00 2001 From: Ralf Waldukat Date: Sun, 29 Jun 2025 14:25:17 +0200 Subject: [PATCH] Fix SPI initialization for libopencm3 update 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. --- opendps/spi_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opendps/spi_driver.c b/opendps/spi_driver.c index 5024230..1972f5b 100644 --- a/opendps/spi_driver.c +++ b/opendps/spi_driver.c @@ -53,7 +53,8 @@ void spi_init(void) rcc_periph_clock_enable(RCC_SPI2); rcc_periph_clock_enable(RCC_DMA1); - rcc_periph_reset_pulse(RST_SPI2); + rcc_periph_reset_hold(RST_SPI2); + rcc_periph_reset_release(RST_SPI2); SPI2_I2SCFGR = 0; spi_init_master(SPI2, SPI_CR1_BAUDRATE_FPCLK_DIV_2, SPI_CR1_CPOL_CLK_TO_1_WHEN_IDLE, SPI_CR1_CPHA_CLK_TRANSITION_2, SPI_CR1_DFF_8BIT, SPI_CR1_MSBFIRST);