I am trying to interface a OLED LCD using spi but for some reason, the lcd is updated very slowly. I checked the spi clock its close to 166 Khz but it should be 36 Mhz.
I have used mx cube for generating clock code. I am attaching the main and LCD files below.