In the u8g_com_stm32duino_hw_spi_fn() function in u8g_com_stm32duino_hw_spi.cpp the SPISettings is initialized with SPI_CLOCK_DIV2 instead of a clock speed:
// Compatibility with sketches designed for AVR @ 16 MHz could not
// be ensured as SPI frequency depends of system clock configuration.
// user have to use appropriate divider for the SPI clock
// This function should not be used in new project.
// Use SPISettings with SPI.beginTransaction() to configure SPI parameters.
#define SPI_CLOCK_DIV2 2
#define SPI_CLOCK_DIV4 4
#define SPI_CLOCK_DIV8 8
#define SPI_CLOCK_DIV16 16
#define SPI_CLOCK_DIV32 32
#define SPI_CLOCK_DIV64 64
#define SPI_CLOCK_DIV128 128
in the core. The SPI_CLOCK_x constant was intended to be used with the obsolete SPI.setClockDivider(divider) function.
I'm not 100% sure but I think the SPISettings should be initialized with a speed of 2500000 (works fine with the FYSETC MINI 12864).
In the
u8g_com_stm32duino_hw_spi_fn()
function inu8g_com_stm32duino_hw_spi.cpp
the SPISettings is initialized withSPI_CLOCK_DIV2
instead of a clock speed:SPI_CLOCK_DIV2 is defined as:
in the core. The
SPI_CLOCK_x
constant was intended to be used with the obsoleteSPI.setClockDivider(divider)
function.I'm not 100% sure but I think the
SPISettings
should be initialized with a speed of 2500000 (works fine with the FYSETC MINI 12864).