I am modifying one of my projects to be able to handle two different types of displays (a character display and a graphical display). After doing some research, I've decided on two acceptable displays that both use an SPI interface. The character display uses a simple legacy SPI interface and the graphical display can use a Quad SPI interface. I've spent some time the last few days getting familiar with the AXI Quad SPI IP block and implementing it into my project. It certainly seems useful and already pretty mature and can obviously handle both SPI interface types I need. This is a baremetal app from a Vivado/Vitis perspective.
On to my question... Interacting with the Quad SPI IP block is pretty straightforward. However, the displays expect some delays (usually in the 1-5ms range) depending on whether I'm writing data or commands to the displays. So I figure I've got a few options...
PS side (it doesn't seem Vitis/bsp files have a delay or sleep function)...
Create a crude delay function in Vitis with a C for loop. This always seems hokie and blocks other processing tasks so I really don't want to go this route.
Use a timer and interrupts. Good option as it can be tightly controlled and doesn't block other processing tasks but is a bit more complicated.
PL side (I don't want to do anything crazy like create a new custom AXI Quad SPI IP with delays as this seems really wasteful)...
Use an AXI timer - I haven't used this IP so just another thing to learn and integrate into the Vitis app
Use a Fixed Interval Timer IP block - I haven't used this IP so just another thing to learn and integrate into the Vitis app
For the PL items mentioned, I'm not sure they provide any real benefit (or code complexity improvement) over just interacting with PS timers. Anyway - just wondering if anyone had comments.
Question
engrpetero
I am modifying one of my projects to be able to handle two different types of displays (a character display and a graphical display). After doing some research, I've decided on two acceptable displays that both use an SPI interface. The character display uses a simple legacy SPI interface and the graphical display can use a Quad SPI interface. I've spent some time the last few days getting familiar with the AXI Quad SPI IP block and implementing it into my project. It certainly seems useful and already pretty mature and can obviously handle both SPI interface types I need. This is a baremetal app from a Vivado/Vitis perspective.
On to my question... Interacting with the Quad SPI IP block is pretty straightforward. However, the displays expect some delays (usually in the 1-5ms range) depending on whether I'm writing data or commands to the displays. So I figure I've got a few options...
PS side (it doesn't seem Vitis/bsp files have a delay or sleep function)...
PL side (I don't want to do anything crazy like create a new custom AXI Quad SPI IP with delays as this seems really wasteful)...
For the PL items mentioned, I'm not sure they provide any real benefit (or code complexity improvement) over just interacting with PS timers. Anyway - just wondering if anyone had comments.
Link to comment
Share on other sites
20 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now