FTDI Community
General Category => Discussion - Software => Topic started by: uTasker on July 18, 2018, 01:17:57 PM
-
Hi All
I have the following problem in the simulator and on the HW [FT800]
1: Using the following command sequence the display content is initially successfully rotated by 180°
Ft_Gpu_CoCmd_MemWrite(phost, REG_ROTATE, [b]1[/b]);
Ft_Gpu_CoCmd_Swap(phost);
2: The following however has no effect
Ft_Gpu_CoCmd_MemWrite(phost, REG_ROTATE, [b]0[/b]);
Ft_Gpu_CoCmd_Swap(phost);
and the display continues showing the image in its rotated form.
The rotate command doesn't reference any restrictions as to why the second use to set it back to 0 would not be accepted.
Does any one know what the problem is?
Regards
Mark
P.S. The
Ft_Gpu_CoCmd_MemWrite(phost, REG_ROTATE, [b]1[/b]);
alone has no effect and the
Ft_Gpu_CoCmd_Swap(phost);
is needed after it. I also don't understand how they are related.
-
Hello,
Can you try writing the REG_ROTATE register with the Ft_Gpu_Hal_Wr8() function and not via the Ft_Gpu_CoCmd_MemWrite(), and let me know how you get on?
Best Regards,
FTDI Community
-
Hi
I just tested in the simulator and it works using
Ft_Gpu_Hal_Wr8() instead of
Ft_Gpu_CoCmd_MemWrite()
I'll have to have the firmware check on the HW (I'll send it to the client right away) and will report again (although I have found the simulator very accurate so it will almost certainly be OK too).
What is the explanation for the different behavior between the two commands?
Regards
Mark
-
Hello,
Ft_Gpu_Hal_Wr8() - will immediately perform a direct SPI write to the desired register.
Ft_Gpu_CoCmd_MemWrite() - places the command into the co-processor list which the API will package into an SPI transfer.
The overheard of waiting on the API to perform the SPI write, versus manually performing the SPI write with Ft_Gpu_Hal_Wr8() is likely the cause of the issue.
Best Regards,
FTDI Community
-
Hi
I have had confirmation that the problem is resolved on the HW too.
Thanks
regards
Mark