2025-06-08 7:18 PM
Hi, good morning to all. I'm in the process to design an application based on STM32U5G9ZJT6Q. My first question, please, is: is it possible to have this STM32 drive three different displays, and possibly have TouchGFX manage the whole three ?
In my case I've:
Would this work ?
Furthermore, second question, sorry: if I utilize MOSI and SCK dedicated pins on the STM32 (on SPI1 for example), can I utilize the other SPI1's pins of the same interface for other 'generic' applications (MISO, RDY, NSS pins, which I don't plan to utilize for SPI interface) ?.
Thank you so much in advance !
Cheers, a good day
Matteo
Solved! Go to Solution.
2025-06-09 3:47 PM
I've done that.
Driving a WS2812B RGB LED needs only MOSI, but SPI won't work without SCK.
Some LED displays using SPI cannot be read, so select MASTER TRANSMIT only mode on the SPI interface. The MISO pin is not used. As far as the NSS pin is concerned, there are devices that need the NSS pin constantly down. I haven't seen a HAL driver that doesn't release the NSS pin at unpleasant intervals. The displays need CS down, transmit control sequence, set A0 high, transmit data, set CS high. You need to rewrite the interface to the driver to ignore NSS (don't let the driver do it), and control it in a slightly higher level driver. If you use an operating system, this level is a good place to put in a decent semaphore to protect the display. Another thing to do is to allow your driver to change clock speeds to accommodate different reading and writing speeds for different chips.
So the answer is yes, those other pins are free to be used creatively.
2025-06-08 9:44 PM - edited 2025-06-08 9:48 PM
Simple reply is yes , but generator dont provide code for you. Only one TGFX. Maybe you can generate two or three separate projects and join with copy TGFX folders to master... rename som func and run 3 GUI tasks. Simpler will use TGFX for big and LVGL for 2 round...
Next your Q is unclean yes unused pins or alternative is free to use, but SPI1 is only one. (For use MISO as GPIO SPI need config as transmit only etc.)
2025-06-09 3:31 AM
Thanks for the confirmation that it's possible to achieve the architecture I'm foreseeing. Your hint on the one only TGFX is well noted as well.
On my last question, I realize it's not maybe so clear. So let me be more precise on this. Here is how I plan to assign pins:
As you see, the other pins from the SPI3 and SPI1 (MISO, RDY, NSS) are not utilized. My question is: are those unused pins (SPI3-MISO, SPI3-RDY, etc....) available for other different I/O applications, (relay driving, etc...), or the fact that I 'enabled' SPI1 and SPI3 is forcing those SPI3-MISO, SPI3-RDY, ... pins to be dedicated to the SPI application only ?
Thank you very much again !
2025-06-09 4:11 AM
If you create in MX simple check on GPIO part for peripheral how pins is used, other is free ta any purpose.
2025-06-09 3:47 PM
I've done that.
Driving a WS2812B RGB LED needs only MOSI, but SPI won't work without SCK.
Some LED displays using SPI cannot be read, so select MASTER TRANSMIT only mode on the SPI interface. The MISO pin is not used. As far as the NSS pin is concerned, there are devices that need the NSS pin constantly down. I haven't seen a HAL driver that doesn't release the NSS pin at unpleasant intervals. The displays need CS down, transmit control sequence, set A0 high, transmit data, set CS high. You need to rewrite the interface to the driver to ignore NSS (don't let the driver do it), and control it in a slightly higher level driver. If you use an operating system, this level is a good place to put in a decent semaphore to protect the display. Another thing to do is to allow your driver to change clock speeds to accommodate different reading and writing speeds for different chips.
So the answer is yes, those other pins are free to be used creatively.
2025-06-09 8:11 PM
Thank you very much ! very clear and informative. Cheers