From e39ab749490051c535b0cea84b1925aef6cd6a1a Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Mon, 2 Oct 2023 12:36:04 +0200 Subject: [PATCH] fix(core): adjust T2B1 display SPI baudrate [no changelog] --- core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c b/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c index 4b56d6199b..7de21fd0e1 100644 --- a/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c +++ b/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c @@ -141,7 +141,8 @@ static inline void spi_send(const uint8_t *data, int len) { void display_handle_init(void) { spi_handle.Instance = OLED_SPI; - spi_handle.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_8; + spi_handle.State = HAL_SPI_STATE_RESET; + spi_handle.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_16; spi_handle.Init.Direction = SPI_DIRECTION_2LINES; spi_handle.Init.CLKPhase = SPI_PHASE_1EDGE; spi_handle.Init.CLKPolarity = SPI_POLARITY_LOW; @@ -241,7 +242,10 @@ void display_init(void) { display_refresh(); } -void display_reinit(void) { display_handle_init(); } +void display_reinit(void) { + display_handle_init(); + HAL_SPI_Init(&spi_handle); +} static inline uint8_t reverse_byte(uint8_t b) { b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;