2020-01-16 10:16 PM
Hi Community,
I'm trying to connect STM32F412 with SPI LCD (ILI9341). And, I'm trying to run TouchGFX on this combination. The white and black color is correct. However, another colors are strange. I think that the endian is swapped. Might be, TouchGFX supports only little endian.
This ILI9341 device only support big-endian at using SPI port. If I use parallel port, it can choose both little-endian and big-endian. However, the target board supports only SPI.
So, I'd like to swap little-endian to big-endian at drawing. Where code do I need to modify?
Please give me your advice. Thank you.
Best regards,
Kotetsu
2021-12-27 02:00 PM
Thank you very much. I‘m going to check your solution.
Best regards,
K. Yama
2021-12-29 11:09 AM
SCB_CleanDCache_by_Addr((uint32_t*)(((uint32_t)buff) & ~(uint32_t)(__SCB_DCACHE_LINE_SIZE - 1U)), buff_size + __SCB_DCACHE_LINE_SIZE);
Those cache management functions have been fixed long ago and after years of ignorance even ST have updated those in firmware packages. Now that same address and size alignment is adjusted internally in the functions and therefore this is enough:
SCB_CleanDCache_by_Addr(buff, buff_size);
2021-12-29 12:07 PM
Hi Piranha, thank you very much, I was not aware of that.
The version you linked is v5.2.5, 12 oktober 2018.
Oddly, mine was coming with CubeMX, and it states
v5.1.1, 28 march 2019.
So an older version at a more recent date.
I checked the code, and it appears to be fixed too.
Thanks a lot!
Now I am learning something when trying to help others.
2021-12-29 12:14 PM
I'm trying to connect STM32F412 with SPI LCD (ILI9341. And, I'm trying to run TouchGFX on this combination.
The white and black color is correct. However, another colors are strange. I think that the endian is swapped. Might be, TouchGFX supports only little endian.
This ILI9341 device only support big-endian at using SPI port. If I use parallel port, it can choose both little-endian and big-endian. However, the target board supports only SPI.
2021-12-29 12:21 PM
Hi Piranha, thanks a lot, I didn't notice it yet.
I checked the code and although mine version that came with CubeMX is lower (5.1.1), it seems fixed. I tested and it works.