Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

TM4C129 EPI interface with SRAM

$
0
0

I am testing a TM4C129 connected to an CY7C1010DV33 sram. I am using ccs6.01, Stellars ICDI.
I write the code listed below:
#define ERAM(x)  HWREG(SRAM16_MAPPING_ADDRESS+SRAM16_SECTOR_ADDRESS+x)
     for ( i=0; i< 0x10000; i++ )
     {
//      ERAM(i*4) = i;
     }
     //check
     for ( i=0; i< 0x10000; i++ )
     {
      data = ERAM(i*4);
      if ( data != (unsigned int)i )
      {
          LED1_ON;
          //break;
      }
     }
I tested in ICDI debug mode and stand alone mode, the result are all sucsess.

I write another code.
add the code below in .cmd file.
    ERAM (RWX) : origin = 0x60080000, length = 0x00040000
    esram   :   > ERAM
the code is in main.c file
#pragma DATA_SECTION(eram_data, "esram");
unsigned int eram_data[0x10000];

#define SIZE  0x100
     for ( i=0; i< SIZE; i++ )
     {
      eram_data[i] = i+1;
     }
     //check
     for ( i=0; i< SIZE; i++ )
     {
      data = eram_data[i];
      if ( data != i+1 )
      {
       LED1_ON; //ON
          break;
      }
     }
I run it in ICDI debug mode, the MCU run into FaultISR(),The hard fault handler.
Who can help me? Thanks very much!


Viewing all articles
Browse latest Browse all 262198


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>