1
Discussion - EVE / Re: How often and when read REG_TOUCH_TAG
« on: April 03, 2024, 01:27:26 PM »
I'm using Riverdi EVE4 Display (RVT70HSBNWC00-B)
I just do a quick test, sending all command to command FIFO take 1ms. Including copy Bitmap to flash total time will be 14ms (fixed some problem with my code)
My define to calculate FPS
#define DispHCycle 1344L
#define DispVCycle 635L
#define DispPLCLKFREQ 0x8C1
Gpu_Hal_Wr8(host, REG_PCLK, 2);
So based on Fps = (System Clock/REG_PCLK) / (VCYCL * HCYCLE)
(72000000/2) / (1344 * 635) ~= 42FPS
Also, for the touch interrupt, how do we make sure touch interrupt not corrupt display function?
For example. My Display() take about 24ms to finished is worst case for waiting copy stuff from flash to RAM_G. If the interrupt kick in before the Display() finished. A command from display may corrupted. How we fix this problem?
Also, when touch detected, interrupt kick in. If the interrupt kick in during Display() function sending data to Command FIFIO. In most case, there will be a command corrupted because the CS line reset. From the interrupt, I can signal the Touch function to scan after Display() finished. But there can be chance when Touch scan, touch already released cause the TAG/XY is empty, scan will be no touch because we share the same SPI bus from MCU to EVE4. Unless we can read the Touch signal on difference bus (UART/I2C) directly from MCU.
I just do a quick test, sending all command to command FIFO take 1ms. Including copy Bitmap to flash total time will be 14ms (fixed some problem with my code)
My define to calculate FPS
#define DispHCycle 1344L
#define DispVCycle 635L
#define DispPLCLKFREQ 0x8C1
Gpu_Hal_Wr8(host, REG_PCLK, 2);
So based on Fps = (System Clock/REG_PCLK) / (VCYCL * HCYCLE)
(72000000/2) / (1344 * 635) ~= 42FPS
Also, for the touch interrupt, how do we make sure touch interrupt not corrupt display function?
For example. My Display() take about 24ms to finished is worst case for waiting copy stuff from flash to RAM_G. If the interrupt kick in before the Display() finished. A command from display may corrupted. How we fix this problem?
Also, when touch detected, interrupt kick in. If the interrupt kick in during Display() function sending data to Command FIFIO. In most case, there will be a command corrupted because the CS line reset. From the interrupt, I can signal the Touch function to scan after Display() finished. But there can be chance when Touch scan, touch already released cause the TAG/XY is empty, scan will be no touch because we share the same SPI bus from MCU to EVE4. Unless we can read the Touch signal on difference bus (UART/I2C) directly from MCU.