2021-06-05 10:41 PM
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
2021-06-06 03:26 PM
> I get 4 writes for every 1 write command, I still have this same issue
That's how AXI writes into areas tagged Normal in MPU. Search here, it's been discussed several times.
> Notes: when LCD is not connected, I get the right value because nothing is pulling the line to some level....
Are you talking about the data lines?
When *writing*, the LCD controller shouldn't be pulling data either, so you might have connected the read signal instead of write...?
JW
2021-06-06 07:44 PM
JW,
Thank you for your reply. 1) Thanks for this info. 2) Yes I'm talking about data lines. 3) Double checked design and LCD pinout for correct connections. (I was hoping this was the problem) :(
Kevin
2021-06-06 08:44 PM
Try to bit-bang the write i.e. don't use FMC, set given lines to GPIO out and manipulate them "manually".
JW
2021-06-06 09:01 PM
Good Idea, guess I have no option but to go down that path. :grinning_face_with_sweat:
2021-06-07 09:24 PM
After bit banging. I got the LCD to work. I did find a short between 2 data pins. This may have been the problem all along. Then I put the FMC back in the code and it works!