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.

CCS/TMS320C6657: Manual 16-bit EMIF writes go wrong!

Part Number: TMS320C6657
Other Parts Discussed in Thread: CCSTUDIO

Tool/software: Code Composer Studio

I'm using CCS 7.1.0.00014 and the target is a dual C6657 board.

There is nor flash connected to EMIFA as a 16-bit device. 

In CCS, if I open a memory browser window at address 0x70000000 and set it to 16-bit Hex - TI style, then I can see the expected 0xFFFF from an empty flash device.

One of the commands the flash can accept is the code 0x98 which is the CFI query. If I manually enter this into the first address then the flash device does not respond. A logic analyser shows that 0xFFFF was written. What appears to be written is the read contents of address 0x70000002, or more generally, write data to even 16-bit addresses appears to be the read data from that address+1. Eg if I write to address 0x70000004 then the actual written data is what resides at address 0x70000006.

If I manually enter the 0x98 code to address 0x70000002 the correct response is received.

If I execute code to access the flash (rather than manually in CCS), then it behaves as expected.

Why?

  • In answer to my own question, it is all to do with the memory map setup which must be performed within a GEL script.
    This line makes it work:
    GEL_MapAddStr( 0x70000000, 0, 0x04000000, "R|W|AS2", 0 ); // EMIF16
    The AS2 is the important part. But where is there a doc that describes GEL_MapAddStr syntax?
  • Graeme Parker said:
    But where is there a doc that describes GEL_MapAddStr syntax?

    The CCS 7 help contains a description of the GEL_MapAddStr() options. e.g.:

    Access size can be specified using "ASn", where n is the access size in bytes. For example, "R|AS4" specifies 32 bits ROM.

    The waitstate parameter might also be important when using the CCS debugger to access memory via a EMIF.

    Shared Memory describes how to set a shared memory block number, for when SMP debugging.

    There is also Creating Device Initialization GEL files (spraa74a), but which was written for CCStudio version 2.40 in 2004 and so not sure how much of that document is still relevant.

  • Chester Gillon said:
    There is also Creating Device Initialization GEL files (spraa74a), but which was written for CCStudio version 2.40 in 2004 and so not sure how much of that document is still relevant.

    It is still fairly relevant. Current versions of CCS would mimic GEL behavior of CCSv3.1. Some items described in the document that has since changed would be that Startup() is now called when a debug session is launched vs simply starting up the CCS IDE, and simulators are no longer supported.

    Thanks

    ki