AnsweredAssumed Answered

can't read data back from SDRAM

Question asked by Peter Ruesch on Aug 5, 2015
Latest reply on Aug 11, 2015 by Peter Ruesch

Hi,

 

I'm trying to use the external SDRAM on the TWR-K65 board.

Setup was done with processor expert but unfortunately, I have no idea if these values are correct.

Can anyone make a statement if these values make sense?

2015_08_05_15_08_06_Hardware_k65_benchmark_Sources_main.c_Kinetis_Design_Studio_C_Users_Peter.png

 

my problem is, that following code always reaches the break statement which indicates that I can not read back the values I previously wrote from SDRAM.

#define SDRAM_BASE_ADD (0x8000000)

value = 0xabab;
      
      *((uint32_t*)(SDRAM_BASE_ADD)) = value;
     uint32_t readValue = *((uint32_t*)(SDRAM_BASE_ADD));


     if (readValue != value)
     {
     break;
     }

 

what am I doing wrong ?

 

I also noticed that the memory view in eclipse somehow freaks out when watching the SDRAM contents. It shows not whats expected. after the memset, i expect a large memory range to be 0x55.

2015_08_05_15_20_40_Debug_k65_benchmark_Sources_main.c_Kinetis_Design_Studio_C_Users_Peter.ru.png

Outcomes