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 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 :smiling_face_with_heart_eyes:
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!
2022-05-27 04:40 PM
2022-05-27 04:48 PM
2022-05-28 01:43 AM
Have you set FMC to non-multiplexed 16-bit mode? Have you set properly GPIO for D9-D15? Read out and check/post content of FMC and GPIO registers.
JW
2022-05-28 02:40 AM
Hi Mecanix
Thanks for sharing your code! I checked it and the only difference in the code that I can see is that you're handling the writedata() and writecommand() functions slightly different to my approach.
I just ported your project to my Nucleo board and I can see a very clean output on my logic analyzer on all 16 data lines. However when wiring up my display I don't get to see anything...
I also used your way of handling the writedata() and writecommand() in my original project but I still get the same output. commands are sent on lines D0:D7 but not with the correct values. Also when sending data with 16 bit length only lines D0:D7 are oscilating high/low. Lines D8:D15 are always low when sending data.
Is the address I used wrong? I'm using 0x6000 0000 for commands - using Bank1 (0x60) NOR/PSRAM 1 (00) with A18 and 16 bits (0000?!)
2022-05-28 02:53 AM
Thanks for your input!
I can't decide between multiplexed or non-multiplexed mode. I just chose LCD interface, CS = NE1, LCD Register Select = A18 and 16 bits Data width.
All FMC pins (D0-D15 as well as NOE, NE1, NWE,...) are set with:
FMC Settings:
For the FMC_Reset Pin I chose PE2 with
2022-05-28 05:09 AM
//FMC Write addresses (16bits)
//A18
#define ST7789_REG *(__IO uint16_t *)(((uint32_t)0x60000000))
#define ST7789_RAM *(__IO uint16_t *)(((uint32_t)0x60000000) + (1 << (18+1)))
2022-05-28 05:37 AM
"...However when wiring up my display I don't get to see anything".
Interesting, let's see that display/hardware. You probably just forgot to set the TFT's interface to 16bits and the thing pulls it down, dunno. For example: one I'm using here requires IM0/1/2 inputs to be LOW for 16-bits. You have the pinout of your display and it's interfacing modes (datasheet) so we can have a look?
2022-05-28 05:58 AM
> I can't decide between multiplexed or non-multiplexed mode.
It depends on the actual hardware. Unless you have an address latch (which you probably don't have, otherwise you would have known), you use non-multiplexed mode.
Read out and check/post content of FMC and GPIO registers.
JW
2022-05-28 06:11 AM
I used your formular for the address so I'm with 0x60000000 for commands and (0x60000000 + (1 << 19)) for data transfer
I'm having the same IM0-IM2 settings as your screen. I'm connecting all 3 ports to GND. Also I'm connecting DB9 and DB0 to GND as well as all other not used pins (such as SPI-pins for example.
I'm wiring DB17:DB10(LCD) to DB15:DB8(STM32) and DB8:DB1(LCD) to DB7:DB1(STM32). That should be correct I think.
I really think that the problem is on the Nucleo/Code side as I'm not getting any valid output for the Data lines when sending the data for each pixel...