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.

RM48L952: Read/write issue using SDRAM

Part Number: RM48L952

We are having an (seemingly) odd issue with interfacing an external memory (Alliance AS4C32M16SA-7).  When we write to the external memory we have two issues.  first we are getting bit and byte swapping, the second is that when we write to the first odd location, all odd locations receive the word we just put in the first odd location.

  • more info about what is occurring from my programmer....

  • from my programmer:  first write is ok, subsequent writes overwrites good data with zeros.

    Writing to a 8-bit variable located in external memory and then reading it back gives an incorrect value:

     

    This code:

           volatile unsigned char *ptr = ((volatile unsigned char *)0x80000000U);

     

    UARTprintf("Byte test\n");

    ptr[0] = (unsigned char)0x12;

    UARTprintf("ptr[0] = 0x%02x\n", ptr[0]);

    ptr[1] = (unsigned char)0x34;

    UARTprintf("ptr[1] = 0x%02x\n", ptr[1]);

    ptr[2] = (unsigned char)0x56;

    UARTprintf("ptr[2] = 0x%02x\n", ptr[2]);

    ptr[3] = (unsigned char)0x78;

    UARTprintf("ptr[3] = 0x%02x\n", ptr[3]);

    ptr[4] = (unsigned char)0x9a;

    UARTprintf("ptr[4] = 0x%02x\n", ptr[4]);

    ptr[5] = (unsigned char)0xbc;

    UARTprintf("ptr[5] = 0x%02x\n", ptr[5]);

    ptr[6] = (unsigned char)0xde;

    UARTprintf("ptr[6] = 0x%02x\n", ptr[6]);

    ptr[7] = (unsigned char)0xf0;

    UARTprintf("ptr[7] = 0x%02x\n", ptr[7]);

     

    Prints out:

    Byte test

    ptr[0] = 0x00

    ptr[1] = 0x00

    ptr[2] = 0x12

    ptr[3] = 0x34

    ptr[4] = 0x00

    ptr[5] = 0x00

    ptr[6] = 0x9a

    ptr[7] = 0xbc

  • Hello Mike,

    1. Are EMIF DQM signals are used to enable the byte access?

    2. Please use device mode or strong-ordered mode for EMIF SDRAM  using MPU

    3. Please lower your EMIF clock:

  • Hello Mike,

    I assume you have solved the problem. I will close this thread.