This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Do multiple SPI transactions with PPI and timer

I have a serial OLED LCD on my SPI bus on my nrf52840
I want to do periodic LCD refresh by sending it's frame buffer without involving CPU.

I already know how to do SPI transaction with PPI. But this is a slightly different. 

Below are the steps involved in refreshing the frame buffer to LCD.

-clear DC pin (LCD command mode)
-clear CS pin
-send SPI transaction for row / column / frame size configuration ( 9 bytes)
-set CS pin
-set DC pin (LCD data mode)
-clear CS pin
-send SPI transaction for full frame buffer ( 8192 bytes )
-set CS pin

Can some one please explain me how can I do this with timer/compare and PPI. So far I know how to do single SPI transaction with PPI but this involves two SPI transactions and two GPIO toggle

Parents Reply
  • No, not only the buffer length, changing the content that is sent by SPI requires cpu input. Assuming you are refreshing the display periodically you might be able to do this inbetween the ppi events. But it would create a race condition in case updating the buffer content is mandatory. As an option you could give the cpu highest priority for updating this. But I guess there is a good reason why you would like to do this using PPI, such as running the SD or similar?

Children
No Data
Related