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.

address shift in EMIF

Hello, In EMIF of C6xxx the address lines are from EA2 to EA21, not from EA0 to EA19 as usual. This makes it necessary to shift the address between internal mapping memory address and external memory address. I used the following code to write to an external memory with the external address which begins at 0. That is, address 0, 1, 2 and so on. #define EMIF_BASE_ADDR 0x80000003 // CE0 void write_emif_multiword(Uint16 start_addr, Uint32 *data_for_write,g Uint16 num) { Uint16 i; for (i = 0; i > 2“. Or 0 = (0x80000003 – 0x80000000) >> 2. Is it correct? Owen
EMIF.docx
  • Hi Owen,

    It depends on what processor and bus width have you been used.

    Please refer to the "spra568a" TI doc for address shifting.

    Chapter 2.3 and Table 7.

  • Owen,

    There is an icon for inserting code. Without at least line formatting it is very difficult to read. There are non-ASCII characters that do not show up as normal C code in the text that I see above.

    Your EMIF_BASE_ADDR should not have 3 at the end.

    Generally, an address variable like start_addr will be a 32-bit variable since addresses are 32 bits in size. But there is no way to tell what you are doing with it, so I do not know if this is incorrect in general.

    You should not use Uint16 for a simple variable. The natural variable size is 32 bits, which is the natural size of the C6000 registers. You can do Uint16 math when needed, but when it is not needed, you should default to 32 bits.

    Your code is incomplete and does not do anything, at least as shown above. So no, it is not correct.

    Regards,
    RandyP