2021-08-28 02:57 PM
I am communicating via SPI to the onboard gyroscope, collecting data and then printing it out to the onboard LCD using the ILI9341 controller also with SPI included on the board. The lcd however has some very odd behavior. When communicating with it using SPI to display pixels on the screen it whites out if I send too many things at once. Sending the sleep out followed by display on commands fixes this, which tells me its forcefully going into sleep mode. It does not reset the screen however and whatever pixels I was displaying previous to the sleep mode are still there. I tried adding small HAL_Delays where needed, like for example adding it between each pixel setting is far too slow, so when printing out a whole character I add a small delay and that seems to fix it, though I feel like this is just some bandage and its not actually addressing the overarching issue.
Also on program start I fill the entire screen black (0xFFFF) and adding a delay to this to stop the sleeping makes it EXTREMELY slow. One interesting thing to note is that if I do decide to go without delays and just force the screen to exit sleep mode as previously mentioned, certain rows/patterns of pixels may not get printed out, so an entire row of pixels would just not have the desired color. I use a simple nested loop to print out the entire area of the screen. With a delay however, even though it is MUCH slower none of the pixels are missed in the printing process. I've thought about what it could; possibly its an SPI issue, or voltage though I haven't changed any of the voltage settings on the controller and my SPI is already tuned down for my gyroscope as is. If anyone may have an idea as of to what might be going wrong, I would appreciate it.