cancel
Showing results for 
Search instead for 
Did you mean: 

External RAM Problem

Yunus ARI
Senior

Hi Everyone,

I am working on a project with TouchGFX. I'm working with STM32H743X MCU. Project have MT48LC4M32B model external SDRAM.

I was have an issue with screen that corrupted image on it. You can see below some example at picture.In expectation, the back color of the screen needs to be grey and the text need to be readable.

0693W00000Nrqh7QAB.jpgSo I was start my own investigation on this issue. Right now, I have suspicion on external ram. I am try to use write a sngle word to external ram and see on debug mod. You can see two picture below for this test. You can see the ram status on right side of 1st picture.

0693W00000NrqmAQAR.png 

On second picture I just run code for 1 write operation. In my expextation fisrt 4 byte of ram will change to DD CC AA FF, the rest of it will be same. But you can see the ram status after fist write operation in next picture. Ram write same word for 4 time.

0693W00000NrqmFQAR.png 

I am using ram BSP from ST examples. You can see installation of FMC at cube mx in below pictures.

0693W00000NrqmPQAR.png 

I need all of suggestions for this issue. Please help me on this and give me an road for solution.

Thanks in advance all, have a nice journey.

1 ACCEPTED SOLUTION

Accepted Solutions
Yunus ARI
Senior

Guess I found problem source. I just want to explain so that if any one have this problem like me.

I was use HAL library initialization function for FMC with BSP package that supplied for MT48LC ram that used on discovery kit. You can see BSP function at message that above. Example code was call BSP function after all HAL initialization functions in main.

I was using LTDC that take frame buffer from external ram. LTDC installation was finished before ram came online because of the BSP function location. Basically it was no harm because core will fix that issue probably. But I was have a custom board. I assume, this bad installation sequence create an electronic misbehavior and ram couldn't manage this issue.

Simply, I relocated the BSP function to the end of FMC installation function and its solve my problem.

Thanks everyone, have a nice forum.

View solution in original post

3 REPLIES 3

You should be able to validate your SDRAM implementation irrespective of TouchGFX, and LTDC, etc.

Beyond that you'll also need to look at how the write-buffers, cache and write-thru relate to the coherency of what you've written vs what the DMA operation can sweep out of memory.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Yunus ARI
Senior

I am trying to figure it out what problem on my SDRAM like you said. But I'm at a death end right now. I was suspicious to the SDRAM installations but it's looking just fine. Maybe I'm overlook something, I don't know.

I will do my further investigation for solution but still any advice will help. Thanks a lot.

Yunus ARI
Senior

Guess I found problem source. I just want to explain so that if any one have this problem like me.

I was use HAL library initialization function for FMC with BSP package that supplied for MT48LC ram that used on discovery kit. You can see BSP function at message that above. Example code was call BSP function after all HAL initialization functions in main.

I was using LTDC that take frame buffer from external ram. LTDC installation was finished before ram came online because of the BSP function location. Basically it was no harm because core will fix that issue probably. But I was have a custom board. I assume, this bad installation sequence create an electronic misbehavior and ram couldn't manage this issue.

Simply, I relocated the BSP function to the end of FMC installation function and its solve my problem.

Thanks everyone, have a nice forum.