STM32H725 FMC write to 8080 (ILI9806) LCD Issue (Tri-state)
- June 6, 2021
- 3 replies
- 3268 views
Hello,
I'm using an STM32H725IGK6 and I'm having issues with using the FMC driving 16 bits of data to an 8080 type interface LCD. Setup is shown in photos below. I'm using the FMC with 'FMC bank mapping' in MX set to 'NOR/PSRAM bank and SDRAM bank1/bank2 are swapped' because when using address 0x60000000(not swapped) to write out data, I get 4 writes for every write.(very strange). So I've been using FMC address 0xC0000000 instead because for every write, I get 1 write.
The issue: When a write a command is sent to the FMC controller, the FMC controller at first writes the correct value for a specified data bit, but before the Write bit (rises) to latch the data bit, the FMC controller (I'm assuming) goes into tri-state mode for the data pin(DB1 shown in yellow on oscilloscope) and the signal goes to a level that the LCD holds it at. See photos below.
Note: I have made sure that read pin, chip select pin, command/address pin, reset pin are working as they should.
Debugging mode:
I initiate a write command. Figure 1, I get the write value expected. (magenta=write bit, yellow=databit1).
Then I step into the next command, Figure 2, (should look same as Figure 1) but I get a tri-state level (LCD's level)
Spent a week trying to get this LCD to work.... :grinning_face_with_sweat:
Also when using address space 0x60000000, even though I get 4 writes for every 1 write command, I still have this same issue.
Notes: when LCD is not connected, I get the right value because nothing is pulling the line to some level.... I'm not 100% sure this is caused by the LCD or not. I have tried more than 1 LCD.
Basically from my perspective, it appears that the FMC controller is somehow going into tri-state mode when is shouldn't be.
In the code photo, for the command you will see ST7789H2_writeReg, but really this is for the ILI9806. (copied code and modified it for the ILI9806 and was lazy to change these names)
I have tried this with FIFO mode Enabled/Disabled → same issues
I have played with many other parameters, clock rate, setup/hold times, etc.
Any comments or things to try would be greatly appreciated. Thanks for reading! 8)
Let me know if you need more information ; something not clear to you
Kevin