Skip to main content
Freedom_Neo
Senior
February 15, 2022
Question

Touchscreen doesn't work when external RAM is enabled.

  • February 15, 2022
  • 2 replies
  • 1730 views

I am using below development tools

MCU: STM32H7B3IIT6

IDE: STM32CubeIDE Version: 1.8.0

GUI: TouchGFX Version: 4.18.1

External RAM: IS45S16800F-7CTLA1

When external RAM is activated, the touch part doesn't work. To be sure, I activated external RAM on the development board(STM32H7B3I-DK). I tryed development board(STM32H7B3I-DK) it work with external RAM. But it doesn't work on custom board. Why is the touch part not working?

Why does adding RAM affect the touch part?

I checked hardware, clock is normal, pins goes true place. 

I see the RAM has been added.

0693W00000JPtsEQAT.png 

I add below codes my main.c file

static FMC_SDRAM_CommandTypeDef Command;
 
 Command.CommandMode = FMC_SDRAM_CMD_CLK_ENABLE;
 Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK2;
 Command.AutoRefreshNumber = 1;
 Command.ModeRegisterDefinition = 0;
 HAL_SDRAM_SendCommand(&hsdram2, &Command, 0xfff);
 
 HAL_Delay(1);
 
 Command.CommandMode = FMC_SDRAM_CMD_PALL;
 HAL_SDRAM_SendCommand(&hsdram2, &Command, 0xfff);
 
 Command.CommandMode = FMC_SDRAM_CMD_AUTOREFRESH_MODE;
 Command.AutoRefreshNumber = 2;
 HAL_SDRAM_SendCommand(&hsdram2, &Command, 0xfff);
 
 Command.CommandMode = FMC_SDRAM_CMD_LOAD_MODE;
 Command.ModeRegisterDefinition = (uint32_t)0 | 0<<3 | 2<<4 | 0<<7 | 1<<9;
 HAL_SDRAM_SendCommand(&hsdram2, &Command, 0xfff);
 
 HAL_SDRAM_ProgramRefreshRate(&hsdram2, 1542);

This topic has been closed for replies.

2 replies

Peter BENSCH
Technical Moderator
February 15, 2022

Touchscreens must be extremely sensitive in order to detect finger touches well. However, this also results in extreme sensitivity to interference radiation, e.g. from the control lines of the DRAM.

Please check the layout very carefully, i.e. matching the tracks (exactly the same length), their impedance, etc.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Freedom_Neo
Senior
February 15, 2022

You mean these as control lines?

0693W00000JPu32QAD.png

Peter BENSCH
Technical Moderator
February 15, 2022

Well, I mean all lines carrying high frequencies: address/data bus, CLK, etc.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Tesla DeLorean
Guru
February 15, 2022

>>Why does adding RAM affect the touch part?

Perhaps some pin level conflict? Some defect on the board/design, or the assembly.

Perhaps narrow it down by initializing sub-portions of the pins in a bisection fashion.

Then focus on the subset that seem to be causing the issue.

Assuming touch via I2C ? Do those pins have pull-ups? Have obvious conflicts or cross connections?

Does the SDRAM actually work on your design?

Problems with power planes, decoupling?

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Freedom_Neo
Senior
February 16, 2022

When Extarnal RAM is canceled, the touch part works but detects late. What could be the reason for this? After all, I disable external RAM and disable it from CubeIDE settings. I am removing the codes related to external RAM in the code. But the touch part works with a little delay.

I'm trying the code before enabling the external RAM to see this effect. In that code, the touch part works fine.