I wrote some ST7789 screen driver Rust code which just takes bytes from memory and flushes them into the screen. It seems to work but somehow the screen turns completely white less than one second after the memory write operation. This used to work fine, so I was wondering if maybe some other driver was interfering with the SPI, but nope, I disabled everything else and it still does that. I wrote a small test program which uses a different library to speak to the ST, and it works just fine. I am probably doing something wrong somewhere, BUT THEN WHY WAS IT WORKING OK BEFORE? I suspect some weird timing issues. Or maybe my driver code is being optimized by the compiler somehow, and things are not being done in the correct order?
I will probably plug in a logic analyzer tomorrow, but if anyone has any tips on how to debug it...