This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

sdram testing



hello

        i am doing interface sdram to tms320c5502 dsp processor. some problem regarding to testing are occured.i want to test address and data bus of sdram.please guide me for algo in c  for testing.

  • hello all

                   i am doing interfacing of sdram to tms320c5502 dsp processor .for this i required testing of sdram address and data bus. but  i am getting algo for testing address and data bus. please some guide me 

  • You should be able to get a fairly basic test going with a loop that writes and reads each SDRAM location something like the pseudocode below with which you could vary the test pattern to narrow down where the problem stems from, though this answer seems too simple so if you are looking for something deeper please let us know.

    #define SDRAMADDRESS 0x80000000
    #define SDRAMLENGTH 100000
    #define SDRAMTESTPATTERN 0xFFFFFFFF

    //...
    int *sdrampointer;
    int i=0;

    sdrampointer = (int *) SDRAMADDRESS;
    while(i<SDRAMLENGTH){ //write out test values
       *sdrampointer = SDRAMTESTPATTERN;
       sdrampointer++;
       i++;
    }

    i=0;
    sdrampointer = (int *) SDRAMADDRESS;
    while(i<SDRAMLENGTH){ //read back test values
       if(SDRAMTESTPATTERN != *sdrampointer)
          printf("Error: read 0x%x at address 0x%x \n", *sdrampointer, sdrampointer); //may have to adjust typecasting here
       sdrampointer++;
       i++;
    }
    //...