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.

Accessing RM48 HDK EMIF in 16-bit mode

 I have interfaced a 16-bit asynchronous memory device, as per page 615, Figure 17-8 (b) of TRM for RM48.

The memory device DOES NOT have Byte Enables so I have left EMIF_nDQM[1:0] as not connected.

The chip select I have used is EMIF_CS[2] which maps to base address of 0x6000_0000.

- I want to ask how to access each 16-bit WORD in the 16-bit memory device, for instance if I want to access WORD 1 of memory device, then what should be the address in the RM48 program?

- Secondly, should I use a 16-bit memory pointer to access each word in the memory device or 8-bit pointer?

- Page no. 615 of TRM does not depict how to decode an EMIF address generated by RM48, for instance I want to know where to put BA[1] while decoding a 32-bit address?

Any help would be highly regarded.

Thanks

Anila

  • Hi Anila,

     

      Please see below interface connection between the microcontroller and the external 16-bit async memory.

      Since you don't don't have the nDQM[1:0], you don't want to use 8-bit pointer. 16-bit and 32-bit pointers should be fine. Let's say you want to write to the first word of the async RAM you can use below code as an example.

      *(uint16 *)0x60000000 = 0x1234; // Write 16-bit value 0x1234 to the first location.

     

  • Thanks for the reply.
    In this figure, why EMIF_A[23] is shown? I guess the EMIF has in all 22 address lines (A0 to A21), and BA[0] forms the 22nd address line. Please correct me if I am wrong.

    Also if 16-bit pointer is to be used then should word #1 (not word 0) of memory device be accessed as follows:
    *(uint16 *)0x6000_0002 = data;
    16-bit pointer means, all the addresses should be even?

    Regards
    Anila
  • Hi Anila,
    I thought you meant WORD#1 to be the first location of of the memory. Yes, if WORD#0 is the first location of the 16-bit word then *(uint16 *)0x6000_0002 is the right address to access WORD#1.

    BA[0] is used to define the device's address A[23] if required. You do not need to use EMIF_BA[0] if your device does not have A[23].
  • Many thanks Charles.

    I assume that RM48 asynchronous interface should be configured with ASIZE = 16-bit for the above to work?

    Regards
    Anila
  • Hi Anila,
    That is correct. You need to set ASIZE = 1 for 16-bit interface since your external device is of 16-bit.