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.

AM335x EVM - Data Abort Exception when reading H/W address using HWREG



I have a SYS/BIOS project that starts up OK & a Task is created and run OK.

The first thing the Task does is to read the MAC address using the function EVMMACAddrGet()

In this function the first line is this:

macAddr[0] = (HWREG(SOC_CONTROL_REGS + CONTROL_MAC_ID_LO(addrIdx)) >> 8) & 0xFF;

When the H/W address is read (via the macro HWREG) a Data Abort Exception occurs.

I have tried other code & any H/W read using HWREG seems to cause a Data Abort Exception.

The Physical address of the register it is attempting to read is 0x44E10630.

If I use the Memory Bowser in Code Composer to inspect this address, all memory locations show up as ????????and a red message appears in the Console saying: "CortxA8: Trouble Reading Memory Block at 0x44e10630 on Page 0 of Length 0x1e0: (Error -1064 @ 0x6567206F) Attempted to access an unknown or invalid register. Confirm the register is valid and accessible, and retry the operation. (Emulation package 5.1.232.0)"

 

It seems that this memory is not visible to the CPU for some reason. Possible reasons I can think of are

(1) MMU or memory configuration not correct,

(2) Another type of .cfg file error.

(3) A dip switch setting on the EVM board not set correctly (unlikely as other non SYS/BIOS example project run OK).

(4) Using incorrect Hardware Register mapping file (i.e. the define for SOC_CONTROL_REGS or CONTROL_MAC_ID_LO are wrong for this processor type).

(5) ???


Can anyone spot which of these might be the cause, or offer another explanation, and how to fix this problem?

 

Thanks,

Declan Traill

  • Declan,

    As you cannot view any of these registers in Memory Browser, I think it is a MMU configuration issue. The reasons (2) and (4) looks unlikely. 

    Can you give more details on the setup environment? 

    Regards,
    Vinesh

  • Hi Vinesh,

        Yes, there is an MMU config issue. I had been trying to call the function MMUInit(applMmuEntries) but it kept on crashing, so I had commented it out. I figured out why it was crashing: there are two different functions each with the same name of MMUInit() - one in mmu.c and the other in osdrv_mmu.c.  The wrong one (mmu.c) was being called due to the order of appearance to the linker.

    So after fixing that, most of the code runs OK, except I have run into another Memory related problem:

    In the following function that is part of LwIP, the code crashes inside the loop unless I single step it or add a number of printf lines between each line of code - thus suggesting a memory access or turnaround timing issue:

    static void
    cpswif_rxbd_alloc(struct cpswinst *cpswinst) {

                          ........... Other Code Here .............

      while(rxch->free_num) {

     /**
         * Try to get a pbuf of max. length. This shall be cache line aligned if
         * cache is enabled.
         */
        p = pbuf_alloc(PBUF_RAW, PBUF_LEN_MAX, PBUF_POOL);

        /**
         * Allocate bd's if p is not NULL. This allocation doesnt support
         * pbuf chaining.
         */
        if(p != NULL) {
    #ifdef LWIP_CACHE_ENABLED
          /**
           * Clean the pbuf structure info. This is needed to prevent losing
           * pbuf structure info when we invalidate the pbuf on rx interrupt
           */
          CacheDataCleanBuff((u32_t)(p), (u32_t)(SIZEOF_STRUCT_PBUF));
    #endif

          curr_bd->bufptr = (u32_t)(p->payload);
          curr_bd->bufoff_len = p->len;
          curr_bd->flags_pktlen = CPDMA_BUF_DESC_OWNER;

          /* Save the pbuf */
          curr_bd->pbuf = p;
          last_bd = curr_bd;
          curr_bd = curr_bd->next;

          rxch->free_num--;
        } else {
          break;
        }
      }

                          ........... Other Code Here .............

    In particular, the line in red: a memory pointer gets corrupted to an unmapped address & then attempts to dereference it - causing a crash.

    I have tried tweaking the DDR2 config parameters in the .gel file according to the guidelines & excel spreadsheet here:

    http://processors.wiki.ti.com/index.php/AM335x_EMIF_Configuration_tips

    But the problem still occurs...

    I have also tried running some of the .gel scripts to test the DDR memory. The results of the .gel startup, the EDMA test and the DDR Access test are below:

    CortxA8: Output: ****  AM335x 15x15 EVM Initialization is in progress ..........
    CortxA8: Output: ****  AM335x ALL PLL Config for OPP == OPP100 is in progress .........
    CortxA8: Output: Input Clock Read from SYSBOOT[15:14]:  24MHz
    CortxA8: Output: ****  Going to Bypass...
    CortxA8: Output: ****  Bypassed, changing values...
    CortxA8: Output: ****  Locking ARM PLL
    CortxA8: Output: ****  Core Bypassed
    CortxA8: Output: ****  Now locking Core...
    CortxA8: Output: ****  Core locked
    CortxA8: Output: ****  DDR DPLL Bypassed
    CortxA8: Output: ****  DDR DPLL Locked
    CortxA8: Output: ****  PER DPLL Bypassed
    CortxA8: Output: ****  PER DPLL Locked
    CortxA8: Output: ****  DISP PLL Config is in progress ..........
    CortxA8: Output: ****  DISP PLL Config is DONE ..........
    CortxA8: Output: ****  AM335x ALL ADPLL Config for OPP == OPP100 is Done .........
    CortxA8: Output: ****  AM335x DDR2 EMIF and PHY configuration is in progress...
    CortxA8: Output: EMIF PRCM is in progress .......
    CortxA8: Output: EMIF PRCM Done
    CortxA8: Output: DDR PHY Configuration in progress
    CortxA8: Output: Waiting for VTP Ready .......
    CortxA8: Output: VTP is Ready!
    CortxA8: Output: DDR PHY CMD0 Register configuration is in progress .......
    CortxA8: Output: DDR PHY CMD1 Register configuration is in progress .......
    CortxA8: Output: DDR PHY CMD2 Register configuration is in progress .......
    CortxA8: Output: DDR PHY DATA0 Register configuration is in progress .......
    CortxA8: Output: DDR PHY DATA1 Register configuration is in progress .......
    CortxA8: Output: Setting IO control registers.......
    CortxA8: Output: EMIF Timing register configuration is in progress .......
    CortxA8: Output: EMIF Timing register configuration is done .......
    CortxA8: Output: PHY is READY!!
    CortxA8: Output: DDR PHY Configuration done
    CortxA8: Output: ****  AM335x 15x15 EVM Initialization is Done ******************
    CortxA8: GEL Output:

    This EDMA test consists of 8 tests.
    CortxA8: Trouble Writing Memory Block at 0x44e000bc on Page 0 of Length 0x4: (Error -1065 @ 0x44E000BC) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.1.232.0)
    EDMA() cannot be evaluated.
    Target failed to write 0x44E000BC
     at *((unsigned int *) (0x44E00000+0x00BC))=(unsigned int) 2 [AM335x_EVM.gel:264]
     at EdmaPrcm() [AM335x_EVM.gel:858]
     at EDMA()


    CortxA8: GEL Output: Try Accessing DDR memory....Write data
    CortxA8: GEL Output: Data written at :: 0x80000000
    CortxA8: GEL Output: Data written at :: 0x80000004
    CortxA8: GEL Output: Data written at :: 0x80000008
    CortxA8: GEL Output: Data written at :: 0x8000000C
    CortxA8: GEL Output: Data written at :: 0x80000010
    CortxA8: GEL Output: Data written at :: 0x80000014
    CortxA8: GEL Output: Data written at :: 0x80000018
    CortxA8: GEL Output: Data written at :: 0x8000001C
    CortxA8: GEL Output: Data written at :: 0x80000020
    CortxA8: GEL Output: Data written at :: 0x80000024
    CortxA8: GEL Output: Data written at :: 0x80000028
    CortxA8: GEL Output: Data written at :: 0x8000002C
    CortxA8: GEL Output: Data written at :: 0x80000030
    CortxA8: GEL Output: Data written at :: 0x80000034
    CortxA8: GEL Output: Data written at :: 0x80000038
    CortxA8: GEL Output: Data written at :: 0x8000003C
    CortxA8: GEL Output: Data written at :: 0x80000040
    CortxA8: GEL Output: Data written at :: 0x80000044
    CortxA8: GEL Output: Data written at :: 0x80000048
    CortxA8: GEL Output: Data written at :: 0x8000004C
    CortxA8: GEL Output: Data written at :: 0x80000050
    CortxA8: GEL Output: Data written at :: 0x80000054
    CortxA8: GEL Output: Data written at :: 0x80000058
    CortxA8: GEL Output: Data written at :: 0x8000005C
    CortxA8: GEL Output: Data written at :: 0x80000060
    CortxA8: GEL Output: Data written at :: 0x80000064
    CortxA8: GEL Output: Data written at :: 0x80000068
    CortxA8: GEL Output: Data written at :: 0x8000006C
    CortxA8: GEL Output: Data written at :: 0x80000070
    CortxA8: GEL Output: Data written at :: 0x80000074
    CortxA8: GEL Output: Data written at :: 0x80000078
    CortxA8: GEL Output: Data written at :: 0x8000007C
    CortxA8: GEL Output: Data written at :: 0x80000080
    CortxA8: GEL Output: Data written at :: 0x80000084
    CortxA8: GEL Output: Data written at :: 0x80000088
    CortxA8: GEL Output: Data written at :: 0x8000008C
    CortxA8: GEL Output: Data written at :: 0x80000090
    CortxA8: GEL Output: Data written at :: 0x80000094
    CortxA8: GEL Output: Data written at :: 0x80000098
    CortxA8: GEL Output: Data written at :: 0x8000009C
    CortxA8: GEL Output: Data written at :: 0x800000A0
    CortxA8: GEL Output: Data written at :: 0x800000A4
    CortxA8: GEL Output: Data written at :: 0x800000A8
    CortxA8: GEL Output: Data written at :: 0x800000AC
    CortxA8: GEL Output: Data written at :: 0x800000B0
    CortxA8: GEL Output: Data written at :: 0x800000B4
    CortxA8: GEL Output: Data written at :: 0x800000B8
    CortxA8: GEL Output: Data written at :: 0x800000BC
    CortxA8: GEL Output: Data written at :: 0x800000C0
    CortxA8: GEL Output: Data written at :: 0x800000C4
    CortxA8: GEL Output: Data written at :: 0x800000C8
    CortxA8: GEL Output: Data written at :: 0x800000CC
    CortxA8: GEL Output: Data written at :: 0x800000D0
    CortxA8: GEL Output: Data written at :: 0x800000D4
    CortxA8: GEL Output: Data written at :: 0x800000D8
    CortxA8: GEL Output: Data written at :: 0x800000DC
    CortxA8: GEL Output: Data written at :: 0x800000E0
    CortxA8: GEL Output: Data written at :: 0x800000E4
    CortxA8: GEL Output: Data written at :: 0x800000E8
    CortxA8: GEL Output: Data written at :: 0x800000EC
    CortxA8: GEL Output: Data written at :: 0x800000F0
    CortxA8: GEL Output: Data written at :: 0x800000F4
    CortxA8: GEL Output: Data written at :: 0x800000F8
    CortxA8: GEL Output: Data written at :: 0x800000FC
    CortxA8: GEL Output: Data written at :: 0x80000100
    CortxA8: GEL Output: Data written at :: 0x80000104
    CortxA8: GEL Output: Data written at :: 0x80000108
    CortxA8: GEL Output: Data written at :: 0x8000010C
    CortxA8: GEL Output: Data written at :: 0x80000110
    CortxA8: GEL Output: Data written at :: 0x80000114
    CortxA8: GEL Output: Data written at :: 0x80000118
    CortxA8: GEL Output: Data written at :: 0x8000011C
    CortxA8: GEL Output: Data written at :: 0x80000120
    CortxA8: GEL Output: Data written at :: 0x80000124
    CortxA8: GEL Output: Data written at :: 0x80000128
    CortxA8: GEL Output: Data written at :: 0x8000012C
    CortxA8: GEL Output: Data written at :: 0x80000130
    CortxA8: GEL Output: Data written at :: 0x80000134
    CortxA8: GEL Output: Data written at :: 0x80000138
    CortxA8: GEL Output: Data written at :: 0x8000013C
    CortxA8: GEL Output: Data written at :: 0x80000140
    CortxA8: GEL Output: Data written at :: 0x80000144
    CortxA8: GEL Output: Data written at :: 0x80000148
    CortxA8: GEL Output: Data written at :: 0x8000014C
    CortxA8: GEL Output: Data written at :: 0x80000150
    CortxA8: GEL Output: Data written at :: 0x80000154
    CortxA8: GEL Output: Data written at :: 0x80000158
    CortxA8: GEL Output: Data written at :: 0x8000015C
    CortxA8: GEL Output: Data written at :: 0x80000160
    CortxA8: GEL Output: Data written at :: 0x80000164
    CortxA8: GEL Output: Data written at :: 0x80000168
    CortxA8: GEL Output: Data written at :: 0x8000016C
    CortxA8: GEL Output: Data written at :: 0x80000170
    CortxA8: GEL Output: Data written at :: 0x80000174
    CortxA8: GEL Output: Data written at :: 0x80000178
    CortxA8: GEL Output: Data written at :: 0x8000017C
    CortxA8: GEL Output: Data written at :: 0x80000180
    CortxA8: GEL Output: Data written at :: 0x80000184
    CortxA8: GEL Output: Data written at :: 0x80000188
    CortxA8: GEL Output: Data written at :: 0x8000018C
    CortxA8: GEL Output: Data written at :: 0x80000190
    CortxA8: GEL Output: Data written at :: 0x80000194
    CortxA8: GEL Output: Data written at :: 0x80000198
    CortxA8: GEL Output: Data written at :: 0x8000019C
    CortxA8: GEL Output: Data written at :: 0x800001A0
    CortxA8: GEL Output: Data written at :: 0x800001A4
    CortxA8: GEL Output: Data written at :: 0x800001A8
    CortxA8: GEL Output: Data written at :: 0x800001AC
    CortxA8: GEL Output: Data written at :: 0x800001B0
    CortxA8: GEL Output: Data written at :: 0x800001B4
    CortxA8: GEL Output: Data written at :: 0x800001B8
    CortxA8: GEL Output: Data written at :: 0x800001BC
    CortxA8: GEL Output: Data written at :: 0x800001C0
    CortxA8: GEL Output: Data written at :: 0x800001C4
    CortxA8: GEL Output: Data written at :: 0x800001C8
    CortxA8: GEL Output: Data written at :: 0x800001CC
    CortxA8: GEL Output: Data written at :: 0x800001D0
    CortxA8: GEL Output: Data written at :: 0x800001D4
    CortxA8: GEL Output: Data written at :: 0x800001D8
    CortxA8: GEL Output: Data written at :: 0x800001DC
    CortxA8: GEL Output: Data written at :: 0x800001E0
    CortxA8: GEL Output: Data written at :: 0x800001E4
    CortxA8: GEL Output: Data written at :: 0x800001E8
    CortxA8: GEL Output: Data written at :: 0x800001EC
    CortxA8: GEL Output: Data written at :: 0x800001F0
    CortxA8: GEL Output: Data written at :: 0x800001F4
    CortxA8: GEL Output: Data written at :: 0x800001F8
    CortxA8: GEL Output: Data written at :: 0x800001FC
    CortxA8: GEL Output: Data written at :: 0x80000200
    CortxA8: GEL Output: Data written at :: 0x80000204
    CortxA8: GEL Output: Data written at :: 0x80000208
    CortxA8: GEL Output: Data written at :: 0x8000020C
    CortxA8: GEL Output: Data written at :: 0x80000210
    CortxA8: GEL Output: Data written at :: 0x80000214
    CortxA8: GEL Output: Data written at :: 0x80000218
    CortxA8: GEL Output: Data written at :: 0x8000021C
    CortxA8: GEL Output: Data written at :: 0x80000220
    CortxA8: GEL Output: Data written at :: 0x80000224
    CortxA8: GEL Output: Data written at :: 0x80000228
    CortxA8: GEL Output: Data written at :: 0x8000022C
    CortxA8: GEL Output: Data written at :: 0x80000230
    CortxA8: GEL Output: Data written at :: 0x80000234
    CortxA8: GEL Output: Data written at :: 0x80000238
    CortxA8: GEL Output: Data written at :: 0x8000023C
    CortxA8: GEL Output: Data written at :: 0x80000240
    CortxA8: GEL Output: Data written at :: 0x80000244
    CortxA8: GEL Output: Data written at :: 0x80000248
    CortxA8: GEL Output: Data written at :: 0x8000024C
    CortxA8: GEL Output: Data written at :: 0x80000250
    CortxA8: GEL Output: Data written at :: 0x80000254
    CortxA8: GEL Output: Data written at :: 0x80000258
    CortxA8: GEL Output: Data written at :: 0x8000025C
    CortxA8: GEL Output: Data written at :: 0x80000260
    CortxA8: GEL Output: Data written at :: 0x80000264
    CortxA8: GEL Output: Data written at :: 0x80000268
    CortxA8: GEL Output: Data written at :: 0x8000026C
    CortxA8: GEL Output: Data written at :: 0x80000270
    CortxA8: GEL Output: Data written at :: 0x80000274
    CortxA8: GEL Output: Data written at :: 0x80000278
    CortxA8: GEL Output: Data written at :: 0x8000027C
    CortxA8: GEL Output: Data written at :: 0x80000280
    CortxA8: GEL Output: Data written at :: 0x80000284
    CortxA8: GEL Output: Data written at :: 0x80000288
    CortxA8: GEL Output: Data written at :: 0x8000028C
    CortxA8: GEL Output: Data written at :: 0x80000290
    CortxA8: GEL Output: Data written at :: 0x80000294
    CortxA8: GEL Output: Data written at :: 0x80000298
    CortxA8: GEL Output: Data written at :: 0x8000029C
    CortxA8: GEL Output: Data written at :: 0x800002A0
    CortxA8: GEL Output: Data written at :: 0x800002A4
    CortxA8: GEL Output: Data written at :: 0x800002A8
    CortxA8: GEL Output: Data written at :: 0x800002AC
    CortxA8: GEL Output: Data written at :: 0x800002B0
    CortxA8: GEL Output: Data written at :: 0x800002B4
    CortxA8: GEL Output: Data written at :: 0x800002B8
    CortxA8: GEL Output: Data written at :: 0x800002BC
    CortxA8: GEL Output: Data written at :: 0x800002C0
    CortxA8: GEL Output: Data written at :: 0x800002C4
    CortxA8: GEL Output: Data written at :: 0x800002C8
    CortxA8: GEL Output: Data written at :: 0x800002CC
    CortxA8: GEL Output: Data written at :: 0x800002D0
    CortxA8: GEL Output: Data written at :: 0x800002D4
    CortxA8: GEL Output: Data written at :: 0x800002D8
    CortxA8: GEL Output: Data written at :: 0x800002DC
    CortxA8: GEL Output: Data written at :: 0x800002E0
    CortxA8: GEL Output: Data written at :: 0x800002E4
    CortxA8: GEL Output: Data written at :: 0x800002E8
    CortxA8: GEL Output: Data written at :: 0x800002EC
    CortxA8: GEL Output: Data written at :: 0x800002F0
    CortxA8: GEL Output: Data written at :: 0x800002F4
    CortxA8: GEL Output: Data written at :: 0x800002F8
    CortxA8: GEL Output: Data written at :: 0x800002FC
    CortxA8: GEL Output: Data written at :: 0x80000300
    CortxA8: GEL Output: Data written at :: 0x80000304
    CortxA8: GEL Output: Data written at :: 0x80000308
    CortxA8: GEL Output: Data written at :: 0x8000030C
    CortxA8: GEL Output: Data written at :: 0x80000310
    CortxA8: GEL Output: Data written at :: 0x80000314
    CortxA8: GEL Output: Data written at :: 0x80000318
    CortxA8: GEL Output: Data written at :: 0x8000031C
    CortxA8: GEL Output: Data written at :: 0x80000320
    CortxA8: GEL Output: Data written at :: 0x80000324
    CortxA8: GEL Output: Data written at :: 0x80000328
    CortxA8: GEL Output: Data written at :: 0x8000032C
    CortxA8: GEL Output: Data written at :: 0x80000330
    CortxA8: GEL Output: Data written at :: 0x80000334
    CortxA8: GEL Output: Data written at :: 0x80000338
    CortxA8: GEL Output: Data written at :: 0x8000033C
    CortxA8: GEL Output: Data written at :: 0x80000340
    CortxA8: GEL Output: Data written at :: 0x80000344
    CortxA8: GEL Output: Data written at :: 0x80000348
    CortxA8: GEL Output: Data written at :: 0x8000034C
    CortxA8: GEL Output: Data written at :: 0x80000350
    CortxA8: GEL Output: Data written at :: 0x80000354
    CortxA8: GEL Output: Data written at :: 0x80000358
    CortxA8: GEL Output: Data written at :: 0x8000035C
    CortxA8: GEL Output: Data written at :: 0x80000360
    CortxA8: GEL Output: Data written at :: 0x80000364
    CortxA8: GEL Output: Data written at :: 0x80000368
    CortxA8: GEL Output: Data written at :: 0x8000036C
    CortxA8: GEL Output: Data written at :: 0x80000370
    CortxA8: GEL Output: Data written at :: 0x80000374
    CortxA8: GEL Output: Data written at :: 0x80000378
    CortxA8: GEL Output: Data written at :: 0x8000037C
    CortxA8: GEL Output: Data written at :: 0x80000380
    CortxA8: GEL Output: Data written at :: 0x80000384
    CortxA8: GEL Output: Data written at :: 0x80000388
    CortxA8: GEL Output: Data written at :: 0x8000038C
    CortxA8: GEL Output: Data written at :: 0x80000390
    CortxA8: GEL Output: Data written at :: 0x80000394
    CortxA8: GEL Output: Data written at :: 0x80000398
    CortxA8: GEL Output: Data written at :: 0x8000039C
    CortxA8: GEL Output: Data written at :: 0x800003A0
    CortxA8: GEL Output: Data written at :: 0x800003A4
    CortxA8: GEL Output: Data written at :: 0x800003A8
    CortxA8: GEL Output: Data written at :: 0x800003AC
    CortxA8: GEL Output: Data written at :: 0x800003B0
    CortxA8: GEL Output: Data written at :: 0x800003B4
    CortxA8: GEL Output: Data written at :: 0x800003B8
    CortxA8: GEL Output: Data written at :: 0x800003BC
    CortxA8: GEL Output: Data written at :: 0x800003C0
    CortxA8: GEL Output: Data written at :: 0x800003C4
    CortxA8: GEL Output: Data written at :: 0x800003C8
    CortxA8: GEL Output: Data written at :: 0x800003CC
    CortxA8: GEL Output: Data written at :: 0x800003D0
    CortxA8: GEL Output: Data written at :: 0x800003D4
    CortxA8: GEL Output: Data written at :: 0x800003D8
    CortxA8: GEL Output: Data written at :: 0x800003DC
    CortxA8: GEL Output: Data written at :: 0x800003E0
    CortxA8: GEL Output: Data written at :: 0x800003E4
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: No of Failed locations  are :: 0x00000000
    CortxA8: GEL Output: Data Integrity check Passed

    C

  • .....  So it seems that the external DDR2 RAM is working OK - yes?

    Is it the internal RAM that has access problems, or is that EDMA test failing for some other reason?

    Incidentally - other script test fail too. For example the DeviceType() test fails in a very similar way to the EDMA test:

    Target failed to read 0x44E10040

     

    Any suggestions...?

  • Declan,

    Which platform are you working on? The examples in SDK are tested over ICE/IDK platforms without any issues.

    Regards,
    Vinesh

  • Hi Vinesh,

      I am using the AM335x EVM board (see link below)...

    http://processors.wiki.ti.com/index.php/AM335x_General_Purpose_EVM_HW_User_Guide

    Regards,

    Declan

  • Declan, 

    The issue might be that MMUInit is not initializing the required memory segments in this case. You can check the applMmuEntries, and make sure EDMA and Internal RAM sections are included in it.

    Regards,
    Vinesh

  • Hi Vinesh,

        Ok, there were two problems: (1) I was running the test scripts before stepping the code over the MMUInit() call, (2) there was a missing section in the applMmuEntries table for EDMA3 at 0x49000000.

    Now all the test scripts pass, but the code still crashes in the LwIP code (indicated in earlier post) unless I single step it or add in printf's between code lines.

    Regards,

    Declan

  • Hi Vinesh,

    As I mentioned in my previous post I was still getting code crashes in the LwIP code that I showed you earlier.

    I found the cause and a fix (see below), but I think there should be a better Project-wide fix in the form of a compiler switch or project setting. Do you know how it should be done?


          curr_bd->bufptr = (u32_t)(p->payload);

    fence();
          curr_bd->bufoff_len = p->len;

    fence();
          curr_bd->flags_pktlen = CPDMA_BUF_DESC_OWNER;

    fence();

    Where 'fence()' is a call to a small assembly instruction (just the DMB instruction) to indicate to the compiler to complete the write and keep the same order of instructions as specified in the source code.

    See this link for the details on its use:

    http://en.wikipedia.org/wiki/Memory_barrier

  • Hi Declan,

    Can you check the Optimization levels in project settings? Is it having any impact on the behavior?

    Regards,
    Vinesh

  • Hi Vinesh,

         Yes I have tried No optimization and Level 2 Optimization - same result either way...

    Declan