2022-05-27 01:04 PM
Hi
I'm struggling with a TFT Display and a Nucleo U575 board. The Display is a 320x240px Display that I want to control with a 16 bit FMC interface.
As the Display doesn't show anything, I connected my Logic analyzer to the Nucleo's FMC Pins.
Result: It seems, that the commands (8-bit) are sent correctly to the TFTs D0:D7 pins. However when I try to send data (e.g. a 16 bit color) to the display it's also just D0:D7 that turn high/low. D8:D15 are always low when data is sent and are always high wen nothing is sent.
I followed this guide by NickNagy on github. He's using a 8-bit interface. However I changed to the 16-bit command for sending data and I can't find the mistake I obviously made.
Can someone help me please? :sleepy_face:
I uploaded the code to my github
Thanks a lot in advance!
Solved! Go to Solution.
2022-05-28 06:28 AM
I'm not quite sure if I got the things you mean as I'm quite new to the Cube environment, but I hope I found the correct data 🙂 If not, please let me know...
2022-05-28 06:44 AM
Dbl-checked your gpio for control and you have them correct. At least they're same as the FMC example I've passed earlier, of which I know works flawlessly.
PD4 ------> FMC_NOE/RD
PD5 ------> FMC_NWE/WR
PD13 ------> FMC_A18/RS
PD7 ------> FMC_NE1/CS
PE2 ------> FMC_RESET
//Confirmed correct.
Really running out of ideas here. Other than perhaps the hardware side of things; those display can be naughty and requires trial & error if not documented, particularly on the pullups/pulldown of pins, some requires to be floating.
Try leaving the SDO pin floating (required on mine here). It bugs me to know that Nucleo/Code side works when scoping the lines, but not when the display is hardwired.
2022-05-28 06:57 AM
thanks for your time and effort you're putting into this! I highly appreciate it!
Sorry, I missed that. I kept SDO floating as I was instructed to by the manual. But for every other pin that I'm not using I put them to GND (in the manual it says GND or IOVCC).
I think you got me wrong here: When scoping the lines, I don't get valid data:
That's why I was wondering about the address...
2022-05-28 07:24 AM
When HAL starts misbehaving (rare mind you) I turn to registers and painfully hardcode the thing from scratch. Never done it for the FMC interface though.
I still swear by the GPIO bus sent earlier, over FMC anyway 🙂
Keep us updated about what it was. gl man
2022-05-28 07:37 AM
Oh and that 16bits gpio really starts to be half-fun on that ST7789 when this:
2022-05-28 10:31 AM
I was told that FMC is much more efficient compared to GPIO Bus. Also I plan to use FMC along with DMA to reduce the processor load even more and hence improve battery life for the final product 😉
Back to topic: I don't know what I changed - I didn't change anything at all 😅 but: I connected the logic analyzer once again to get any hint for the problem. And somehow all 16 lines work perfectly now! 😍
I then wired up the LCD again and it at least shows some weird grey pixels.
I think the missing link is the timing settings for now. I'll try and hope it won't get worse again 😉
Thanks to both of you for your help today!! I'll update the post as soon as there are news to share :)
2022-05-28 02:51 PM
Gooood news!
The screen is running now! It shows different colors and I'm even able to display a jpg image that I converted to a hex-array 😍
As I said above, I can't really tell what made the FMC work.It just worked from one second to the other.
After adjusting the timing settings, everything is displayed correctly on the LCD.
Things to do:
For everyone who's in trouble like I was: feel free to check out the Github repo. I'll continue to work on it until it works properly 🙂
Thanks again @Mecanix and @Community member for your help!